emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Getting "Chapter" before a heading number


From: Peter Davis
Subject: Re: [O] Getting "Chapter" before a heading number
Date: Thu, 29 Dec 2016 17:41:44 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.5.1


On 12/29/16 5:26 PM, Richard Lawrence wrote:
Hi Peter,

Peter Davis <address@hidden> writes:

I'm preparing a proposed table of contents for a book, and I'd like the HTML 
output to appear like:

Chapter 1 Blah
   1.1 blah
   1.2 blah blah
   1.3 blah blah blah

Chapter 2 Blah Blah
   2.1 blah
   2.2 blah blah

etc.

Is there a way to get HTML output to do this? I'd like the "*" at the start of 
a line to denote a new chapter, and nested headings
to go inside. I haven't been able to find anything like this.

This might not be exactly what you want, but it's pretty trivial to do
this with CSS.  In your stylesheet, you want something like (untested):

span.section-number-2:before { content: "Chapter" }

Basically, this tells the browser to put the word "Chapter" before the
number of a first-level headline (which, in a default setup, is exported
as a span tag with class section-number-2).

If you'd rather that "Chapter" appears in the actual HTML, you probably
want to use a filter on headlines during export.

Hope that helps!
Yes, thanks, Richard! This will certainly work for this occasion. It would be great to find a way to do this through org in future, for documents that keep changing, but this will work for now.

Thanks!
-pd




reply via email to

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