3

I have a problem with the export of external links in org files to pdf and html files.

Let's say I have the two org files in the same directory:

file1.org =

here is the label of file1:  <<label>>

and file2.org =

go to the label of file1: [[file:./file1.org::label]]

After exporting: Both links of file2.html and file2.pdf don't work.

Both variables org-latex-prefer-user-labels and org-html-prefer-user-labels are t. So the labels are constructed with the correct name (also correct format?):

In file1.html:

here is the label of file1:  <a id="label"></a>

In file1.tex:

here is the label of file1:  \label{label}

In file2.html:

go to the label of file1: <a href="./file1.html#MissingReference">./file1.html#MissingReference</a>

The linked file is here correct (file1.html) but the label isn't found.

In file2.tex:

go to the label of file1: \url{./file1.org}

The org file is linked not the pdf file. So even the linked file is here wrong.

What I've tried is using the CUSTOM_ID as label. This works perfectly with the html export but not with the pdf export. And I prefer the <<..>> labels because they are more flexible.

Any Idea to solve the problem? Should I use another link format? (Org version: 9.4.4)

4
  • 1
    Cool question!! Thank you for asking!! – Melioratus Feb 10 at 21:00
  • 2
    @Melioratus if you find this question interesting, you can give it a vote to show your thanks ;) – Tyler Mar 26 at 19:02
  • Upvoted interesting question, done! – Melioratus Mar 26 at 19:46
  • Thanks! I hope someone can help. – rl1 Mar 27 at 10:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.