Skip to content

Conversation

@asnunes
Copy link
Owner

@asnunes asnunes commented Aug 18, 2025

Fix #41

  • Add support to other patterns such pmatrix, bmatrix, Bmatrix and Vmatrix

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for matrix patterns using mo + mtable + mo structure to address GitHub issue #41. The implementation detects delimiter-table-delimiter patterns and converts them to appropriate LaTeX matrix environments.

Key changes:

  • Introduces a new MatrixPatternDetector class to identify and convert matrix patterns
  • Adds matrix pattern detection to multiple converter classes (Math, MRow, GenericSpacingWrapper)
  • Supports multiple matrix types: pmatrix, bmatrix, Bmatrix, and vmatrix

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/data/helpers/matrix-pattern-detector.ts New class implementing matrix pattern detection and conversion logic
src/data/helpers/index.ts Exports the new MatrixPatternDetector class
src/data/usecases/mathml-to-latex-convertion/converters/mrow.ts Adds matrix pattern detection before default conversion
src/data/usecases/mathml-to-latex-convertion/converters/math.ts Adds matrix pattern detection and consolidates imports
src/data/usecases/mathml-to-latex-convertion/converters/generic-spacing-wrapper.ts Adds matrix pattern detection before default conversion
__tests__/mocks/mathmlStrings.ts Adds test cases for various matrix patterns
__tests__/index.test.ts Adds comprehensive tests for different matrix delimiter types

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

Unable to correctly convert mtable to latex,

2 participants