Add the missing Latex command - #620
Open
albertcheng wants to merge 3 commits into
Open
Conversation
32 new LaTeX commands implemented across 7 categories:
1. Font Variants (11 commands) ▒ \mathbb, \mathbf, \mathsf, \mathtt, \mathfrak,
\mathscr, \textbf, \textit, \textsf, \texttt, \textsc
▒ Registered as text styles in TexFormulaSettings.xml with font mappings in
DefaultTexFont.xml
2. Display Style (4 commands) ▒ \displaystyle, \textstyle, \scriptstyle,
\scriptscriptstyle
▒ New StyleAtom forces TexStyle on box creation (e.g., large integrals vs
inline)
3. Stacked Annotations (3 commands) ▒ \overset{top}{base},
\underset{bottom}{base}, \stackrel{top}{rel}
▒ Wire existing UnderOverAtom to parser commands
4. Invisible Atoms (4 commands) ▒ \phantom, \hphantom, \vphantom, \smash
▒ Wire existing PhantomAtom with width/height/depth toggles
5. Box (1 command) ▒ \boxed{formula}
▒ New BoxedAtom renders a framed border around content
6. AMS Matrix Environments (5 environments) ▒ \begin{aligned}, \begin{bmatrix},
\begin{Bmatrix}, \begin{vmatrix}, \begin{Vmatrix}
▒ One-liner static instances reusing existing MatrixCommandParser
7. Extensible Arrows + AMS Abbreviations (5 commands) ▒ \xrightarrow{label},
\xleftarrow{label}, \implies, \iff, \impliedby
▒ New ExtensibleArrowAtom draws arrow shaft + arrowhead with centered label
▒ \implies/\iff/\impliedby defined in PredefinedTexFormulas.xml
…---------+
|Command |Implementation |
|---------+-------------------------------------------------------------------|
|\bmod |Binary mod operator with BinaryOperator spacing ▒ |
| |PredefinedTexFormulas.xml |
|\pmod{n} |Parenthesized mod (mod n) ▒ new embedded parser command reading one|
| |argument |
|\dots |Generic ellipsis ¦ alias for \ldots in PredefinedTexFormulas.xml |
+-----------------------------------------------------------------------------+
10 new commands/environments implemented
+-----------------------------------------------------------------------------+
|Priority |Feature |Implementation |Files changed |
|---------+----------------------+----------------------+---------------------|
|1 |\textcolor{color}{te▒ |Alias for \color ▒ |TexFormulaParser.cs |
| | |same parser case |(1 line fall-through)|
|2 |\xmapsto{label} |Extensible maps-to |StandardCommands.cs |
| | |arrow |(1 line) |
|3 |\xhookrightarrow{lab▒ |Extensible hook arrow |StandardCommands.cs |
| | | |(1 line) |
|4 |\xRightarrow{label} |Extensible double |StandardCommands.cs |
| | |right arrow |(1 line) |
|5 |\xLeftarrow{label} |Extensible double |StandardCommands.cs |
| | |left arrow |(1 line) |
|6 |\xhookleftarrow{labe▒ |Extensible left hook |StandardCommands.cs |
| | |arrow |(1 line) |
|7 |\begin{gathered}...\▒ |Centered multi-line |MatrixCommandParser.▒|
| | |(no delimiters) |StandardCommands.cs |
|8 |\begin{smallmatrix}.▒ |Inline matrix (no |MatrixCommandParser.▒|
| | |delimiters) |StandardCommands.cs |
|9 |\intertext{text} |Text between aligned |New |
| | |rows |IntertextCommand.cs, |
| | | |MatrixInternalEnviro▒|
|10 |\mathclap{...}, |Zero-width lapped |TexFormulaParser.cs |
| |\mathrlap{...}, |content |(3 new cases, using |
| |\mathllap{...} | |PhantomAtom) |
+-----------------------------------------------------------------------------+
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
32 new LaTeX commands implemented across 7 categories:
▒ Registered as text styles in TexFormulaSettings.xml with font mappings in
DefaultTexFont.xml
2. Display Style (4 commands) ▒ \displaystyle, \textstyle, \scriptstyle, \scriptscriptstyle
▒ New StyleAtom forces TexStyle on box creation (e.g., large integrals vs
inline)
3. Stacked Annotations (3 commands) ▒ \overset{top}{base}, \underset{bottom}{base}, \stackrel{top}{rel}
▒ Wire existing UnderOverAtom to parser commands
4. Invisible Atoms (4 commands) ▒ \phantom, \hphantom, \vphantom, \smash
▒ Wire existing PhantomAtom with width/height/depth toggles
5. Box (1 command) ▒ \boxed{formula}
▒ New BoxedAtom renders a framed border around content
6. AMS Matrix Environments (5 environments) ▒ \begin{aligned}, \begin{bmatrix}, \begin{Bmatrix}, \begin{vmatrix}, \begin{Vmatrix}
▒ One-liner static instances reusing existing MatrixCommandParser
7. Extensible Arrows + AMS Abbreviations (5 commands) ▒ \xrightarrow{label}, \xleftarrow{label}, \implies, \iff, \impliedby
▒ New ExtensibleArrowAtom draws arrow shaft + arrowhead with centered label
▒ \implies/\iff/\impliedby defined in PredefinedTexFormulas.xml