From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bill Powell Subject: Re: headline numbering in html export Date: Tue, 02 Feb 2010 09:12:42 -0500 Message-ID: <87zl3rzpyd.wl%bill@billpowellisalive.com> References: <4B67DF92.4040506@ifi.uio.no> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcJTS-0006HH-15 for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 09:11:26 -0500 Received: from [199.232.76.173] (port=49970 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcJTQ-0006H9-Kv for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 09:11:24 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NcJTM-0001lR-Ll for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 09:11:24 -0500 Received: from billpowellisalive.com ([206.130.115.110]:47066) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NcJTL-0001kB-VZ for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 09:11:20 -0500 In-Reply-To: <4B67DF92.4040506@ifi.uio.no> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?UTF-8?B?Ik1hcnRpbiBHLiBTa2rDpnZlbGFuZCI=?= Cc: emacs-orgmode@gnu.org Thanks for sharing this! I'm sure I'll find this useful. Bill Powell At Tue, 02 Feb 2010 09:17:22 +0100, Martin G. Skjæveland wrote: >=20 > Hi, >=20 > I thought I'd share some stuff I'm quite happy with so that others can=20 > enjoy it if it is good, and so that I can stop using or improve it if it = > is not so good! :) >=20 > I am writing a set of exercises for a course and publishing a chapter=20 > once a week in both pdf and html. I like having the exercises for week 2 = > start the headline numbering with 2 (and so on), so for the latex export = > I set the section counter to the appropriate value, in this example=20 > (week 2): >=20 > #+LATEX_HEADER: \setcounter{section}{1} >=20 > For the html export I could not find a similar easy setting, but then I=20 > found that css2 has introduced counters: >=20 > http://www.w3.org/TR/CSS2/generate.html#counters >=20 > So by adding the css stylesheet below, I can start my numbering for html = > in a similar fashion as for pdf export: >=20 > #+STYLE: >=20 >=20 > Thanks! > Martin >=20 > ---------------- >=20 > The stylesheet: >=20 > #+begin_src css :tangle exercises.css > /* > Do not display numbering entered by org-mode, > but use css2 counters instead. > */ > .section-number-2, > .section-number-3, > .section-number-4, > .section-number-5 > { > display: none; > } > h2 > { > counter-reset:subsection; > } > h2:before > { > counter-increment:section; > content:counter(section); > } > h2.footnotes:before > { > content:""; > } > h3 > { > counter-reset:subsubsection; > } > h3:before > { > counter-increment:subsection; > content:counter(section) "." counter(subsection) " "; > } > h4:before > { > counter-increment:subsubsection; > content:counter(section) "." counter(subsection) "."=20 > counter(subsubsection) " "; > } > #+end_src >=20 >=20 > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode >=20