Jean-François B.
Jean-François B.
ah sorry I see now what `style changes` meant. It refers exactly to the usage as `_\mathrm{foo}` with `style` referring to `\scriptstyle`. Well, seems I do need to spam before...
> It looks like you (as I did myself) have mixed up `begin`/`before` and `end`/`after`. Besides, I guess you forgot to use `\TeX`: no no quite deliberate. I was expecting...
@dbitouze But we can not use the output as reliable input. ``` \documentclass{article} \ExplSyntaxOn \def\foomm#1{\dim_to_decimal_in_unit:nn {#1} { 1mm }mm} % \def\foopt#1{\dim_to_decimal_in_unit:nn {#1} { 1pt }pt} \ExplSyntaxOff \begin{document} \def\test#1{\the\dimexpr#1\relax\ (#1) and...
Whatever you do, even using unlimited precision, you will never manage to obtain in TeX a representation of `0.6in` in units of the centimeter which will give back a dimension...
```latex \ifdim0.6in=1.524cm0.6in=1.524cm\else For \TeX\ 0.6in$\neq$1.524cm.\fi ``` ![Capture d’écran 2021-06-26 à 10 23 52](https://user-images.githubusercontent.com/2589111/123507239-a817b180-d668-11eb-90a3-9b5927080057.png) My example is not very convincing because already for TeX, `1in≠2.54cm`... ```latex \ifdim1in=2.54cm\else For \TeX\ 1in$\neq$2.54cm (\number\dimexpr1in$\neq$\number\dimexpr2.54cm)\fi...
Final note: `4736285` (internal representation of `25.4mm`) differs from `4736287` (internal representation of `72.27pt`) and from `4736286` (internal representation of `72.26999pt` and of `1in`). It matches the internal representation of...
Here is how to display a dimension in `mm` in such a way that if it was input in `mm` then the displayed dimension and the original ones will be...
Let me explain the rationale. When TeX parses a dimension `X` given using a unit `uu`, say `X= abc.xyz uu` it first *rounds* `abc.xyz` to the nearest integer multiple of...
``` \newcommand\converttomm[1] {\strip@pt\dimexpr\numexpr2540*\numexpr\dimexpr#1\relax\relax/7227\relax sp\relax mm} \makeatother ``` has an unneeded internal `\numexpr` sorry. The conversion is done automatically if a `\dimexpr` is encountered inside `\numexpr` it will be replaced by...
ok, it is possible to handle all units of TeX. I demonstrate here for the `bp` unit. See the comments. ```latex \documentclass{article} \makeatletter % convert a dimension to be expressed...