diff --git a/services/web/frontend/js/features/source-editor/lezer-latex/latex.grammar b/services/web/frontend/js/features/source-editor/lezer-latex/latex.grammar index 84e7c4fa3a..95d9501da4 100644 --- a/services/web/frontend/js/features/source-editor/lezer-latex/latex.grammar +++ b/services/web/frontend/js/features/source-editor/lezer-latex/latex.grammar @@ -93,7 +93,8 @@ TopRuleCtrlSeq, MidRuleCtrlSeq, BottomRuleCtrlSeq, - MultiColumnCtrlSeq + MultiColumnCtrlSeq, + ParBoxCtrlSeq } @external specialize {EnvName} specializeEnvName from "./tokens.mjs" { @@ -347,6 +348,12 @@ KnownCommand { } | MathTextCommand { MathTextCtrlSeq optionalWhitespace? "*"? TextArgument + } | + ParBoxCommand { + ParBoxCtrlSeq + (optionalWhitespace? OptionalArgument)* + ShortTextArgument + optionalWhitespace? TextArgument } } diff --git a/services/web/frontend/js/features/source-editor/lezer-latex/tokens.mjs b/services/web/frontend/js/features/source-editor/lezer-latex/tokens.mjs index 5b1cfff016..ba0f168521 100644 --- a/services/web/frontend/js/features/source-editor/lezer-latex/tokens.mjs +++ b/services/web/frontend/js/features/source-editor/lezer-latex/tokens.mjs @@ -79,6 +79,7 @@ import { BottomRuleCtrlSeq, TableEnvName, MultiColumnCtrlSeq, + ParBoxCtrlSeq, // Marker for end of argument lists endOfArguments, hasMoreArguments, @@ -575,6 +576,7 @@ const otherKnowncommands = { '\\midrule': MidRuleCtrlSeq, '\\bottomrule': BottomRuleCtrlSeq, '\\multicolumn': MultiColumnCtrlSeq, + '\\parbox': ParBoxCtrlSeq, } // specializer for control sequences // return new tokens for specific control sequences