emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* orgmode latex export: reference to label rather than section
@ 2012-06-18 10:35 Thomas Alexander Gerds
  0 siblings, 0 replies; only message in thread
From: Thomas Alexander Gerds @ 2012-06-18 10:35 UTC (permalink / raw)
  To: emacs-orgmode

Hi

I would be grateful if someone could help me sort out my confusion
regarding references to headings (sections) in latex export.

I am used to latex section labels and references via reftex, e.g. 

,----
| \section{This is a test}
| \label{sec:testit}
| 
| In Section \ref{sec:testit}
`----

To achieve this in orgmode it seems that one should set

,----
| (setq org-export-latex-hyperref-format "\\ref{%s}")
`----

and then write:

,----
| * This is a test
| 
| In Section [[This is a test]]
`----

This seems to work! 

However, if I later change the specific section title ("This is a
test"), then I have to remember to also change all links [[references]]
to this section. I feel this is a potential source of error and would
therefore prefer to explicitly set and refer to a label for this
section. But, the following statement

,----
| #+LABEL: sec:testit
| * This is a test
`----

is exported as 

,----
| \section{This is a test}
| \label{sec-2}
`----

so, my label is ignored.

Is there a workaround for this?

Thanks,
Thomas

ps: running orgmode version 7.8.11 on emacs version 23.3.1 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-06-18 10:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-18 10:35 orgmode latex export: reference to label rather than section Thomas Alexander Gerds

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).