emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Target and link text normalised to `orgtargetn'


From: Rasmus
Subject: Re: [O] Target and link text normalised to `orgtargetn'
Date: Mon, 20 Apr 2015 10:55:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> Rasmus <address@hidden> writes:
>
>> That's what I meant.  Or rather a wrapper like org-latex--label.  A
>> mapping like the one that was reverted for ox-latex only.  Or are there
>> pitfalls in that approach?
>
> It will not give you predictability either since you cannot guess "4" in
> "sec:4".

That's fine.

> Also, it is dangerous since a user could use \label{sec:4} for something
> different.

So we could replace ^org with a mapping, e.g. "headline" → "sec:" and
"table" → "tab:".  Then there's the added safety of TYPE-NUMBER and the
expected prefix.

> What is the real benefit of "sec:4" over "orgheadline4"? Aesthetics?

Mostly aesthetics.  "sec:4" is expected, though I have no numbers to back
this claim.

I would expect breakage following the change to be pretty rare, but one
example of breakage is fancyref:

    \documentclass{article}
    \usepackage{fancyref}
    \begin{document}
    \section{h1}
    \label{sec:h1}
    \section{h2}
    \label{orgheading2}
    See \fref{sec:h1} and \fref{orgheading2}
    \end{document}

>> It does not IMO. I would rather not label sections manually.
>
> I don't understand that part. Would you mind elaborating a bit?

Given my taste for "standard" prefixes, I would rather not have to label
every section with some custom id to get a standard prefix in the output.

—Rasmus

-- 
I almost cut my hair, it happened just the other day



reply via email to

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