Skip to content

Add the missing Latex command - #620

Open
albertcheng wants to merge 3 commits into
ForNeVeR:masterfrom
albertcheng:master
Open

Add the missing Latex command#620
albertcheng wants to merge 3 commits into
ForNeVeR:masterfrom
albertcheng:master

Conversation

@albertcheng

Copy link
Copy Markdown

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

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)         |
+-----------------------------------------------------------------------------+
@ForNeVeR ForNeVeR self-assigned this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants