Replies: 9 comments
-
Size changes, such as |
Beta Was this translation helpful? Give feedback.
-
This is a feature of TeX: However, the For example: a\raisebox{10mu}{b}c
\qquad
A_{A_{a\raisebox{10mu}{$\scriptscriptstyle b$}c}}
\\[2ex]
a\hspace{100mu}c
\\[-1ex]
{}_{a\hspace{100mu}c} Unfortunately, in actual LaTeX, More generally (and in both LaTeX and KaTeX), you can use |
Beta Was this translation helpful? Give feedback.
-
Great, thanks Erik!
…On Sun, 3 May 2020 at 01:48, Erik Demaine ***@***.***> wrote:
This is a feature of TeX: em units refer to the (containing) text font
size, not dependent on the current math style.
However, the mu unit is the one math-mode-specific unit, which scales
with the current math style. It's 1/18 of an em in the math font.
For example:
a\raisebox{10mu}{b}c\qquad
A_{A_{a\raisebox{10mu}{$\scriptscriptstyle b$}c}}\\[2ex]
a\hspace{100mu}c\\[-1ex]
{}_{a\hspace{100mu}c}
[image: image]
<https://user-images.githubusercontent.com/2218736/80868777-a1f79200-8c6a-11ea-8c4b-a39c96d47103.png>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/KaTeX/KaTeX/issues/2250#issuecomment-622973529>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABDLBB7M62AV7LW25BB2WOTRPQ6FFANCNFSM4MW2HPWQ>
.
|
Beta Was this translation helpful? Give feedback.
-
actually, I'm still unhappy about this.
since the font size is subscript is 0.7 times the normal one, the two and yes, I understand this is not a KaTeX, really just a TeX question. |
Beta Was this translation helpful? Give feedback.
-
answering myself because I begin to understand the root of the problem. (maybe this is obvious to you KaTeX developers but it wasn't to me). compare
in KaTeX and LaTeX. in KaTeX these will 3 lines will have almost exactly the same width because KaTeX literally scales fonts, AFAICT. in LaTeX they won't at all. |
Beta Was this translation helpful? Give feedback.
-
incidentally is there a way of reopening this? I don't think I can do this myself. |
Beta Was this translation helpful? Give feedback.
-
The problem is that LaTeX uses three separate fonts for rendering type/display, script, and scriptscript sizes (cm?10, cm?7, and cm?5 respectively). The latte two fonts are flattened a bit and aren't directly scaled versions of cm?10 glyphs. We only use a single font size, cm?10, and let the browser scale things appropriately. We could solve this problem in a couple ways:
|
Beta Was this translation helpful? Give feedback.
-
I wasn't suggesting modifying the fonts (sorry edit). I think the choice you guys made is sound. however it does not solve my original problem which is to get a proper scaled unit (something like |
Beta Was this translation helpful? Give feedback.
-
I was curious what LaTeX does so I used quicklatex.com to render it and the amount the |
Beta Was this translation helpful? Give feedback.
-
this is not really a feature request, more like a question.
as far as I understand, even the unit em doesn't refer to the local font size but rather the font size outside the katex code multiplied by some factor. for instance,
will produce the same vertical shift irrespective of the fact that the second \raisebox was in \scriptscriptstyle.
so my question is, is there any way to produce dimensions that are related to the current local font size? more modestly, can one build a box whose size is scaled by the current font size?
Beta Was this translation helpful? Give feedback.
All reactions