Skip to content

Commit

Permalink
feature: rimuc: Implementand document {--dl-counter}, `{--ol-counte…
Browse files Browse the repository at this point in the history
…r}`, `{--ul-counter}` layout macros.
  • Loading branch information
srackham committed Jan 19, 2020
1 parent 072b61f commit 0c75ef2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 8 deletions.
27 changes: 19 additions & 8 deletions docs/tips.rmu
Expand Up @@ -786,10 +786,16 @@ Generates:


## List item counters
In addition to the _verse_ and _sidebar_ CSS styles the {rimuc} tool
`--layout` option also includes CSS classes for counting list items
and for numbering labeled list items.
In addition to the _verse_ and _sidebar_ CSS styles the {rimuc} tool `--layout`
option also includes:

- `dl-counter`, `ol-counter` and `ul-counter` CSS classes for
counting labeled, numbered and bullet list items.
- `\{--dl-counter}`, `\{--ol-counter}` and `\{--ul-counter}`
counter macros.
- The `dl-numbered` CSS class for numbering labeled list items.

.-macros
{list-item-counters-example} = '#### Numbered labeled list
.dl-numbered
One:: Item one.
Expand All @@ -805,15 +811,13 @@ labeled list items.
- Item three.
- Item four.

.ul-counter
unordered list items.
There are {--ul-counter} unordered list items.

#### Counted ordered list
. Item one.
. Item two.

.ol-counter
ordered list items.'
There are {--ol-counter} ordered list items.'

{generate-rendered-example-1|list-item-counters-example}

Expand Down Expand Up @@ -859,7 +863,7 @@ aenean enim cum lectus sed.
."color:red"
Two:: Item two.

.#third-list-item
.#third-list-item "color:blue"
3. List item with attached bold Indented
paragraph.

Expand All @@ -871,8 +875,15 @@ aenean enim cum lectus sed.

[Link to labeled list](#labeled-list).'

// Turn off highlightjs auto-hightlighting completely because the `hljs` class
// overrides list item 3 indented paragraph CSS in the following example.
|indented| = '<pre class="nohighlight"><code>|</code></pre>'

{generate-rendered-example-1|list-item-block-attributes-example}

// Restore defaults.
|indented| = '<pre><code>|</code></pre>'


## Section numbering
Use the {rimuc} `--section-numbers` option with the `--layout` option
Expand Down
5 changes: 5 additions & 0 deletions src/rimuc/resources/classic-header.rmu
Expand Up @@ -32,6 +32,11 @@ hljs.initHighlightingOnLoad();
{--mathjax?} = ''
{--mathjax-scripts} = '<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script>'

// List item CSS counters.
{--dl-counter} = '<span class="dl-counter"></span>'
{--ol-counter} = '<span class="ol-counter"></span>'
{--ul-counter} = '<span class="ul-counter"></span>'

// Classic layout specific.
{--dropdown-toc?} = ''

Expand Down
5 changes: 5 additions & 0 deletions src/rimuc/resources/flex-header.rmu
Expand Up @@ -32,6 +32,11 @@ hljs.initHighlightingOnLoad();
{--mathjax?} = ''
{--mathjax-scripts} = '<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script>'

// List item CSS counters.
{--dl-counter} = '<span class="dl-counter"></span>'
{--ol-counter} = '<span class="ol-counter"></span>'
{--ul-counter} = '<span class="ul-counter"></span>'

/*
Legend theme.
*/
Expand Down
5 changes: 5 additions & 0 deletions src/rimuc/resources/sequel-header.rmu
Expand Up @@ -33,6 +33,11 @@ hljs.initHighlightingOnLoad();
{--mathjax?} = ''
{--mathjax-scripts} = '<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script>'

// List item CSS counters.
{--dl-counter} = '<span class="dl-counter"></span>'
{--ol-counter} = '<span class="ol-counter"></span>'
{--ul-counter} = '<span class="ul-counter"></span>'

// Sequel layout specific.
{--toc-width?} = '300px'
{--nav-width?} = '40px'
Expand Down

0 comments on commit 0c75ef2

Please sign in to comment.