josephwright / josephwright/siunitx
Different formatting for digits resp. before and after decimal point
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 407
- Forks
- 29
- Avg merge
- 11h 20m
- Merged PRs (30d)
- 3
Description
Hello,
When writing a decimal number, it is a common usage to typeset the digits after the decimal separator differently from the digits of the integral part:
- E.g., when indicating a price, it is very common, in many countries, to typeset the number of cents in superscript;
- Also, on French roadsigns (and possibly in other countries), the official norm requires the digits after the decimal comma to be typeset in a smaller font : see e. g. here.
At the time I used the (now unmaintained) package numprint (which siunitx takes some of its inspiration from), there was an internal command \nprt@printafter which could be hacked to get the desired effect. But now that I am using siunitx, I could not find such a feature in the current implementation...
Anyway, it would be nice that the siunitx would include the possibility (without any internal hacking by the user, I mean) to typeset post-decimal-point digits differently from the integer part (e.g. in a smaller font size, or as a superscript, or as text figures, or without thousand grouping, &c., &c.): for it is a common usage as explained above, and a quite convenient one IMHO!
Kind regards,
/Soldyesis
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing siunitx's number-formatting behavior and the issue's reference to numprint's internal command \nprt@printafter. Determine the intended scope for formatting digits after the decimal separator, including font size, superscript, text figures, and grouping. Done should provide a documented user-facing way to apply the selected formatting without internal hacking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100