[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [new exporter] what is the label syntax for LaTeX export?

From: Myles English
Subject: Re: [O] [new exporter] what is the label syntax for LaTeX export?
Date: Wed, 07 Nov 2012 22:46:16 +0000
User-agent: mu4e; emacs 24.2.1

Nicolas Goaziou writes:

>> One problem I am having is that the exported LaTeX replaces the ":" with
>> a "-" to become \ref{tab-niceone} which precludes the use of (e.g.)
>> \autoref which would need to know that the thing being referenced was a
>> table by recognising the "tab:", no?  I am sure there is a good reason
>> for this, can you say why?
> This is due to one of the few functions that was brought from the old
> exporter: `org-export-solidify-link-text'.
> That's because targets (that is <<...>> or #+NAME: ...) have no
> limitation on the characters allowed in their value, which can lead to
> problems when translated into foreign code (i.e. an % sign in the target
> when using the latex back-end).

Thanks for the explanation.

> So, the function replaces forbidden characters with hyphens.
> Besides using filters, a solution might be either:

(I haven't actually made any progress on a solution using filters.  I
was expecting it to be a little convoluted though; splitting on the
first hyphen and joining on a colon.)

Not sure if you are showing me two options you are thinking of
implementing here or suggesting two things I can do myself:

> 1. to remove colons from the forbidden characters.

If no backends would mind dealing with a colon (I don't know them well
enough to be able to decide) then this would be preferable.

> 2. to limit the characters allowed in targets and remove
>    `org-export-solidify-link-text' altogether.

This option could restrict future backends, or other (future?) latex

The first option seems most appropriate because a character should only
be restricted if there is a good reason (e.g. a backend would not like
it) rather than forbidding every character and only allowing it if there
is a good reason to.

As to whether my use case is a good reason to allow colons: I have no
idea how many people use the \autoref or \nameref thing.

> Regards,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]