emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [patch, ox] Unnumbered headlines


From: Rasmus
Subject: Re: [O] [patch, ox] Unnumbered headlines
Date: Fri, 26 Sep 2014 15:48:11 +0200
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux)

Hi Nicolas,

Thanks for all time you've put into the comments.  I appreciate it,
and I will try to revise the patches over the weekend.

Nicolas Goaziou <address@hidden> writes:

>> Using this file:
>>
>>     * h1
>>     :PROPERTIES:
>>     :CUSTOM_ID: h1
>>     :END:
>>     ** h2
>>     :PROPERTIES:
>>     :unnumbered: t
>>     :CUSTOM_ID: h2
>>     :END:
>>     *** h3
>>     *** h4
>>     * h5
>>     :PROPERTIES:
>>     :CUSTOM_ID: h5
>>     :END:
>>     [[*h1]] [[#h2]] [[*h4]] [[#h5]]
>>     ** h6
>>
>> The output is now
>>
>>     \section{h1}
>>     \label{sec-1}
>>     \subsection*{h2}
>>     \label{unnumbered-1}
>>     \subsubsection*{h3}
>>     \label{unnumbered-2}
>>     \subsubsection*{h4}
>>     \label{unnumbered-3}
>>     \section{h5}
>>     \label{sec-2}
>>     \ref{sec-1} \hyperref[unnumbered-1]{h2}
>> \hyperref[unnumbered-3]{h4} \ref{sec-2}
>>     \subsection{h6}
>>     \label{sec-2-1}
>>
>> Which I think is quite good.
>
> I agree.

I worry about this approach based on some observations Alan sent
off-list.  When you export the quoted document with num:nil all labels
will be of the form "unnumbered-N", loosing all structure in labels.

Also, some labels are still unassigned in html for unnumbered
headlines, e.g. the "text-" (which is a function of parents' section
numbers) and outline-container-sec-.

Do you think it's better to solve the remaining issues, and accept
that when num:nil exported documents will be quite altered compared to
previously, or should I try to introduce a more informative ID for
numbered an unnumbered headlines alike?

If following the latter path, the most obvious approach (to me) would
be to have a separate :headline-id
and :headline-numbering.  :headline-id could be collected using
something like `org-export--collect-headline-numbering', but labels
would not necessarily reflect the printed section numbers,
though :headline-numbering would still be "correct".

What do you think?

—Rasmus

-- 
. . . It begins of course with The Internet.  A Net of Peers



reply via email to

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