|
From: | Max Nikulin |
Subject: | Re: Exporting Hyperlinks ? |
Date: | Wed, 8 Nov 2023 17:50:19 +0700 |
User-agent: | Mozilla Thunderbird |
On 08/11/2023 16:37, Ihor Radchenko wrote:
Max Nikulin writes:It would be nice to have a LaTeX package that redefines \label to generated \hypertarget from its argument.Can't we simply generate a pair of \label + \hypertarget when generating .tex files in ox-latex? This way, we can make sure that labels in Org-generated pdfs will be linkable from outside world.
I still have a hope that somebody can point us how to leverage hyperref facilities. Adding \hypertarget is a step forward, but ideally internal links generated by \ref, links in table of contents, PDF bookmarks (table of contents side bar) should consistently use #custom_id anchors as well. Usual #section.5 should be a fallback for cases with no user supplied labels.
I think that generating \hypertarget + converting .org file links to .pdf links will already be a good improvement. Using xr-hyper requires knowledge of external files we link to and thus can only be used during publishing, where we have all the information about multiple exported Org documents available.
I agree that some complications exist. Just like with HTML files for Org ones with <file:another.org::*heading> links. Several iterations of tex files compilation are required. .aux files for all .tex files must be available to get cross-file links working.
[Prev in Thread] | Current Thread | [Next in Thread] |