-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hyperlinks to footnotes bring to first page #3361
Comments
I think you should give us a complete recipe for the problem. e.g. source code, pandoc command used, tex output (and point out what's wrong and what's expected). Also, try to come up with a minimum working example. And if possible, produce the |
Yes, we can't proceed without an example. I have not noticed this issue in the past. |
Ok, here's what i discovered with pandoc markdown manual downloaded from http://pandoc.org/demo/MANUAL.txt First run with xelatex pandoc --latex-engine=xelatex manual.txt -o manual-xelatex.pdf If you click on a hyperlinked note (see manual-xelatex.pdf in the attached zip file), nothing seems to happen. Second run with pdftex, after removing some final text that contains annoying charachters for pdftex pandoc manual.txt -o manual-pdftex.pdf If you click on a hyperlinked note (see manual-pdftex.pdf in the attached zip file), you find yourself on the first page of the document in a 'full page view'. Then I got the latex version of the document pandoc -s manual.txt -o manual-pdftex.tex and removed all the text to get a MWE for the footnotes (see pdftex-no.tex and pdftex-no.pdf in the attached zip file). I suppose the problem comes from the following latex code in the preamble \usepackage{fancyvrb}
\VerbatimFootnotes % allows verbatim text in footnotes that goes in conflicts with Thanks |
Excellent diagnosis!
So we have a bit of a puzzle; we need `\VerbatimFootnotes`
if we're to have verbatim in footnotes, but breaking
note hyperlinks isn't a good consequence.
Perhaps poking around on the tex stack exchange (and asking
a question if needed) will reveal some solutions?
|
By simply changing the order between the loading of the 2 packages, we still have warnings but the hyperlink is there: Because
|
By simply moving the following code \usepackage{fancyvrb}
\VerbatimFootnotes before hyperref my MWE gets compiled, but latex gives error when compiling, for example, the whole manual file. I think the correct sequence is: \usepackage{fancyvrb}
\usepackage[unicode=true]{hyperref}
\hypersetup{
pdftitle={Pandoc User's Guide},
pdfauthor={John MacFarlane},
pdfborder={0 0 0},
breaklinks=true}
\urlstyle{same}
\VerbatimFootnotes This works for pdftex and xelatex. I tested with the manual file, maybe some other test could be useful. @jgm, @ickc, if you confirm this is the solution, can you update default template in pandoc packages for the various platforms? Thanks. |
I'll test it tomorrow. Meanwhile, jgm/pandoc-templates#238 should be on hold. |
Seems to work in my tests. I've updated the templates, thanks. |
I'm using Pandoc 1.19.1 with MiKTeX-pdfTeX 2.9.6000 and default latex template. Hyperlinks to footnotes bring to first page of the document instead of to the real footnote. Is this a known issue @jgm?
I use pdfTeX directly to typeset other document and hyperlinks to footnotes work well.
Thanks.
The text was updated successfully, but these errors were encountered: