[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [patch, ox] Unnumbered headlines
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [patch, ox] Unnumbered headlines |
Date: |
Mon, 22 Sep 2014 17:53:06 +0200 |
Hello,
Rasmus <address@hidden> writes:
> With the last patch it gets weird when you have mixed trees, like this:
>
> * numbered
> ** unnumbered
> :PROPERTIES:
> :UNNUMBERED: t
> :END:
>
> The LaTeX output is:
>
> \section{numbered}
> \label{sec-1}
> \subsection*{unnumbered}
> \label{unnumbered-sec-0-1}
>
> Perhaps it would be nicer to use a single counter rather than two?
> Right now, this
>
> * numbered1
> * unnumbered2
> :PROPERTIES:
> :UNNUMBERED: t
> :END:
> * numbered2
> * unnumbered2
> :PROPERTIES:
> :UNNUMBERED: t
> :END:
>
> produces
>
> \section{numbered1}
> \label{sec-1}
> \section*{unnumbered2}
> \label{unnumbered-sec-1}
> \section{numbered2}
> \label{sec-2}
> \section*{unnumbered2}
> \label{unnumbered-sec-2}
>
> But perhaps this is nicer?
>
> \label{sec-1}
> \label{unnumbered-sec-2}
> \label{sec-3}
> \label{unnumbered-sec-4}
>
> In particular for mixed, nested trees.
I think it would be nice to keep "sec-NUM", with NUM matching current
numbering, for numbered headlines. I'm not against a simple global
counter for unnumbered headlines:
\label{sec-1}
\label{unnumbered-1}
\label{sec-2}
\label{unnumbered-2}
or in the following example
* H1
** H2
:PROPERTIES:
:UNNUMBERED: t
:END:
*** H3
*** H4
* H5
** H6
the labelling scheme
\label{sec-1}
\label{unnumbered-1}
\label{unnumbered-2}
\label{unnumbered-3}
\label{sec-2}
\label{sec-2-1}
>> This is incorrect.
>>
>> #+options: num:nil
>>
>> * Headline
>> :PROPERTIES:
>> :CUSTOM_ID: test
>> :END:
>> This is a link to [[#test]].
>>
>> will produce
>>
>> \section*{Headline}
>> \label{sec-1}
>> This is a link to \hyperref[sec-1]{Headline}.
>
> Is *my statement* incorrect or is the current *output* incorrect?
The former, but see below.
> On my PC, when I refer to an unnumbered headline I get
> \ref{UNNUMBERED}, but since it's after a \section* it will produce
> nothing or a subsequent element. But I *did* forget to try the patch
> with emacs -q and maybe that's why I'm not seeing \hyperref's. . .
Actually, there was a small bug in the code, now fixed. `latex' back-end
is expected to use "hyperref" when headline in unnumbered.
> To be clear: you are happy if it uses the \hyperref[·]{·} in LaTeX,
> but not \ref{·} for unnumbered?
You are the LaTeX expert. Isn't it reasonable?
Regards,
--
Nicolas Goaziou
- Re: [O] [patch, ox] Unnumbered headlines, Rasmus, 2014/09/20
- Re: [O] [patch, ox] Unnumbered headlines, Alan L Tyree, 2014/09/20
- Re: [O] [patch, ox] Unnumbered headlines, Nicolas Goaziou, 2014/09/21
- Re: [O] [patch, ox] Unnumbered headlines, Rasmus, 2014/09/21
- Re: [O] [patch, ox] Unnumbered headlines, Nicolas Goaziou, 2014/09/21
- Re: [O] [patch, ox] Unnumbered headlines, Rasmus, 2014/09/21
- Re: [O] [patch, ox] Unnumbered headlines,
Nicolas Goaziou <=
- Re: [O] [patch, ox] Unnumbered headlines, Rasmus, 2014/09/22
- Re: [O] [patch, ox] Unnumbered headlines, Thomas S. Dye, 2014/09/22
- Re: [O] [patch, ox] Unnumbered headlines, Nicolas Goaziou, 2014/09/26
- Re: [O] [patch, ox] Unnumbered headlines, Rasmus, 2014/09/26
- Re: [O] [patch, ox] Unnumbered headlines, Nicolas Goaziou, 2014/09/27
- Re: [O] [patch, ox] Unnumbered headlines, Rasmus, 2014/09/30