mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-13 06:58:40 +00:00
Add HTML extension (#2082)
* Add html extension * Fix flow error * Update documentation * Add tests * Call buildA11yStrings for "html" node * Throw ParseError when parsing \htmlData fails * Improve documentation * Add a screenshotter test * Add dummy screenshot * Update screenshots
This commit is contained in:
committed by
Kevin Barabash
parent
9d8195c793
commit
e5333ad04d
@@ -113,9 +113,15 @@ or for just some URLs via the `trust` [option](options.md).
|
||||
| $\href{https://katex.org/}{\KaTeX}$ | `\href{https://katex.org/}{\KaTeX}` |
|
||||
| $\url{https://katex.org/}$ | `\url{https://katex.org/}` |
|
||||
| $\includegraphics[height=0.8em, totalheight=0.9em, width=0.9em, alt=KA logo]{https://katex.org/img/khan-academy.png}$ | `\includegraphics[height=0.8em, totalheight=0.9em, width=0.9em, alt=KA logo]{https://katex.org/img/khan-academy.png}` |
|
||||
| $\htmlId{bar}{x}$ | `\htmlId{bar}{x}` |
|
||||
| $\htmlClass{foo}{x}$ | `\htmlClass{foo}{x}` |
|
||||
| $\htmlStyle{color: red;}{x}$ | `\htmlStyle{color: red;}{x}` |
|
||||
| $\htmlData{foo=a, bar=b}{x}$ | `\htmlData{foo=a, bar=b}{x}` |
|
||||
|
||||
`\includegraphics` supports `height`, `width`, `totalheight`, and `alt` in its first argument. `height` is required.
|
||||
|
||||
HTML extension (`\html`-prefixed) commands are non-standard, so loosening `strict` option for `htmlExtension` is required.
|
||||
|
||||
|
||||
## Letters and Unicode
|
||||
|
||||
|
Reference in New Issue
Block a user