emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Richard Lawrence <richard.lawrence@berkeley.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: [patch] Support CUSTOM_ID property in latex export
Date: Sat, 22 Feb 2014 23:31:02 +0100	[thread overview]
Message-ID: <87k3cmye3d.fsf@gmail.com> (raw)
In-Reply-To: <87a9di7unn.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> (Richard Lawrence's message of "Sat, 22 Feb 2014 12:35:24 -0800")

Richard Lawrence <richard.lawrence@berkeley.edu> writes:

> True, it is explained that CUSTOM_ID must be unique, but not that the
> generated label must be.  I have changed this to:
>
> "You are responsible for ensuring that the value is a valid LaTeX
> \\label key, and that no other \\label commands with the same key appear
> elsewhere in your document."
>
> That seems clearer to me; it forbids e.g. introducing labels with the
> same key on a #+LATEX: line.  Sound good?

Fair enough.

> I can't actually find a clear explanation anywhere of exactly what is
> and isn't allowed in a label key.  All the LaTeX documentation seems to
> just say:
>
> "A key can consist of any sequence of letters, digits, or punctuation
> characters. Upper and lowercase letters are different."
>
> But clearly, the issue is what sort of "punctuation" is allowed.  ":"
> and "_" are OK, but "%" and "$" aren't...is there a definitive list
> somewhere I should refer to?

I don't know any.

> Maybe I should just say the user should have a look at the regexp in
> org-export-solidify-link-text?

Besides alphanumeric characters, this function allows "_", ".", "-" and
":". I think it is safe to assume only these punctuation characters are
allowed.

Also, the docstring should insist on the fact that this limitation only
applies when the variable is non-nil.

>> There is one thing to consider here. We can define the new variable as
>> a back-end options, i.e., add
>>
>>   (:latex-manual-id nil nil org-latex-custom-id-as-label)
>>
>>
>> in the back-end definition (the name of the property doesn't matter
>> much, you can change it).
>
>>
>> This is not strictly necessary, but it allows, for example, to change
>> its value for specific projects (in the publishing sense) without
>> setting the variable globally.
>>
>> If you think it is useful to do so,
>>
>>   (and org-latex-custom-id-as-label
>>
>> should become
>>
>>   (and (plist-get info :latex-manual-id)
>>
>>> +	   (let* ((custom-label (and org-latex-custom-id-as-label
>>> +				    (org-element-property :CUSTOM_ID destination)))
>>
>> Ditto.
>>
>
> OK, that sounds like a good idea, but are these the only changes that
> would be necessary?

Yes.

> Where should the name of the back-end option and its relationship to
> this variable be documented?

Probably in:

  (info "(org) Publishing options")

Unfortunately, only generic and html-specific options are described
there. We could add a LaTeX section (but it wouldn't contain much).


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2014-02-22 22:30 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
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 [this message]
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=87k3cmye3d.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=richard.lawrence@berkeley.edu \
    /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).