diff --git a/src/converters/mathml-interfaces-to-latex/mathml-tag-to-latex/mathml-tags/MFenced.ts b/src/converters/mathml-interfaces-to-latex/mathml-tag-to-latex/mathml-tags/MFenced.ts index 6703a7e..ce7c377 100755 --- a/src/converters/mathml-interfaces-to-latex/mathml-tag-to-latex/mathml-tags/MFenced.ts +++ b/src/converters/mathml-interfaces-to-latex/mathml-tag-to-latex/mathml-tags/MFenced.ts @@ -53,6 +53,15 @@ class Matrix { } apply(latex: string): string { - return '\\begin{bmatrix}\n' + latex + '\n\\end{bmatrix}'; + return `\\begin{${this._command}}\n` + latex + `\n\\end{${this._command}}`; + } + + private get _command(): string { + switch (this._open) { + case '(': + return 'pmatrix'; + default: + return 'bmatrix'; + } } }