snaekobbi / pipeline-mod-braille

ARCHIVED. Please don't make any new issues or pull requests in this repo.
0 stars 0 forks source link

Custom numbering with @counter-style rules #15

Open bertfrees opened 9 years ago

bertfrees commented 9 years ago

Related issues:

bertfrees commented 9 years ago

Possible implementation of @counter-style support in Java (while formatting):

bertfrees commented 8 years ago

The alternative is to use a text-style attribute (with number-format="default") and to perform the styling/formatting on the string (which represents an integer). This means that:

  1. We need some way to mark certain text segments as counters.
  2. We need some way to distinguish special counter styles from regular text styles (CSS).

I can see two possibilities:

The problem with the second appoach is that while it looks like CSS it is not actually valid CSS so that may cause some confusion.

EDIT: In order to solve this problem I came up with the following:

bertfrees commented 8 years ago

Another possibility is to use "anonymous counter styles" (i.e. the symbols() function), although it does not provide the full feature-set of the @counter-style rule.

EDIT: symbols(...) would then also become a value for -dotify-counter-style.

bertfrees commented 8 years ago

See https://github.com/daisy/pipeline-mod-braille/commit/dde546f193e4135c9905b142b76e6c732bb9ea2c, https://github.com/daisy/pipeline-mod-braille/commit/fa1ddd72754ed4925211feba2738db84f4b569a4