emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] ox-html: Allow "Figure %d:", etc. to be styled


From: Kodi Arfer
Subject: Re: [O] [PATCH] ox-html: Allow "Figure %d:", etc. to be styled
Date: Tue, 09 Jul 2013 16:19:30 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7

On 2013 Jul 09 Tue 3:53:26 PM -0400, Nicolas Goaziou <address@hidden> wrote:
Kodi Arfer <address@hidden> writes:

 From a873d204b2c4f3facf2d8658f69764acbd063246 Mon Sep 17 00:00:00 2001
From: Kodi Arfer <address@hidden>
Date: Wed, 3 Jul 2013 17:51:56 -0400
Subject: [PATCH] ox-html: Allow "Figure %d:", etc. to be styled

* lisp/ox-html.el (org-html-paragraph): Wrap "Figure %d:" in
   <span class="figure-number">.
   (org-html-list-of-tables, org-html-table): Wrap "Table %d:" in
    <span class="table-number">.
   (org-html-list-of-listings): Wrap "Listing %d:" in
   <span class="listing-number">.
* doc/org.text (CSS support): Mention .figure-number,
   .listing-number, and .table-number.

Thank you for the patch.

De nada.

Wouldn't it be more future-proof to wrap them within the same CSS entry?
Otherwise, if we ever introduce other caption types, we'll need to
remember to add another entry for it.

Obviously, my question assume it is very unlikely that someone would
want different styles for captions. But I may be wrong.

One case I know of is APA style. Here are some examples from the APA publication manual. "Figure 1" is supposed to be italicized and inline with the caption ( http://i.imgur.com/u6jsfJx.png ), whereas "Table 1" is supposed to be upright and on its own line ( http://i.imgur.com/3gvxEdd.png ). Admittedly, APA style is crazy, and you have to be additionally crazy to want APA style in HTML.

We could still use the same class and then expect people to use selectors to be as specific as they want (e.g., if the generic class is ~.caption-number~, one could use the selector ~caption .caption-number~ for tables and ~figcaption .caption-number~ for figures, at least in HTML5). I think using different classes is actually simpler, though, because then we don't have to keep track of how selectable the different caption types are.

BTW, do you have any news about your FSF papers?

I got an assignment form back from the FSF, and I returned scans of the signed form on July 1, but I haven't heard back since.

I guess there's not much of a hurry. I won't be firing off these little patches as much now that I've released http://arfer.net/daylight .



reply via email to

[Prev in Thread] Current Thread [Next in Thread]