0

When linking to a heading containing <<foo>> using the syntax [[foo]], M-x org-html-export-to-html generates a link using section number as the link text: <a href="#org6bfafed">2.1.4</a>.

enter image description here

Is it possible to configure the exporter such that instead of "2.1.4" it uses "foo" as the link text?

(I know I can also achieve this laboriously by rewriting all links to be of the form [[foo][foo]] - but that's obviously not the ideal solution).

1 Answer 1

1

I found a different way of achieving this: disable section numbering entirely using #+OPTIONS: num:nil (see How to eliminate the html headline number?) which has the effect of forcing the exporter to use link text as-is.

Note:

  • When using org-html-export-to-html I get No description for this link
  • However, this is not the case with org-pandoc-export-to-html5-and-open

But then the Pandoc exporter is not as rich as the original exporter. So this solution is not ideal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.