Add/improve docs for the LaTeX math spans.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9c44dd8..fdd3d83 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,16 @@
# MD4C Change Log
+## Next Version (Work in Progress)
+
+Changes:
+
+ * With `MD_FLAG_LATEXMATHSPANS`, LaTeX math spans (`$...$`) and LaTeX display
+ math spans (`$$...$$`) are recognized. (Note though that the HTML renderer
+ outputs them verbatim.) Thanks for the feature belong to [Tilman Roeder](
+ https://github.com/dyedgreen).
+
+
## Version 0.3.4
Changes:
diff --git a/README.md b/README.md
index a026f6b..8656050 100644
--- a/README.md
+++ b/README.md
@@ -101,6 +101,10 @@ extensions:
* With the flag `MD_FLAG_PERMISSIVEWWWAUTOLINKS` permissive WWW autolinks
(without any scheme specified; `http:` is assumed) are supported.
+ * With the flag `MD_FLAG_LATEXMATHSPANS` LaTeX math spans (`$...$`) and
+ LaTeX display math spans (`$$...$$`) are supported. (Note though that the
+ HTML renderer outputs them verbatim.)
+
The syntax of the extensions is described on [MD4C wiki].
Few features (those some people see as mis-features) of CommonMark
diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index b8e335b..88394f8 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -60,7 +60,7 @@ $PYTHON "$TEST_DIR/spec_tests.py" -s "$TEST_DIR/tasklists.txt" -p "$PROGRAM --ft
echo
echo "LaTeX extension:"
-$PYTHON "$TEST_DIR/spec_tests.py" -s "$TEST_DIR/latex.txt" -p "$PROGRAM --flatex-math"
+$PYTHON "$TEST_DIR/spec_tests.py" -s "$TEST_DIR/latex-math.txt" -p "$PROGRAM --flatex-math"
echo
echo "Pathological input:"
diff --git a/test/latex.txt b/test/latex.txt
deleted file mode 100644
index ed2b947..0000000
--- a/test/latex.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-
-# LaTeX
-
-With the flag `MD_FLAG_LATEXMATHSPANS`, MD4C enables extension for recognition
-of LaTeX style equation spans.
-
-An equation is is any text wrapped in tildes ($ or $$).
-
-```````````````````````````````` example
-$a+b=c$ Hello, world!
-.
-<p><equation>a+b=c</equation> Hello, world!</p>
-````````````````````````````````
-
-If a double dollar sign is used, the equation is a display equation.
-
-```````````````````````````````` example
-This is a display equation: $$\int_a^b x dx$$.
-.
-<p>This is a display equation: <equation type="display">\int_a^b x dx</equation>.</p>
-````````````````````````````````
-
-Equations may span multiple lines.
-
-```````````````````````````````` example
-$$
-\int_a^b f(x) dx
-$$
-<p><equation type="display">\int_a^b f(x) dx </equation></p>
-````````````````````````````````