Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an easier way to get Roman numerals? #6

Open
ousia opened this issue May 23, 2022 · 0 comments
Open

an easier way to get Roman numerals? #6

ousia opened this issue May 23, 2022 · 0 comments

Comments

@ousia
Copy link
Contributor

ousia commented May 23, 2022

@jtauber,

I wonder whether this CSS snippet is a simpler way to get Roman numerals:

div.chapter {
  counter-increment: chapter_roman;
}
h3.chapter_ref:before {
 content: counter(chapter_roman, upper-roman);
}

This avoids an extra dependency and also it avoids hard-coded Unicode characters.

The Unicode Guide recommends on its page 853 (https://www.unicode.org/versions/Unicode14.0.0/ch22.pdf#nameddest=G42902):

Roman Numerals. For most purposes, it is preferable to compose the Roman numerals from sequences of the appropriate Latin letters. However, the uppercase and lowercase variants of the Roman numerals through 12, plus L, C, D, and M, have been encoded…

Sorry, but some Roman numbers in special Unicode characters look weird.

Just in case it might help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant