[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [patch] Support CUSTOM_ID property in latex export
From: |
Richard Lawrence |
Subject: |
[O] [patch] Support CUSTOM_ID property in latex export |
Date: |
Sat, 15 Feb 2014 12:19:54 -0800 |
User-agent: |
Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu) |
0001-LaTeX-export-support-CUSTOM_ID-property-in-section-l.patch
Description: Patch to support CUSTOM_ID property in latex export
Hi Orgsters,
Here is a patch to add support for using CUSTOM_ID properties for labels
and refs in the LaTeX exporter.
The patch uses the value of CUSTOM_ID when exporting a headline for the
associated \label, and when exporting a link for the associated \ref
command (or whatever).
For example, from this Org file:
===============================================================================
* Headline 1
:PROPERTIES:
:CUSTOM_ID: sec:headline1
:END:
Links to headlines which have no CUSTOM_ID still work normally, like
this one: [[Headline 2]].
* Headline 2
Links to headlines which have a CUSTOM_ID property will use this
value to refer to them:
This link refers to Headline 1 using the builtin syntax for
CUSTOM_ID: [[#sec:headline1]].
This one uses the fuzzy search on the headline text: [[Headline 1]].
===============================================================================
the relevant section is now exported as:
===============================================================================
\section{Headline 1}
\label{sec:headline1}
Links to headlines which have no CUSTOM\(_{\text{ID}}\) still work normally,
like
this one: \ref{sec-2}.
\section{Headline 2}
\label{sec-2}
Links to headlines which have a CUSTOM\(_{\text{ID}}\) property will use this
value to refer to them:
This link refers to Headline 1 using the builtin syntax for
CUSTOM\(_{\text{ID}}\): \ref{sec:headline1}.
This one uses the fuzzy search on the headline text: \ref{sec:headline1}.
===============================================================================
Previously, the label for Headline 1 would have been \label{sec-1}, and
the links under Headline 2 would have been exported as \ref{sec-1}.
This addresses an issue that was raised here, but got no response:
http://thread.gmane.org/gmane.emacs.orgmode/54039
I also need this behavior, which is why I wrote this.
Hope that's helpful!
Best,
Richard
- [O] [patch] Support CUSTOM_ID property in latex export,
Richard Lawrence <=
- Re: [O] [patch] Support CUSTOM_ID property in latex export, Nicolas Goaziou, 2014/02/15
- Re: [O] [patch] Support CUSTOM_ID property in latex export, Richard Lawrence, 2014/02/15
- Re: [O] [patch] Support CUSTOM_ID property in latex export, Nicolas Goaziou, 2014/02/16
- Re: [O] [patch] Support CUSTOM_ID property in latex export, Richard Lawrence, 2014/02/16
- Re: [O] [patch] Support CUSTOM_ID property in latex export, Nicolas Goaziou, 2014/02/18
- Re: [O] [patch] Support CUSTOM_ID property in latex export, Richard Lawrence, 2014/02/18
- Re: [O] [patch] Support CUSTOM_ID property in latex export, Nicolas Goaziou, 2014/02/19
- Re: [O] [patch] Support CUSTOM_ID property in latex export, Richard Lawrence, 2014/02/20
- Re: [O] [patch] Support CUSTOM_ID property in latex export, Richard Lawrence, 2014/02/21
- Re: [O] [patch] Support CUSTOM_ID property in latex export, Nicolas Goaziou, 2014/02/22