From: Jarmo Hurri <jarmo.hurri@iki.fi>
To: emacs-orgmode@gnu.org
Subject: Re: HTML export / list issues
Date: Sun, 23 Aug 2015 18:07:56 +0300 [thread overview]
Message-ID: <87si7a82lv.fsf@iki.fi> (raw)
In-Reply-To: 20150821195843.GA4063@eyeBook.home
Rick Frankel <rick@rickster.com> writes:
>> > * 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 (~<ol>~).
Brilliant. Actually, even better, from here
http://stackoverflow.com/questions/12787342/nested-list-styling-how-to-separate-styles
I adopted the following, which produces alphanumeric labels only in the
second level:
ol li ol {
list-style-type: lower-alpha;
}
>> > 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
>>
>> <div class="center">
>> <p>
>> -5
>> </p>
>> </div>
>>
>> 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. ...
My centered elements are actually canvases (the example here was
simplified), but with a bit of digging the following CSS worked for me
(I just dropped the centerings from the org code and centered all
canvases):
canvas
{
display: block;
margin: 0 auto;
}
Thanks!
Jarmo
next prev parent reply other threads:[~2015-08-23 15:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-21 10:58 HTML export / list issues Jarmo Hurri
2015-08-21 12:58 ` Nicolas Goaziou
2015-08-21 19:58 ` Rick Frankel
2015-08-23 15:07 ` Jarmo Hurri [this message]
2015-08-23 14:09 ` Jarmo Hurri
2015-08-23 21:47 ` Nicolas Goaziou
2015-08-24 5:15 ` Jarmo Hurri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87si7a82lv.fsf@iki.fi \
--to=jarmo.hurri@iki.fi \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.