mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-11 05:58:40 +00:00
Add detail about colorbox third text parameter (#2280)
* Add detail about colorbox third text parameter As stated in issue #1766 * Change colorbox example to use math * Upgrade remarkable-katex to 1.1.5 Co-authored-by: Erik Demaine <edemaine@mit.edu>
This commit is contained in:
@@ -542,8 +542,10 @@ Other KaTeX color functions expect the content to be a function argument:
|
||||
|
||||
$\textcolor{blue}{F=ma}$ `\textcolor{blue}{F=ma}`<br>
|
||||
$\textcolor{#228B22}{F=ma}$ `\textcolor{#228B22}{F=ma}`<br>
|
||||
$\colorbox{aqua}{A}$ `\colorbox{aqua}{A}`<br>
|
||||
$\fcolorbox{red}{aqua}{A}$ `\fcolorbox{red}{aqua}{A}`
|
||||
$\colorbox{aqua}{$F=ma$}$ `\colorbox{aqua}{$F=ma$}`<br>
|
||||
$\fcolorbox{red}{aqua}{$F=ma$}$ `\fcolorbox{red}{aqua}{$F=ma$}`
|
||||
|
||||
Note that, as in LaTeX, `\colorbox` & `\fcolorbox` renders its third argument as text, so you may want to switch back to math mode with `$` as in the examples above.
|
||||
|
||||
For color definition, KaTeX color functions will accept the standard HTML [predefined color names](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Color_keywords). They will also accept an RGB argument in CSS hexadecimal style. The "#" is optional before a six-digit specification.
|
||||
|
||||
|
Reference in New Issue
Block a user