emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Change section (headings) numbering style
@ 2014-01-14  8:36 Axel E. Retif
  2014-01-14  8:39 ` Sebastien Vauban
  2014-01-14 12:43 ` Vladimir Lomov
  0 siblings, 2 replies; 6+ messages in thread
From: Axel E. Retif @ 2014-01-14  8:36 UTC (permalink / raw)
  To: emacs-orgmode

Greetings!

I need to change the numbering style of the first level sections (*) in 
the exported html file.

Right now they are exported as

1 First section              ;; for * First section

1.1 First subsection         ;; for ** First subsection

etc.

For the first part of the document that's all right, but for the next 
part I need

A First new section          ;; for * First new section

A.1 First new subsection     ;; for ** First new subsection

and so on.

I've tried with different combinations of #+ATTR_HTML and #+OPTIONS with 
section-number-2 with no success.

TIA


Best,

Axel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Change section (headings) numbering style
  2014-01-14  8:36 Change section (headings) numbering style Axel E. Retif
@ 2014-01-14  8:39 ` Sebastien Vauban
  2014-01-14  9:18   ` Axel E. Retif
  2014-01-14 12:43 ` Vladimir Lomov
  1 sibling, 1 reply; 6+ messages in thread
From: Sebastien Vauban @ 2014-01-14  8:39 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

"Axel E. Retif" wrote:
> I need to change the numbering style of the first level sections (*) in the
> exported html file.
>
> Right now they are exported as
>
> 1 First section              ;; for * First section
>
> 1.1 First subsection         ;; for ** First subsection
>
> etc.
>
> For the first part of the document that's all right, but for the next part
> I need
>
> A First new section          ;; for * First new section
>
> A.1 First new subsection     ;; for ** First new subsection
>
> and so on.
>
> I've tried with different combinations of #+ATTR_HTML and #+OPTIONS with
> section-number-2 with no success.

AFAICT, this is not possible right now. Though, you have a fallback in
the name of jQuery, for example (or JavaScript, in general).

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Change section (headings) numbering style
  2014-01-14  8:39 ` Sebastien Vauban
@ 2014-01-14  9:18   ` Axel E. Retif
  0 siblings, 0 replies; 6+ messages in thread
From: Axel E. Retif @ 2014-01-14  9:18 UTC (permalink / raw)
  To: Sebastien Vauban, emacs-orgmode

On 01/14/2014 02:39 AM, Sebastien Vauban wrote:

> "Axel E. Retif" wrote:
>> I need to change the numbering style [from arabic to Alpha] of the
>> first level sections (*) in the exported html file.

[...]

> AFAICT, this is not possible right now. Though, you have a fallback
> in the name of jQuery, for example (or JavaScript, in general).

Thank you very much! I have to confess, though, that I don't know 
anything about JavaScript.

I don't even know html! The only markup language I know is LaTeX!


Thank you again and best regards

Axel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Change section (headings) numbering style
  2014-01-14  8:36 Change section (headings) numbering style Axel E. Retif
  2014-01-14  8:39 ` Sebastien Vauban
@ 2014-01-14 12:43 ` Vladimir Lomov
  2014-01-14 20:04   ` Axel E. Retif
  2014-01-14 21:49   ` Axel E. Retif
  1 sibling, 2 replies; 6+ messages in thread
From: Vladimir Lomov @ 2014-01-14 12:43 UTC (permalink / raw)
  To: emacs-orgmode

Hello,
** Axel E. Retif [2014-01-14 02:36:30 -0600]:

> Greetings!

> I need to change the numbering style of the first level sections (*) in the
> exported html file.

> Right now they are exported as

> 1 First section              ;; for * First section

> 1.1 First subsection         ;; for ** First subsection

> etc.

> For the first part of the document that's all right, but for the next part I
> need

> A First new section          ;; for * First new section

> A.1 First new subsection     ;; for ** First new subsection

> and so on.

> I've tried with different combinations of #+ATTR_HTML and #+OPTIONS with
> section-number-2 with no success.

I can suggest CSS way to accomplish this. I checked that it works with
firefox, but not sure for other browsers.

Minimal Org example:
#+BEGIN_SRC org

#+TITLE: An example
  ,#+OPTIONS: num:nil
  ,#+HTML_HEAD_EXTRA: <link rel="stylesheet" type="text/css" href="ex.css"/>

  ,* This is title on top level

  Text for document body.

  ,** Title for subtop level

  Text for body of subtop level.

  ,* This is title of next top level heading

  Text text text.

  ,** Title of second order

  Text text text.
#+END_SRC

Additional CSS
#+BEGIN_SRC css

body {
  counter-reset: level;
}
#table-of-contents > h2:before {
  content: normal;
  counter-increment: level;
}
h2:before {
  content: counter(level, upper-latin) "  ";
  counter-increment: level;
}
h2 {
  counter-reset: sublevel;
}
h3:before {
  content: counter(level, upper-latin) "." counter(sublevel) "  ";
  counter-increment: sublevel;
}
#+END_SRC

Note, that use have to turn off 'automatic' numbering when exporting
from Org, this is because export routine inserts numbers 'by-hand' don't
relying on CSS (imho, not bad because there are browsers that don't
support CSS, but it would be great to have option to switch this
on/off).

Second, in example only headings of two levels (top, subtop) will have
desired format.

---
WBR, Vladimir Lomov


-- 
The difference between the right word and the almost right word is the
difference between lightning and the lightning bug.
		-- Mark Twain

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Change section (headings) numbering style
  2014-01-14 12:43 ` Vladimir Lomov
@ 2014-01-14 20:04   ` Axel E. Retif
  2014-01-14 21:49   ` Axel E. Retif
  1 sibling, 0 replies; 6+ messages in thread
From: Axel E. Retif @ 2014-01-14 20:04 UTC (permalink / raw)
  To: Vladimir Lomov, emacs-orgmode

On 01/14/2014 06:43 AM, Vladimir Lomov wrote:

> Hello, ** Axel E. Retif [2014-01-14 02:36:30 -0600]:
>
>> I need to change the numbering style of the first level sections
>> (*) in the exported html file.

[...]

> I can suggest CSS way to accomplish this. I checked that it works
> with firefox, but not sure for other browsers.

Sorry for not replying earlier ---I wasn't around.

I'll try to use your kind suggestion.

Thank you so much for digging into this!


Best

Axel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Change section (headings) numbering style
  2014-01-14 12:43 ` Vladimir Lomov
  2014-01-14 20:04   ` Axel E. Retif
@ 2014-01-14 21:49   ` Axel E. Retif
  1 sibling, 0 replies; 6+ messages in thread
From: Axel E. Retif @ 2014-01-14 21:49 UTC (permalink / raw)
  To: Vladimir Lomov, emacs-orgmode

On 01/14/2014 06:43 AM, Vladimir Lomov wrote:

[...]

> I can suggest CSS way to accomplish this.  [...]

It works! Thank you very much!

I have to export separately the arabic-numbered and alpha-numbered 
parts, but that's all right.


Thanks again!

Axel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-14 21:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-14  8:36 Change section (headings) numbering style Axel E. Retif
2014-01-14  8:39 ` Sebastien Vauban
2014-01-14  9:18   ` Axel E. Retif
2014-01-14 12:43 ` Vladimir Lomov
2014-01-14 20:04   ` Axel E. Retif
2014-01-14 21:49   ` Axel E. Retif

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).