Expand the common siunitx commands
\SI/\qty, \SIrange, \num and \si were unsupported, so numbers and units leaked as command text. A body pass now reads their braced arguments, normalizes the number (dropping thin spaces and grouping braces) and maps common unit macros to short symbols: metre/meter to m, second to s, kilogram to kg, per to /, squared and cubed to superscripts, and the kilo/milli/micro/nano/centi prefixes. A preview test renders "3.5 m", "2 km/s", "1000" and a bare "m" with no warnings.
This commit is contained in:
1 parent
e53ce3b601
commit
25c7659afe
4 files changed
+143
-6
No files matched your search
@@ -14,12 +14,12 @@ cargo fmt --all -- --check
|
||||
cargo test --workspace --offline
|
||||
```
|
||||
|
||||
The workspace currently passes **1051 tests**:
|
||||
The workspace currently passes **1052 tests**:
|
||||
|
||||
| Suite | Tests |
|
||||
| --- | --- |
|
||||
| route-D unit (engine) | 439 |
|
||||
| engine binary unit | 421 |
|
||||
| engine binary unit | 422 |
|
||||
| server integration | 63 |
|
||||
| v1 integration | 71 |
|
||||
| pdfLaTeX oracle | 42 |
|
||||
|
||||
Reference in new issue
Block a user