From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Davis Subject: Re: Getting "Chapter" before a heading number Date: Thu, 29 Dec 2016 17:41:44 -0500 Message-ID: <38a36f4a-9a2e-6a4f-7c67-0738a8ca2a52@fastmail.fm> References: <87a8bepe2t.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36892) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMjOR-0007pN-Tx for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 17:41:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMjOO-00007o-Os for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 17:41:51 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:45115) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cMjOO-00005e-HW for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 17:41:48 -0500 In-Reply-To: <87a8bepe2t.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> 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" To: Richard Lawrence , Peter Davis , emacs-orgmode@gnu.org On 12/29/16 5:26 PM, Richard Lawrence wrote: > Hi Peter, > > Peter Davis 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