From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Re: Getting "Chapter" before a heading number Date: Thu, 29 Dec 2016 14:26:02 -0800 Message-ID: <87a8bepe2t.fsf@aquinas.i-did-not-set--mail-host-address--so-tickle-me> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMj7H-0003o6-QE for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 17:24:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMj7D-0006tP-P4 for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 17:24:07 -0500 Received: from mail-it0-x234.google.com ([2607:f8b0:4001:c0b::234]:38692) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cMj7D-0006sS-Jn for emacs-orgmode@gnu.org; Thu, 29 Dec 2016 17:24:03 -0500 Received: by mail-it0-x234.google.com with SMTP id x2so221145112itf.1 for ; Thu, 29 Dec 2016 14:24:01 -0800 (PST) In-Reply-To: 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: Peter Davis , emacs-orgmode@gnu.org 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! Best, Richard