[203_2827] support \bold command#2835
Merged
da-liii merged 1 commit intoMoganLab:mainfrom Feb 22, 2026
Merged
Conversation
MoonL79
added a commit
that referenced
this pull request
Feb 25, 2026
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.
2026/02/21 Support \bold command
What
Added support for the
\boldcommand within the LaTeX plugin's import logic.Why
To Fix issue #2827 @da-liii
The original LaTeX parser treated
\boldas an undefined macro during import. This resulted in an unsupported red tag appearing in the Mogan editor.How
TeXmacs/plugins/latex/progs/convert/latex/latex-command-drd.scm, registeredboldin thelatex-modifier-1%logic group so the parser recognizes it as a standard single-argument formatting macro.TeXmacs/plugins/latex/progs/convert/latex/tmtex.scm, added a proxy translation rule insidepost-process-math-text:((func? t 'bold 1) (post-process-math-text (list 'mathbf (cadr t)))). This intercepts\boldand delegates it to\mathbf, ensuring that it inherits all necessary logic for properly rendering both text and math content into bold.How to test
\bold{test}..tmformat.\mathbf{test}is normally handled, instead of showing a raw red\boldtag.