mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 11:48:41 +00:00
Add sizing functions (like \small)
Summary: Right now, when the size gets bigger, this still doesn't work, so there's a check to prevent that. However, functions that go smaller (like `\small`, `\tiny`, etc) do work. Also, we can't seem to use the sizing functions inside of fractions (so something like `\dfrac{\small\frac{x}{y}}{z}` doesn't work). However, the most prominent use case is `\small` as the outer-most object, so this is still helpful. This commit has the parsing and stuff to handle all of it, but it'll throw an error if you try to do something that doesn't work. (For the record, "doesn't work" means "looks bad", not "throws an unexpected error"). Test Plan: Make sure things like `\small x` work, and things like `\Huge x` and `\frac{\small x}{y}` don't. Reviewers: alpert Reviewed By: alpert Differential Revision: http://phabricator.khanacademy.org/D3619
This commit is contained in:
@@ -288,4 +288,15 @@ big parens
|
||||
margin-left: -0.125em;
|
||||
}
|
||||
}
|
||||
|
||||
.reset-size5.size1 { font-size: 0.5em; }
|
||||
.reset-size5.size2 { font-size: 0.7em; }
|
||||
.reset-size5.size3 { font-size: 0.8em; }
|
||||
.reset-size5.size4 { font-size: 0.9em; }
|
||||
.reset-size5.size5 { font-size: 1.0em; }
|
||||
.reset-size5.size6 { font-size: 1.2em; }
|
||||
.reset-size5.size7 { font-size: 1.44em; }
|
||||
.reset-size5.size8 { font-size: 1.73em; }
|
||||
.reset-size5.size9 { font-size: 2.07em; }
|
||||
.reset-size5.size10 { font-size: 2.49em; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user