Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass the CUSTOM_ID property as custom \label when exporting to latex?

Tags:

emacs

org-mode

I used to be able to pass the CUSTOM_ID property as custom \label once exported to LaTeX. A snippet like this:

* Introduction
  :PROPERTIES:
  :CUSTOM_ID: custom_label
  :END:

Would export to:

\section{Introduction}
\label{sec-1}
\label{custom_label}

I am using Org-mode version 8.2.7c and that is not the case anymore, the org-mode snippet above exports to:

\section{Introduction}
\label{sec-1}

Because of that, I need to add custom labels everywhere, like:

* Introduction
  :PROPERTIES:
  :CUSTOM_ID: custom_label
  :END:
  \label{custom_label}

Is there a better way to pass the CUSTOM_ID property with the new org-latex-export-as-latex way?

Or, more generally, is there a systematic way to pass any PROPERTIES when exporting to LaTeX?

Thank you for any help or pointer I could use.

like image 632
gsl Avatar asked Sep 29 '22 23:09

gsl


1 Answers

Just in case you don't notice @nberth 's answer, In current version Org 8.3.2, do the following

(setq org-latex-prefer-user-labels t)
like image 116
gongzhitaao Avatar answered Oct 03 '22 02:10

gongzhitaao