Add tests for the cases and empheq packages and update code #1197
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.
This PR adds tests for the
cases
andempheq
packages, and updates their code.In
CasesConfiguration.ts
,subnumber
is non-zero only insubnumcases
, which is handled in the condition above, so technically, thisif
should always be true and could be removed, but we don't really want increment the tag counter during the processing of the left-hand material, so we leave it with that condition only.\empheqlbrace
at line 105, we would need to load theempheq
extension and add it to thepackage
list. Rather than force the user to do that, we use\mmlToken
to create a stretchy brace instead.cs
is defined, which it might not be if the\\
is at the end of the line.In
EmpheqConfiguration.ts
,GetArgument()
always returns a string, there is no need for|| ''
. (line 62)nestStart
is used instead ofnestable
in order to avoid the erroneous nesting message. This requires the changes toParseUtil.ts
that are in thetest-tex
branch.In
EmpheqUtil.ts
,attributes.get()
will return the default value (always a string), there is no need for the|| ''
(lines 167, 171, and 225).mlabeledtr
row, and we add braces around the loop.