diff --git a/MANUAL.txt b/MANUAL.txt index f69ed95f1..cc3f55a42 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -1669,7 +1669,7 @@ header when requesting a document from a URL: : Specify the method used to display TeX math. The following methods are possible (some take an optional URL, separated - from the method name by a colon). The default value is `plain`. + from the method name by a colon). The default value is `mathml`. `plain` diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs index 7cf277b09..c7c644ce9 100644 --- a/src/Text/Pandoc/App/Opt.hs +++ b/src/Text/Pandoc/App/Opt.hs @@ -46,7 +46,7 @@ import Text.Pandoc.Filter (Filter (..)) import Text.Pandoc.Logging (Verbosity (WARNING), LogMessage(..)) import Text.Pandoc.Options (TopLevelDivision (TopLevelDefault), TrackChanges (AcceptChanges), - WrapOption (WrapAuto), MathMethod (PlainMath), + WrapOption (WrapAuto), MathMethod (MathML), ReferenceLocation (EndOfDocument), CaptionPosition (..), ObfuscationMethod (NoObfuscation), @@ -853,7 +853,7 @@ defaultOpts = Opt , optSyntaxDefinitions = [] , optSyntaxHighlighting = DefaultHighlightingString , optTopLevelDivision = TopLevelDefault - , optMathMethod = PlainMath + , optMathMethod = MathML , optAbbreviations = Nothing , optReferenceDoc = Nothing , optSplitLevel = 1 diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs index a89d4d8e4..114f093dd 100644 --- a/src/Text/Pandoc/Options.hs +++ b/src/Text/Pandoc/Options.hs @@ -402,7 +402,7 @@ instance Default WriterOptions where , writerListOfFigures = False , writerListOfTables = False , writerIncremental = False - , writerMathMethod = PlainMath + , writerMathMethod = MathML , writerNumberSections = False , writerNumberOffset = [0,0,0,0,0,0] , writerSectionDivs = False diff --git a/test/command/10915.md b/test/command/10915.md index 36ba24499..69ecea25f 100644 --- a/test/command/10915.md +++ b/test/command/10915.md @@ -3,6 +3,7 @@ \newcommand{\a}{\ifmmode x \else y \fi} $\a$ and \a ^D -

x and y

+

xx +and y

``` diff --git a/test/command/8789.md b/test/command/8789.md index 291f5082e..c98a191a7 100644 --- a/test/command/8789.md +++ b/test/command/8789.md @@ -33,8 +33,10 @@ 160 2 -This is a test: a2 + b2 = c2 +This is a test: +a2+b2=c2\begin{equation*} + a^2+b^2 = c^2 +\end{equation*} diff --git a/test/s5-basic.html b/test/s5-basic.html index 4803e344a..e31dfa21a 100644 --- a/test/s5-basic.html +++ b/test/s5-basic.html @@ -31,7 +31,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} @@ -70,8 +69,7 @@

Math

diff --git a/test/s5-fragment.html b/test/s5-fragment.html index 1a8d4839d..a21c7cc45 100644 --- a/test/s5-fragment.html +++ b/test/s5-fragment.html @@ -5,6 +5,5 @@

Math

diff --git a/test/s5-inserts.html b/test/s5-inserts.html index dfffa355b..4ab74632d 100644 --- a/test/s5-inserts.html +++ b/test/s5-inserts.html @@ -29,7 +29,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} STUFF INSERTED @@ -49,8 +48,7 @@ STUFF INSERTED

Math

STUFF INSERTED diff --git a/test/writer.docbook4 b/test/writer.docbook4 index 11d6a542d..cc22a0733 100644 --- a/test/writer.docbook4 +++ b/test/writer.docbook4 @@ -1,6 +1,6 @@ - +
Pandoc Test Suite @@ -1052,39 +1052,39 @@ These should not be escaped: \$ \\ \> \[ \{ - 2 + 2 = 4 + 2+2=4 - x ∈ y + xy - α ∧ ω + αω - 223 + 223 - p-Tree + p-Tree Here’s some display math: - $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ + ddxf(x)=limh0f(x+h)f(x)h Here’s one that has a line break in it: - α + ω × x2. + α+ω×x2. diff --git a/test/writer.docbook5 b/test/writer.docbook5 index a0597a710..828abb172 100644 --- a/test/writer.docbook5 +++ b/test/writer.docbook5 @@ -2,6 +2,7 @@
Pandoc Test Suite @@ -1027,39 +1028,39 @@ These should not be escaped: \$ \\ \> \[ \{ - 2 + 2 = 4 + 2+2=4 - x ∈ y + xy - α ∧ ω + αω - 223 + 223 - p-Tree + p-Tree Here’s some display math: - $$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$ + ddxf(x)=limh0f(x+h)f(x)h Here’s one that has a line break in it: - α + ω × x2. + α+ω×x2. diff --git a/test/writer.html4 b/test/writer.html4 index c075c7fb2..d2a027a3e 100644 --- a/test/writer.html4 +++ b/test/writer.html4 @@ -174,7 +174,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} @@ -618,16 +617,15 @@ href="http://example.com/?foo=1&bar=2">quoted link”.

LaTeX

  • -
  • 2 + 2 = 4
  • -
  • x ∈ y
  • -
  • α ∧ ω
  • -
  • 223
  • -
  • p-Tree
  • -
  • Here’s some display math: $$\frac{d}{dx}f(x)=\lim_{h\to -0}\frac{f(x+h)-f(x)}{h}$$
  • -
  • Here’s one that has a line break in it: α + ω × x2.
  • +
  • 2+2=42+2=4
  • +
  • xyx \in y
  • +
  • αω\alpha \wedge \omega
  • +
  • 223223
  • +
  • pp-Tree
  • +
  • Here’s some display math: +ddxf(x)=limh0f(x+h)f(x)h\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
  • +
  • Here’s one that has a line break in it: +α+ω×x2\alpha + \omega \times x^2.

These shouldn’t be math:

    diff --git a/test/writer.html5 b/test/writer.html5 index 853ec01d6..a6961258d 100644 --- a/test/writer.html5 +++ b/test/writer.html5 @@ -174,7 +174,6 @@ margin: 0 0.8em 0.2em -1.6em; vertical-align: middle; } - .display.math{display: block; text-align: center; margin: 0.5rem auto;} @@ -618,16 +617,15 @@ href="http://example.com/?foo=1&bar=2">quoted link”.

    LaTeX

    • -
    • 2 + 2 = 4
    • -
    • x ∈ y
    • -
    • α ∧ ω
    • -
    • 223
    • -
    • p-Tree
    • -
    • Here’s some display math: $$\frac{d}{dx}f(x)=\lim_{h\to -0}\frac{f(x+h)-f(x)}{h}$$
    • -
    • Here’s one that has a line break in it: α + ω × x2.
    • +
    • 2+2=42+2=4
    • +
    • xyx \in y
    • +
    • αω\alpha \wedge \omega
    • +
    • 223223
    • +
    • pp-Tree
    • +
    • Here’s some display math: +ddxf(x)=limh0f(x+h)f(x)h\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
    • +
    • Here’s one that has a line break in it: +α+ω×x2\alpha + \omega \times x^2.

    These shouldn’t be math: