From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Edgington Subject: Re: [PATCH] Export: Override headline numbering via properties Date: Tue, 14 May 2013 00:39:47 -0400 Message-ID: References: <87ppwvtnbw.fsf@gmail.com> <87hai7taj7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uc720-0008VU-UG for emacs-orgmode@gnu.org; Tue, 14 May 2013 00:40:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uc71z-0001sF-Vz for emacs-orgmode@gnu.org; Tue, 14 May 2013 00:40:08 -0400 Received: from mail-ob0-x229.google.com ([2607:f8b0:4003:c01::229]:42415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uc71z-0001s0-RU for emacs-orgmode@gnu.org; Tue, 14 May 2013 00:40:07 -0400 Received: by mail-ob0-f169.google.com with SMTP id vb8so98509obc.14 for ; Mon, 13 May 2013 21:40:07 -0700 (PDT) In-Reply-To: <87hai7taj7.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Hi Nicolas, On Mon, May 13, 2013 at 6:54 AM, Nicolas Goaziou wrote: > > You can still number these parts manually with, e.g., > > #+latex: \section*{Introduction} > > before the first section in your Org document. > While this is possible, wouldn't this break the structure of the org-document, so that a section no longer corresponds to a headline in some cases. Also, when the un-numbered section is at the same level as the top-level headlines, then there would be no way of cleanly folding away its content in emacs. Furthermore, by manually inserting LaTeX code, you make it non-portable for other exporters. >> 2. a document where only one of the headlines and its child-headlines >> halfway through the document should be un-numbered (maybe they >> represent an "example docoument" embedded within an >> instruction-manual). > > I may be wrong, but this sounds like a hypothetical use case to me. I have certainly encountered cases like this, where I will resort to using pure LaTeX, but it would be obviously more convenient to be able to work on such documents via org-mode. > Anyway, your patch will not work on back-ends that rely on Org to > compute section numbers (e.g., ascii, html...) because even if you > ignore numbering for a particular headline, it still adds up internally. > IOW, you also need to patch `org-export--collect-headline-numbering'. > > But that's not quite it, yet. Some back-ends (e.g., html) use that > internal number as a unique identifier for the headline. Actually, the > "artificial restriction" you are talking about is a way to allow every > headline to be numbered in a unique way, even if that number doesn't > appear in the output. I can see what you mean here -- but it doesn't exactly "break" anything -- it just makes the section-numbering within html, etc. documents to be non-consecutive *if these properties are used*. If the main intent is to use these properties in conjunction with the LaTeX exporter, then this isn't a big problem (i.e. those who want to use them will just need to understand that they currently only work "correctly" with LaTeX, but that this will be fixed in the future). > Since I wouldn't use this, I can hardly judge, but I would appreciate > some feedback from other users before we go too far in the > implementation. Agreed, but my (obviously biased) opinion is that it makes manual numbering-control more "natural" within org-mode, and something which doesn't require as much hacking with embedded LaTeX (or HTML, etc.) code. Regards, Mark