emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Lawrence <richard.lawrence@berkeley.edu>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [patch] Support CUSTOM_ID property in latex export
Date: Sat, 15 Feb 2014 15:43:48 -0800	[thread overview]
Message-ID: <87vbwggcwb.fsf@berkeley.edu> (raw)
In-Reply-To: <87mwhsro6c.fsf@gmail.com>

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Richard Lawrence <richard.lawrence@berkeley.edu> writes:
>
>> Here is a patch to add support for using CUSTOM_ID properties for labels
>> and refs in the LaTeX exporter.
>
> Thank you for the patch. Though, I don't understand why it is needed.
>
>> I also need this behavior, which is why I wrote this.
>
> Would you mind explaining your use case?
>
> From a user's perspective, CUSTOM_ID allows an user to refer to
> a particular headline with a specific internal link type. How this is
> done internally is something different, which belong to the
> implementation level.

Sure.  I apologize -- I should have said more about this in my previous
email than just referring to that old post.

I am presently using Org to write my dissertation, which I compile using
the LaTeX exporter.  This means I am writing long documents with
embedded LaTeX blocks.  (Maybe this is ill-advised, but it has worked
great so far!)

Basically, I want control over how the labeling is done in the exported
document for two reasons:

1) Sometimes I need to refer to a section from within an embedded LaTeX
block.  In that case, I need to know the appropriate label to use at the
LaTeX level, not just in Org.  For example:

* A headline
  :PROPERTIES:
  :CUSTOM_ID: sec:a-headline
  :END:

# ... stuff ...

#+BEGIN_LATEX
% ... more stuff ...
(see section~\ref{sec:a-headline})
#+END_LATEX

This is not possible with the present section labeling in LaTeX export,
because I have no way of forcing Org to use a particular label for a
section.

2) I hope this doesn't happen, but there may come a time when I need to
move away from Org and just use straight LaTeX.  Having control over the
labeling will make this transition much easier, because it means I won't
have to worry about manually changing the labels in a long document from
Org's default "sec-..." numbering to my own semantic labels.

Right now, I am at a risk of losing a lot of information if I have to
make this transition, because my CUSTOM_ID values don't have any effect
on the generated LaTeX.  Being able to set section labels as needed from
within Org would reduce this risk and therefore allow me to put this
transition off longer.

Another reason (not mine, but someone else might care) is:

3) This will make the LaTeX exporter's behavior more consistent with the
HTML exporter's behavior.  The HTML exporter will use CUSTOM_ID if it is
supplied to construct the id attributes of headlines and divs.  If
someone is relying on this behavior of the HTML exporter, they might be
unpleasantly surprised by the LaTeX exporter's behavior.

Does all that seem reasonable?
  
Best,
Richard

  reply	other threads:[~2014-02-15 23:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-15 20:19 [patch] Support CUSTOM_ID property in latex export Richard Lawrence
2014-02-15 22:44 ` Nicolas Goaziou
2014-02-15 23:43   ` Richard Lawrence [this message]
2014-02-16  9:10     ` Nicolas Goaziou
2014-02-16 20:10       ` Richard Lawrence
2014-02-18 21:56         ` Nicolas Goaziou
2014-02-18 22:35           ` Richard Lawrence
2014-02-19 12:43             ` Nicolas Goaziou
2014-02-20  5:04               ` Richard Lawrence
2014-02-21 19:35               ` Richard Lawrence
2014-02-22  9:24                 ` Nicolas Goaziou
2014-02-22 20:35                   ` Richard Lawrence
2014-02-22 22:31                     ` Nicolas Goaziou
2014-02-23  0:37                   ` Richard Lawrence
2014-02-23  8:37                     ` Nicolas Goaziou
2014-02-23  8:53                     ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbwggcwb.fsf@berkeley.edu \
    --to=richard.lawrence@berkeley.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).