Add support for inline parenthesis equations #44
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.
Add support for inline parenthesis equations
Description
This PR adds support for inline parenthesis equations using the (...) syntax. This is a commonly used LaTeX notation for inline equations and enhances our parser's compatibility with standard LaTeX documents.
Changes
Added a new ComponentType case: inlineLatexEquation
Updated the Parser to recognize and properly handle (...) syntax
Added corresponding unit tests for the new equation type
Motivation
LaTeX users often prefer (...) for inline equations over the older$...$ syntax. Adding support for this notation improves our parser's compatibility with modern LaTeX documents and provides users with more flexibility in equation formatting.
Testing
New unit tests have been added to cover various scenarios for inline parenthesis equations:
Basic usage
Usage within text
Escaped parentheses
Equations with leading/trailing whitespace and line breaks
All existing tests continue to pass, ensuring no regression in current functionality.
Additional Notes
This change is backwards compatible and does not affect the parsing of existing equation types.
Documentation has been updated to reflect the new supported syntax.
Checklist
Code follows the project's coding standards
Comments have been added where necessary
Unit tests have been added/updated
Documentation has been updated
All tests pass locally
Please review and let me know if any further changes or information are needed.