[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Export: Override headline numbering via properties
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [PATCH] Export: Override headline numbering via properties |
Date: |
Mon, 13 May 2013 12:54:36 +0200 |
Hello,
Mark Edgington <address@hidden> writes:
> A couple possible use-cases:
>
> 1. a document (or chapter of a document) where the first headline
> contains general "introduction" information explaining what the rest
> of the document (chapter) is about (similar to an abstract, but not
> identical -- something that might contain sub-headings, lists, tables,
> etc.), and the remainder of the document (chapter) is the "real"
> content of the document -- the place where you want the numbering to
> begin.
You can still number these parts manually with, e.g.,
#+latex: \section*{Introduction}
before the first section in your Org document.
> 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.
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.
Therefore, you need to generate a unique identifier for all headlines,
a function to return it, and modify each back-end accordingly. This is
obviously doable, but it cannot fit in a TINYPATCH.
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.
Regards,
--
Nicolas Goaziou
Re: [O] [PATCH] Export: Override headline numbering via properties, Mark Edgington, 2013/05/13
Message not available