From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: Re: HTML export / list issues Date: Fri, 21 Aug 2015 15:58:43 -0400 Message-ID: <20150821195843.GA4063@eyeBook.home> References: <87pp2gsybm.fsf@iki.fi> <87fv3col1g.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSsXd-000271-7T for emacs-orgmode@gnu.org; Fri, 21 Aug 2015 16:03:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSsXZ-0006bs-So for emacs-orgmode@gnu.org; Fri, 21 Aug 2015 16:03:57 -0400 Received: from mail.rickster.com ([204.62.15.78]:49589) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSsXZ-0006bk-Pi for emacs-orgmode@gnu.org; Fri, 21 Aug 2015 16:03:53 -0400 Content-Disposition: inline In-Reply-To: <87fv3col1g.fsf@nicolasgoaziou.fr> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Jarmo Hurri On Fri, Aug 21, 2015 at 02:58:35PM +0200, Nicolas Goaziou wrote: > Hello, > > Jarmo Hurri writes: > > > Below is a (hopefully) self-explanatory org file of my problem and the > > associated html export. > > > > Jarmo > > > > * Problem description > > The examples below illustrate three problems I have with lists and > > html export at the moment. > > 1. lists alphabetized in org are enumerated in html > > Actually this is a wrong assumption. Org only distinguishes enumerated, > itemized and description lists. There are no sub-categories. > > In the buffer, you may write an enumerated list item "1.", "1)", "a.", > "A.", "a)" or "A)", but they are all the same. > > For this kind of thing, setting an appropriate CSS could be an option. Correct. try ~list-style-type: lower-alpha;~ in your css to get lowercase alphanumeric labels for an enumerated list (~
    ~). > > 2. code evaluation breaks list continuation > > 3. centering of raw html does not work using begin center and > > end center > > * Example > > I am making a hierarchical list with some code in it. > > 1. level 1 first > > a) level 2 first; I was hoping this would be alphabetized in html > > like it is in org, but it is still enumerated > > b) the next item has some code in it; it has been evaluated with > > C-c C-c to obtain the result > > c) > > #+BEGIN_SRC elisp :exports results > > (+ 1 2) > > #+END_SRC > > > > #+RESULTS: > > : 3 > > This is because "a)" is not recognized as a list item in your buffer. > > Make sure you have a non-nil `org-list-allow-alphabetical' and > `org-plain-list-ordered-item-terminator' is either t or ?). These > variables need to be set before Org is loaded. If you set them in > current session, make sure to reload Org. > > > 2. here is another element with some code; I am trying to center the > > result of the evalution of this code in html > > #+NAME: code-example > > #+BEGIN_SRC elisp :exports results :results raw > > (- 9 14) #+END_SRC > > > > #+BEGIN_CENTER > > #+RESULTS: code-example > > -5 > > #+END_CENTER > > 3. but for some reason the result is not centered > > This generates > >
    >

    > -5 >

    >
    > > perhaps someone more versed in HTML could tell what is wrong here. I would assume it's because there is no css for ~div.center~. Try (untested): div.center > p { text-align: center; } Note that this will center each line, separately. To center the entire paragraph as a block is more complex. This will do if if you specify the paragraph width. div.center > p { margin-left: auto; margin-right: auto; width: {X}em; } See http://www.w3.org/Style/Examples/007/center#viewport3 for a CSS3 (less backward compatible) approach. that doesn't require setting the width of the paragraph. I usually just set a left margin or padding as opposed to trying to float the block in the middle. (e.g. ~margin-left: 2em~.) rick