From f7def5e53f514163fb2d631aa5de05c58747c7b5 Mon Sep 17 00:00:00 2001 From: Toon Verstraelen Date: Fri, 6 Sep 2024 17:23:03 +0200 Subject: [PATCH] Remove matrix environments as they are not standalone math evns --- mdit_py_plugins/amsmath/__init__.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/mdit_py_plugins/amsmath/__init__.py b/mdit_py_plugins/amsmath/__init__.py index 0aed5c1..11dc3ea 100644 --- a/mdit_py_plugins/amsmath/__init__.py +++ b/mdit_py_plugins/amsmath/__init__.py @@ -31,18 +31,11 @@ "alignat", # stretches the space betweenthe equation columns to the maximum possible width "flalign", - # 4.1 The pmatrix, bmatrix, Bmatrix, vmatrix and Vmatrix have (respectively) - # (),[],{},||,and ‖‖ delimiters built in. - "matrix", - "pmatrix", - "bmatrix", - "Bmatrix", - "vmatrix", - "Vmatrix", # eqnarray is another math environment, it is not part of amsmath, # and note that it is better to use align or equation+split instead "eqnarray", ] + # other "non-top-level" environments: # 3.4 the split environment is for single equations that are too long to fit on one line @@ -54,6 +47,9 @@ # whose total width is the actual width of the contents; # thus they can be used as a component in a containing expression +# 4.1 The pmatrix, bmatrix, Bmatrix, vmatrix and Vmatrix have (respectively) +# (),[],{},||,and ‖‖ delimiters built in. + RE_OPEN = re.compile(r"\\begin\{(" + "|".join(ENVIRONMENTS) + r")([\*]?)\}")