From d1832da9e104d61aa6ee0161aefeabf4aef9bbd2 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 2 Dec 2007 00:36:32 +0000 Subject: Added Text.Pandoc.Readers.TeXMath and changed default handling of math. + Text.Pandoc.Readers.TeXMath exports readTeXMath, which reads raw TeX math and outputs a string of pandoc inlines that tries to render it as far as possible, lapsing into literal TeX when needed. + Added Text.Pandoc.Readers.TeXMath to pandoc.cabal + ghc66 version. + Modified writers so that readTeXMath is used for default HTMl output in HTML, S5, RTF, Docbook. + Updated README with information about how math is rendered in all formats. + Updated test suite. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1129 788f1e2b-df1e-0410-8736-df70ead52e1b --- tests/s5.basic.html | 28 +++++++++++++++++++++++- tests/s5.fragment.html | 28 +++++++++++++++++++++++- tests/s5.inserts.html | 28 +++++++++++++++++++++++- tests/writer.docbook | 14 ++++++------ tests/writer.html | 58 ++++++++++++++++++++++++++++++++++++++++++++------ tests/writer.man | 14 ++++++------ tests/writer.rtf | 14 ++++++------ 7 files changed, 153 insertions(+), 31 deletions(-) (limited to 'tests') diff --git a/tests/s5.basic.html b/tests/s5.basic.html index d5c670a0a..611818f7f 100644 --- a/tests/s5.basic.html +++ b/tests/s5.basic.html @@ -780,7 +780,33 @@ window.onresize = function(){setTimeout('fontScale()', 50);} >Math diff --git a/tests/s5.fragment.html b/tests/s5.fragment.html index b82aa290b..00166ea12 100644 --- a/tests/s5.fragment.html +++ b/tests/s5.fragment.html @@ -10,6 +10,32 @@ >Math diff --git a/tests/s5.inserts.html b/tests/s5.inserts.html index 33cd4ffe1..9575c44f4 100644 --- a/tests/s5.inserts.html +++ b/tests/s5.inserts.html @@ -27,7 +27,33 @@ STUFF INSERTED >MathSTUFF INSERTED - 2+2=4 + 2+2=4 - x \in y + x ∈ y - \alpha \wedge \omega + α ∧ ω - 223 + 223 - p-Tree + p-Tree - \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h} + \frac{d}{dx}f(x)=\limh → 0\frac{f(x+h)-f(x)}{h} Here's one that has a line break in it: - \alpha + \omega \times x^2. + α+ω × x2. diff --git a/tests/writer.html b/tests/writer.html index 752d93690..b22dd36f8 100644 --- a/tests/writer.html +++ b/tests/writer.html @@ -762,19 +762,63 @@ Blah >
  • 2+2=4
  • 2+2=4
  • x \in y
  • x ∈ y
  • \alpha \wedge \omega
  • α ∧ ω
  • 223
  • 223
  • p-Tree
  • p-Tree
  • \frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}
  • \frac{d}{dx}f(x)=\limh → 0\frac{f(x+h)-f(x)}{h}
  • Here’s one that has a line break in it: \alpha + \omega \times x^2.
  • Here’s one that has a line break in it: α+ω × x2.

    These shouldn’t be math: