emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Peter Davis <pfdavis@fastmail.fm>
To: Richard Lawrence <richard.lawrence@berkeley.edu>,
	Peter Davis <pfd@pfdstudio.com>,
	emacs-orgmode@gnu.org
Subject: Re: Getting "Chapter" before a heading number
Date: Thu, 29 Dec 2016 17:41:44 -0500	[thread overview]
Message-ID: <38a36f4a-9a2e-6a4f-7c67-0738a8ca2a52@fastmail.fm> (raw)
In-Reply-To: <87a8bepe2t.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me>


On 12/29/16 5:26 PM, Richard Lawrence wrote:
> Hi Peter,
>
> Peter Davis <pfd@pfdstudio.com> 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	other threads:[~2016-12-29 22:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-29 19:54 Getting "Chapter" before a heading number Peter Davis
2016-12-29 22:26 ` Richard Lawrence
2016-12-29 22:41   ` Peter Davis [this message]
2016-12-31 14:23     ` Nicolas Goaziou
2016-12-31 14:40       ` Peter Davis
  -- strict thread matches above, loose matches on Subject: below --
2016-12-30 19:21 Peter Davis

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=38a36f4a-9a2e-6a4f-7c67-0738a8ca2a52@fastmail.fm \
    --to=pfdavis@fastmail.fm \
    --cc=emacs-orgmode@gnu.org \
    --cc=pfd@pfdstudio.com \
    --cc=richard.lawrence@berkeley.edu \
    /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).