In d5efa9b, \hyperref was replaced by \hyperlink, so now we don't have clickable references in our documents. This change was introduced in 1.15.2. Is there any way to reference internally without using inline LaTeX?
Did you put
link-citations: true
in your YAML metadata (or use --metadata link-citations on
the command line). That should give you clickable
references. It used to be the default, but we changed that.
+++ mgansler [Nov 26 15 03:47 ]:
In [1]d5efa9b, \hyperref was replaced by \hyperlink, so now we don't
have clickable references in our documents. This change was introduced
in 1.15.2. Is there any way to reference internally without using
inline LaTeX?—
Reply to this email directly or [2]view it on GitHub.References
No, we did not. But it doesn't make a difference.
I've created a repository, which demonstrates the issue.
Linking works fine for the base document but not for anything you include with -A. This is because \hypertargetis not created when creating the appendix (because nothing references to it). It worked before pandoc 1.15.2 because \hyperreftargets the label.
EDIT: --metadata link-citations make no difference.
EDIT2: Thank's for the option anyway, it's useful for our project. But I can't find it in the User Guide at all. It was added to Readme.md 5 days ago.
Oh, I see. I had thought you were talking about citations,
but you're just talking about regular internal links.
I don't think we can change back to \hyperref.
The problem with \hyperref is that some of the targets
we need do not correspond to any \label. The change was
motivated by jgm/pandoc-citeproc#174, so you can see the
issue there. We need to be able to link to arbitrary
paragraphs within the bibliography.
We could change the code at
src/Text/Pandoc/Writers/LaTeX.hs line 730
so that hypertargets are produced for all sections, not
just those that are targeted by internal links within the
document. This would produce uglier LaTeX that in the
vast majority of cases won't be needed.
In the case you provided in the test repository, of course,
there's absolutely no reason to use a LaTeX intermediary.
You can just say
pandoc test.md after.md -o test.pdf
and the links will work fine. So I'm curious why you even
need to do things in this convoluted way.
Because we want the Appendix after the Bibliography (I updated the Example).
I'm working on some template for academic papers using pandoc. I know I could change the default Latex template, but I would rather not because it would be harder to maintain.
With recent versions of pandoc-citeproc, you can control the
placement of the bibliography. Just insert
<div id="refs"></div>
where you want it to go (e.g. at the end of he first
document).
+++ mgansler [Nov 26 15 23:26 ]:
Because we want the Appendix after the Bibliography (I updated the
[1]Example).
I'm working on some template for academic papers using pandoc. I know I
could change the default Latex template, but I would rather not because
it would be harder to maintain.—
Reply to this email directly or [2]view it on GitHub.References
That's great news and fixes our problem. So it's up to you now if you want to consider this as an issue or not. Do the \hypertargets{} effect much?
Most helpful comment
Did you put
link-citations: true
in your YAML metadata (or use
--metadata link-citationsonthe command line). That should give you clickable
references. It used to be the default, but we changed that.
+++ mgansler [Nov 26 15 03:47 ]: