Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for the cases and empheq packages and update code #1197

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented Feb 4, 2025

This PR adds tests for the cases and empheq packages, and updates their code.

In CasesConfiguration.ts,

  • The subnumber is non-zero only in subnumcases, which is handled in the condition above, so technically, this if 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.
  • In order to use the \empheqlbrace at line 105, we would need to load the empheq extension and add it to the package list. Rather than force the user to do that, we use \mmlToken to create a stretchy brace instead.
  • In line 200, we check that the cs is defined, which it might not be if the \\ is at the end of the line.

In EmpheqConfiguration.ts,

  • Since GetArgument() always returns a string, there is no need for || ''. (line 62)
  • The error message at line 65 is adjusted.
  • The property nestStart is used instead of nestable in order to avoid the erroneous nesting message. This requires the changes to ParseUtil.ts that are in the test-tex branch.

In EmpheqUtil.ts,

  • Since attributes.get() will return the default value (always a string), there is no need for the || '' (lines 167, 171, and 225).
  • We create an empty row if there are no rows at line 173-175.
  • At line 210, we skip over the tag cell of an mlabeledtr row, and we add braces around the loop.

@dpvc dpvc requested a review from zorkow February 4, 2025 20:26
@dpvc dpvc added this to the v4.0 milestone Feb 4, 2025
Base automatically changed from update-test-framework to develop February 25, 2025 20:55
Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

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