feat: add mfenced and mtable as pmatrix

This commit is contained in:
Alexandre Nunes 2020-09-19 15:50:37 -03:00
parent 118a38f0ab
commit feef2d20a9
1 changed files with 10 additions and 1 deletions

View File

@ -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';
}
}
}