From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: HTML export: feature request Date: Wed, 11 Feb 2009 02:41:48 +0100 Message-ID: <87ocx94un7.fsf@kassiopeya.MSHEIMNETZ> References: <4991FC43.40108@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LX43o-00075R-LC for emacs-orgmode@gnu.org; Tue, 10 Feb 2009 20:38:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LX43m-00075E-Nx for emacs-orgmode@gnu.org; Tue, 10 Feb 2009 20:38:43 -0500 Received: from [199.232.76.173] (port=33238 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LX43m-00075B-JI for emacs-orgmode@gnu.org; Tue, 10 Feb 2009 20:38:42 -0500 Received: from mail.gmx.net ([213.165.64.20]:56795) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LX43m-0001Q9-1s for emacs-orgmode@gnu.org; Tue, 10 Feb 2009 20:38:42 -0500 In-Reply-To: <4991FC43.40108@gmail.com> (Wanrong Lin's message of "Tue, 10 Feb 2009 17:14:27 -0500") 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: Wanrong Lin Cc: emacs-orgmode@gnu.org --=-=-= Wanrong Lin writes: > Hi, > > One problem I have with current HTML export is the section number (like "1", > "2.1", "2.1.2" and etc) is not very distinctive from the actual section > heading. Also, sometimes I wish the sub-section headings are indented. So I > wonder whether we can add the following features: > > 1. Assign a CSS class to the section number, so the section number font and > color can be customized through CSS That would be great indeed:

1 Headline

\------------/ ^ basename | level > 2. Add a variable to control whether sub-sections should be indented in the > export, and by how much. This is possible through CSS more easy and flexible (different projects, different designs): .outline-2 h2 {} Ahh - Carsten, would it easy to add a new class here?

1 blabla

^ Here -----------' the We could the indent the text independently from the headline (or add additional indentation to the sections body). The appended patch does both of these. Add a class to the section number, and a class to the container of the sections content. Regards, Sebastian --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 69ebdbc..4e5f2e5 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -4646,12 +4646,12 @@ When TITLE is nil, just close all open levels." (insert "
    \n
  • " title "
    \n")))) (aset org-levels-open (1- level) t) (setq snumber (org-section-number level)) - (if (and org-export-with-section-numbers (not body-only)) - (setq title (concat snumber " " title))) (setq level (+ level org-export-html-toplevel-hlevel -1)) + (if (and org-export-with-section-numbers (not body-only)) + (setq title (concat "" snumber " " title))) (unless (= head-count 1) (insert "\n
\n")) - (insert (format "\n
\n%s%s\n
\n" - snumber level level snumber extra-targets title level snumber)) + (insert (format "\n
\n%s%s\n
-- Sebastian Rose, EMMA STIL - mediendesign, Niemeyerstr.6, 30449 Hannover Tel.: +49 (0)511 - 36 58 472 Fax: +49 (0)1805 - 233633 - 11044 mobil: +49 (0)173 - 83 93 417 Http: www.emma-stil.de --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--