Merge pull request #19137 from overleaf/em-mj-parbox

Add special parsing for \parbox

GitOrigin-RevId: a69a519fa75af95712e19426265224507400f105
This commit is contained in:
Eric Mc Sween 2024-07-02 11:07:22 -04:00 committed by Copybot
parent a95c0bbfc3
commit f0c67b45c7
2 changed files with 10 additions and 1 deletions

View file

@ -93,7 +93,8 @@
TopRuleCtrlSeq,
MidRuleCtrlSeq,
BottomRuleCtrlSeq,
MultiColumnCtrlSeq
MultiColumnCtrlSeq,
ParBoxCtrlSeq
}
@external specialize {EnvName} specializeEnvName from "./tokens.mjs" {
@ -347,6 +348,12 @@ KnownCommand<ArgumentType> {
} |
MathTextCommand {
MathTextCtrlSeq optionalWhitespace? "*"? TextArgument
} |
ParBoxCommand {
ParBoxCtrlSeq
(optionalWhitespace? OptionalArgument)*
ShortTextArgument
optionalWhitespace? TextArgument
}
}

View file

@ -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