Closed xiaodong-hu closed 7 months ago
in that \mathbf{...} with remove ALL blank spaces within its arguments.
This is tricky. How about other spaces in unicode? Blindly removing all spaces might be wrong in some cases. I wonder where can we get a spec describing the behavior of mathbf
For now we can first fix the font variant problem and deal with spaces later
in that \mathbf{...} with remove ALL blank spaces within its arguments.
This is tricky. How about other spaces in unicode? Blindly removing all spaces might be wrong in some cases. I wonder where can we get a spec describing the behavior of mathbf
Math isn't whitespace dependent in LaTeX. The difference here is that \textbf{}
typesets as regular bold text (which does take whitespace into account, but only a single one if there are consecutive ones), while \mathbf{}
is for typesetting with bold math symbols.
\[
|\mathbf{ Hello World }| |\textbf{ Hello World }|
\]
results in
Fixed in 0.2.3
Hi, I found that that both
\mathbf .
and\mathbf{...}
cannot be correctly rendered in desired form as in LaTeX (bold AND regular). For example,gives
But in LaTeX, it should be
And here is one more tricky thing:
See https://tex.stackexchange.com/questions/294561/using-textbf-vs-mathbf-in-math-mode. Precisely,
\mathbf{...}
and\textbf{...}
are different in LaTeX, in that\mathbf{...}
will remove ALL blank spaces within its arguments. So probably a more correct rendering is to parse, for example, for the LaTeX code:as the Typst code:
I think this clearly demonstrate how to fix the
\mathbf
rendering problem : )Thanks for your help!