mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-07 12:18:39 +00:00
Fix ligatures vs. \tt (#1379)
* Fix ligatures not always triggering Example: \text{\rm --} would not cause ligature but should * Remove ligatures in \texttt mode * Add screenshot tests * Fix MathML ligatures * Fix type * Handle \text... fonts in MathML building * Remove leftover console deubgging
This commit is contained in:
committed by
Kevin Barabash
parent
4f9851fb0c
commit
1e645198f7
@@ -1,5 +1,86 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`A MathML builder \\text fonts become mathvariant 1`] = `
|
||||
|
||||
<math>
|
||||
<semantics>
|
||||
<mrow>
|
||||
<mtext>
|
||||
roman
|
||||
</mtext>
|
||||
<mrow>
|
||||
<mtext mathvariant="italic">
|
||||
italic
|
||||
</mtext>
|
||||
<mrow>
|
||||
<mtext mathvariant="bold-italic">
|
||||
bold
|
||||
</mtext>
|
||||
<mtext>
|
||||
</mtext>
|
||||
<mtext mathvariant="bold-italic">
|
||||
italic
|
||||
</mtext>
|
||||
</mrow>
|
||||
</mrow>
|
||||
<mtext mathvariant="bold">
|
||||
bold
|
||||
</mtext>
|
||||
<mrow>
|
||||
<mtext mathvariant="sans-serif">
|
||||
ss
|
||||
</mtext>
|
||||
<mrow>
|
||||
<mtext mathvariant="sans-serif-italic">
|
||||
italic
|
||||
</mtext>
|
||||
<mrow>
|
||||
<mtext mathvariant="sans-serif-bold-italic">
|
||||
bold
|
||||
</mtext>
|
||||
<mtext>
|
||||
</mtext>
|
||||
<mtext mathvariant="sans-serif-bold-italic">
|
||||
italic
|
||||
</mtext>
|
||||
</mrow>
|
||||
</mrow>
|
||||
<mtext mathvariant="bold-sans-serif">
|
||||
bold
|
||||
</mtext>
|
||||
</mrow>
|
||||
<mrow>
|
||||
<mtext mathvariant="monospace">
|
||||
tt
|
||||
</mtext>
|
||||
<mrow>
|
||||
<mtext mathvariant="monospace">
|
||||
italic
|
||||
</mtext>
|
||||
<mrow>
|
||||
<mtext mathvariant="monospace">
|
||||
bold
|
||||
</mtext>
|
||||
<mtext>
|
||||
</mtext>
|
||||
<mtext mathvariant="monospace">
|
||||
italic
|
||||
</mtext>
|
||||
</mrow>
|
||||
</mrow>
|
||||
<mtext mathvariant="monospace">
|
||||
bold
|
||||
</mtext>
|
||||
</mrow>
|
||||
</mrow>
|
||||
<annotation encoding="application/x-tex">
|
||||
\\text{roman\\textit{italic\\textbf{bold italic}}\\textbf{bold}\\textsf{ss\\textit{italic\\textbf{bold italic}}\\textbf{bold}}\\texttt{tt\\textit{italic\\textbf{bold italic}}\\textbf{bold}}}
|
||||
</annotation>
|
||||
</semantics>
|
||||
</math>
|
||||
|
||||
`;
|
||||
|
||||
exports[`A MathML builder accents turn into <mover accent="true"> in MathML 1`] = `
|
||||
|
||||
<math>
|
||||
@@ -57,6 +138,52 @@ exports[`A MathML builder accents turn into <mover accent="true"> in MathML 1`]
|
||||
|
||||
`;
|
||||
|
||||
exports[`A MathML builder ligatures render properly 1`] = `
|
||||
|
||||
<math>
|
||||
<semantics>
|
||||
<mrow>
|
||||
<mtext>
|
||||
“‘Hi—-”’
|
||||
</mtext>
|
||||
<mo>
|
||||
−
|
||||
</mo>
|
||||
<mo>
|
||||
−
|
||||
</mo>
|
||||
<mtext mathvariant="monospace">
|
||||
\`\`‘Hi----''’
|
||||
</mtext>
|
||||
<mrow>
|
||||
<mtext>
|
||||
\`\`
|
||||
</mtext>
|
||||
<mtext mathvariant="monospace">
|
||||
‘Hi
|
||||
</mtext>
|
||||
<mtext>
|
||||
---
|
||||
</mtext>
|
||||
<mtext mathvariant="monospace">
|
||||
-
|
||||
</mtext>
|
||||
<mtext>
|
||||
''
|
||||
</mtext>
|
||||
<mtext mathvariant="monospace">
|
||||
’
|
||||
</mtext>
|
||||
</mrow>
|
||||
</mrow>
|
||||
<annotation encoding="application/x-tex">
|
||||
\\text{\`\`\`Hi----'''}--\\texttt{\`\`\`Hi----'''}\\text{\\tt \`\`\`Hi----'''}
|
||||
</annotation>
|
||||
</semantics>
|
||||
</math>
|
||||
|
||||
`;
|
||||
|
||||
exports[`A MathML builder normal spaces render normally 1`] = `
|
||||
|
||||
<math>
|
||||
|
Reference in New Issue
Block a user