Re: [O] Numbering only *some* subheadings?

2015-04-30 Thread Rasmus
Hi Matt,

Matt Price  writes:

> Is this possible? Anyone have a suggestion?

It is not possible in Org since one of the basic assumptions of the
UNNUMBERED property is that it is inherited from parent(s).  I think this
is the right design choice in most cases.  Perhaps it should be possible
to explicitly override this choice with something like the following:

* Course Outline
:PROPERTIES:
:UNNUMBERED: t
:END:
** Introduction
:PROPERTIES:
:UNNUMBERED: nil
:END:
some long multi paragraph text.
** Origins of the French Revolution
:PROPERTIES:
:UNNUMBERED: nil
:END:
more text. Readings.

Or introduce an explicit NUMBERED property (probably easier in code).
However, the numbering will likely be complicated as they are no longer
sub-numbered according to parent (i.e. the correct numbering is not 0.1,
0.2, 0.3 but 1, 2, 3).

Do you think this is generally useful or is this a one-off document?

—Rasmus

-- 
To err is human. To screw up 10⁶ times per second, you need a computer




Re: [O] Numbering only *some* subheadings?

2015-04-30 Thread Christian Moe


You can do the opposite and number only the topmost headings, e.g. with

#+OPTIONS: num:1

but I don't think Org has a way to number only sub-headings. In HTML
export, you can get there with CSS hacks. For the exact example you
gave,

#+HTML_HEAD: .section-number-2 {display: none;}

should hide heading numbering for the top heading level (add
more CSS if you have more heading levels). It won't fix the TOC, though;
with numbered headline export, the numbers are hardcoded in the TOC.

You could export without heading numbering, and add numbering to both
headlines and TOC items with CSS, but it's more involved. Again, for
your simple example you could do something like this.

#+OPTIONS: num:nil
#+HTML_HEAD: h3::before {counter-increment: subheadnum; 
#+HTML_HEAD:content: counter(subheadnum) ". "}
#+HTML_HEAD:h2 {counter-reset: subheadnum}
#+HTML_HEAD:#text-table-of-contents ul ul {list-style-type: 
decimal}

Yours,
Christian



Matt Price writes:

> I would like to number only a single subset of subheadings in an html
> export, so that, e.g.,
>
> * Introduction
> lorem ipsum
> * Coiurse Requirements
> lorem ipsum
> * Course Outline
> ** Introduction
> some long multi paragraph text.
> ** Origins of the French Revolution
> more text. Readings.
> ** Liberty, Equality, Fraternity?
> ... etc
>
> becomes:
>
> Introduction
>
> Course Requirements
>
> Course Outline
>
> 1. Introduction
> bla bla bla
> 2. Origins of hte French Revolution
> bla bla bla.
> Readings:  bla bla bla
> 3. Liberty, Eaquality, Fraternity
>
> ... etc
>
> Is this possible? Anyone have a suggestion?
>
> Thanks as always,
> Matt




[O] Numbering only *some* subheadings?

2015-04-29 Thread Matt Price
I would like to number only a single subset of subheadings in an html
export, so that, e.g.,

* Introduction
lorem ipsum
* Coiurse Requirements
lorem ipsum
* Course Outline
** Introduction
some long multi paragraph text.
** Origins of the French Revolution
more text. Readings.
** Liberty, Equality, Fraternity?
... etc

becomes:

Introduction

Course Requirements

Course Outline

1. Introduction
bla bla bla
2. Origins of hte French Revolution
bla bla bla.
Readings:  bla bla bla
3. Liberty, Eaquality, Fraternity

... etc

Is this possible? Anyone have a suggestion?

Thanks as always,
Matt