emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan L Tyree <alantyree@gmail.com>
To: emacs-orgmode@gnu.org
Cc: rasmus@gmx.us
Subject: Re: [patch, ox] Unnumbered headlines
Date: Sat, 09 Aug 2014 08:35:37 +1000	[thread overview]
Message-ID: <53E550B9.5000601@gmail.com> (raw)
In-Reply-To: <87lhqzyubg.fsf@gmx.us>


On 08/08/14 23:39, Rasmus wrote:
> Hi,
>
> In a recent thread¹ Tom and Alan mention that authors sometimes need
> unnumbered headlines, e.g. for prefaces.  This patch (tries to) add
> this feature via the tag :nonumber: (customizable via Custom or
> in-file).
>
> I make two assumptions.  First, the tag is recursive, so if the parent
> is not numbered the child is not numbered.  Secondly, I depart from
> the LaTeX tradition of ignoring unnumbered headlines in the TOC
> (except in the case of ox-latex.el where it depends on
> org-latex-classes).  (See example below).
>
> Needless to say such a feature needs to be discussed and I not sure
> whether the greater Org community finds it useful or needless clutter.
>
> In my opinion a :nonumber: tag is a natural continuation of :export:
> and :noexport: and unlike :ignoreheading: the implementation is fairly
> clean (or maybe I'm cheating myself here).  A reason for why to
> include it is that it seems relatively easy to do *during* export, but
> it's hard to consistently get it right on in both headlines and the
> TOC via filters.
>
> The patch is messing with ox.el, and thus I would appreciate a review
> and potentially testing, in the case that it is agreed that such a
> feature would be OK to add to ox.
>
> It seems to work well with ox-latex.el, ox-ascii.el and ox-html.el.
> It doesn't play well with ox-odt.el (headlines are still numbered).  I
> will fix this as well as adding documentation if a consensus of the
> worthwhileness of the patch can be reached.
>
> Finally, here's an example output using ox-ascii
>
> #+begin_src org
>      * a (not numbered)	              :nonum:
>      ** aa (not numbert)
>      * b (1)
>      ** ba (not numbered)	      :nonum:
>      *** baa (not numbered)
>      ** bb (1.1)
>
> #+end_src
>
> #+RESULTS: (TOC only, but the rest is as expected)
>      a (not numbered)
>      .. aa (not numbert)
>      1 b (1)
>      .. ba (not numbered)
>      ..... baa (not numbered)
>      .. 1.1 bb (1.1)
>
>
> Thanks,
> Rasmus
>
> Footnotes:
> ¹   http://permalink.gmane.org/gmane.emacs.orgmode/89515
>
> --
> Vote for proprietary math!
Rasmus, you're my hero!

Regarding the two assumptions:

- Recursive tags: I think this is correct. I don't think it matters too 
much for my use case since things like the Preface will ordinarily be 
top level headlines and unlikely to have children. If there are child 
headlines, then I don't see why numbering would be required.

- Table of contents: I'm sure this is correct. I always ended up adding 
to the TOC when using LaTeX anyway.

The frontmatter of a book has two distinct types of pages:
   - title pages, copyright pages and so forth. If these pages are 
headlined at all, then the :ignore: tag and Eric's filter takes care of 
them;

   - things like the Preface, Forward and (in my case) Table of Statutes 
and Table of cases. This type wants to be referenced in the TOC but they 
definitely do not want to be sequentially numbered as chapters.

The Wikipedia entry on Book Design lists 12 types of frontmatter pages: 
http://en.wikipedia.org/wiki/Book_design. It's easy to see which ones 
fit into which category.

I think this facility will *greatly* enhance org-mode for book 
authors/publishers. It will certainly make the conversion to ePub go 
more smoothly.

Cheers,
Alan


-- 
Alan L Tyree                    http://www2.austlii.edu.au/~alan
Tel:  04 2748 6206              sip:typhoon@iptel.org

  reply	other threads:[~2014-08-08 22:35 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 13:39 [patch, ox] Unnumbered headlines Rasmus
2014-08-08 22:35 ` Alan L Tyree [this message]
2014-08-09  1:04 ` [patch, ox] Unnumbered headlines - early test Alan L Tyree
2014-08-09  7:47 ` [patch, ox] Unnumbered headlines Detlef Steuer
2014-08-11 14:18 ` Nicolas Goaziou
2014-08-11 15:37   ` Rasmus
2014-08-12  8:58     ` Nicolas Goaziou
2014-09-20 16:02       ` Rasmus
2014-09-20 20:34         ` Alan L Tyree
2014-09-21 13:12         ` Nicolas Goaziou
2014-09-21 14:37           ` Rasmus
2014-09-21 19:40             ` Nicolas Goaziou
2014-09-21 20:13               ` Rasmus
2014-09-22 15:53                 ` Nicolas Goaziou
2014-09-23  0:35                   ` Rasmus
2014-09-23  1:10                     ` Thomas S. Dye
2014-09-26  7:51                     ` Nicolas Goaziou
2014-09-26 13:48                       ` Rasmus
2014-09-27  8:19                         ` Nicolas Goaziou
2014-09-30 22:54                       ` Rasmus
2014-10-02  0:35                         ` Rasmus
2014-10-03  7:56                         ` Nicolas Goaziou
2014-10-03  8:49                           ` Sebastien Vauban
2014-10-03 10:26                           ` Rasmus
2014-10-03 20:14                             ` Nicolas Goaziou
2014-10-03 20:31                               ` Rasmus
2014-10-05  8:06                                 ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53E550B9.5000601@gmail.com \
    --to=alantyree@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rasmus@gmx.us \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).