Latex - hyperref, link to a file.gif - hyperlink

i want to create a link between my pdf file and a .gif file, is that possible? in Latex i tried with this:
\usepackage{hyperref}
\href{run:/./OrbiteEul.gif}{OrbiteEul.gif}
but it doesn't work, i mean it create the link, but when you click it nothing happens, the gif doesn't open! Am i missing something?
Thank you in advance for any kind of help.
edit:
I tried this way, but it didn't even compile.
\href{file://Users/Angeloferrari/Università/2°_anno/Calcolo_per_l\'astronomia
/Messina/Porgetti_R/Script/OrbiteEul.gif}{OrbiteEul.gif}

You should use
\href{run:./OrbiteEul.gif}{OrbiteEul.gif}
(note the missing / right after 'run:')

Related

How to replace Sphinx cover page when making a PDF

I need to change the cover page of a Sphinx-generated latexpdf from RST.
How can I do that without modifying the Sphinx package itself?
I've noticed latex_preamble in the conf file but that only seems to append things. If that is the way an example would be helpful. Right now whatever I do only seems to add to rather than remove the cover page.
Found the answer and posting it here for anyone else who is interested.
In the conf.py file add the following entry:
"maketitle": "\\input{your_cover.tex}"
where your_cover.tex is your LaTeX file you want to be the cover.

Set correct order of bibliography using latex+bibtex

So, I have an .tex and .bib files and I need my bibliography list to be on right order - appearance in text (now it is like in .bib file).
How to do it?
.tex file:
\bibliography{texfile}{}
Honestly, I've tried to use search, but didn't succeed. Thanks in advance.
Try using
\bibliographystyle{unsrt}
\bibliography{your_bib_file_without_extension}
The unsrt option orders the references as they appear in text.

How to include a file in LaTeX wihout causing a newpage

I hope, this question is not too offtopic.
I have a bigger school project which involves some documentation. The documentation is a LaTeX file, and looks like this:
...
some explanation
\section {someCode}
\include{someCode.hs}
some explanation
...
The files someCode.hs.tex are auto-genereated from their corresponding .hs-Files using Pygments and a Makefile.
The Problem is: Each time, I include something, a pagebreak is inserted before. This is neither expected nor wanted. I googled, but found no answer. Any ideas?
Use \input instead of \include.

problem with subsubsection title

Suddenly in my document all definitions of \subsubsection*{Title Text} stopped working properly.
The subsubsection number is displayed in the generated PDF and the title of the subsubsection is "*" (only the asterisk). The actual title text is displayed at the beginning of the first paragraph.
Excact code: \subsubsection*{Failure Semantics}
I'm not sure what happened. I only remember fixing some broken references...
Cleaning the output folder didn't help. Any ideas?
Thanks in advance.
bja
check
http://latex.silmaril.ie/formattinginformation/chapter3.html#sections
only add at the start of your chapter .tex
\setcounter{secnumdepth}{3}
add in the preamble
\setcounter{secnumdepth}{3}
to include subsubsections in the table of contents you will have to add also the line
\setcounter{tocdepth}{3}
Allright, solved thx to svn diff. :)
The bad line was \usepackage{amsmath}! Weird.
I'll just have to use array instead of pmatrix then. :/
Thanks all.

URL latex linebreak

When a URL is over a line and goes onto a second line, the hyperlink only uses the first line. Is there a way to get around this and yet still have the URL on multiple lines?
You should use the url package:
\usepackage{url}
...
\url{http://long.url.com/... .../stuff}
and it will break it for you at an appropriate place.
I suggest using package:
\usepackage{xurl}
This works fine for me on overleaf.
Example:
\url{https://www.tudelft.nl/ewi/over-de-faculteit/afdelingen/intelligent-systems/pattern-recognition-bioinformatics/pattern-recognition-laboratory/data-and-software/dd-tools/}
At the preamble, just put \usepackage{breakurl} somewhere after \usepackage{hyperref}. The \burl command is defined and, by default, the package also turns the \url command into a synonym of \burl.
Do it the following way. You are good to go!
\begin{document}
\sloppy
For me only this worked:
\PassOptionsToPackage{hyphens}{url}
\usepackage{hyperref}
and with this code to add line breaks after every normal alphabetic character and with *-~'":
\expandafter\def\expandafter\UrlBreaks\expandafter{\UrlBreaks% save the current one
\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j%
\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t%
\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D%
\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N%
\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X%
\do\Y\do\Z\do\*\do\-\do\~\do\'\do\"\do\-}%
answer complited from this site:
https://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url/10401
What packages (hyperref,url) and drivers (pdftex, dvips, etc.) are you using? Are you using the breaklinks option to hyperref?
According to the TeX FAQ you might want to try the breakurl package, though it appears you may simply be out of luck in some cases.
What worked best for me (with pdflatex) was
\usepackage[pdftex]{hyperref}
and then just \url{http://stackoverflow.com/} to create URLs. It only broke URLs at . and /, which was okay for my document. Importantly, other approaches I tried created PDFs where only the first line of the URL was a clickable link, and the destination URL was truncated to this portion, which is pretty confusing and bad.
Long URLs that contain underscores (_) in path segments will not be broken when using \PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}. However, I found that I could solve this problem by manually breaking lines in the displayed label using \\\\, like this:
\href{http://www.researchgate.net/profile/Nick\_Brooks2/publication/220012411\_Cultural\_responses\_to\_aridity\_in\_the\_Middle\_Holocene\_and\_increased\_social\_complexity/links/0922b4f398ad68bc96000000.pdf}{http://www.researchgate.net/profile/Nick\_Brooks2/publication/220012411\_\\Cultural\_responses\_to\_aridity\_in\_the\_Middle\_Holocene\_and\_increased\_social\_\\complexity/links/0922b4f398ad68bc96000000.pdf}
This results in URLs that are a bit prettier (IMO) than the use of \usepackage{breakurl} and \burl, as suggested by Debajyoti Mondal, and allows you to display the full URL if you wish.
There is a simple answer. Use \usepackage[hidelinks]{hyperref} before \begin{document}

Resources