mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
Add a \color command for custom colors
Summary: Keep track of the color inside the style now, and use that when we are rendering things. Added a custom lexing mode to handle lexing colors correctly. Prefixed the old katex colors (internally) with "katex-" to distinguish them from CSS colors. Test Plan: - Run the normal tests, see they work - Run the huxley tests, see that they didn't change except for the color one which looks right Reviewers: alpert Reviewed By: alpert Differential Revision: http://phabricator.khanacademy.org/D7763
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.4 KiB |
@@ -11,7 +11,7 @@ url=http://localhost:7936/test/huxley/test.html?m=\dfrac{\frac{a}{b}}{\frac{c}{d
|
||||
url=http://localhost:7936/test/huxley/test.html?m=a^{a^a_a}_{a^a_a}
|
||||
|
||||
[Colors]
|
||||
url=http://localhost:7936/test/huxley/test.html?m=\blue{a}\green{b}\red{c}
|
||||
url=http://localhost:7936/test/huxley/test.html?m=\blue{a}\color{%%230f0}{b}\color{red}{c}
|
||||
|
||||
[GreekLetters]
|
||||
url=http://localhost:7936/test/huxley/test.html?m=\alpha\beta\gamma\omega
|
||||
|
Reference in New Issue
Block a user