Commit graph

5590 commits

Author SHA1 Message Date
Matthew Pickering
116f03a70a EPUB Reader: Removed incorrectly set reader flag 2014-08-08 22:31:02 +01:00
John MacFarlane
aae90a8671 Merge pull request #1503 from jkr/streamlineMath
OMath parser: Change signature of exported function.
2014-08-08 13:45:30 -07:00
John MacFarlane
f723a0575d Markdown writer: Respect -raw_html.
pandoc -t markdown-raw_html should not emit any raw HTML, even
span and div tags that go with pandoc Span and Div elements.

Cleaned up a bit of the logic with extensions and plain.
2014-08-08 13:34:57 -07:00
Jesse Rosenthal
a426812ccc OMath parser: Change signature of exported function.
This changes the signature of the exported `readOMML` to `String ->
Either String [Exp]`, so it can now, in theory, be slotted into
TeXMath. It doesn't have any real error reporting yet, but that might
make more sense once I put it in a branch, and understand how it works
in the other readers.

It also now reads strings that parse to either oMath or oMathPara
elements. Note that the distinction is lost in the output. It's up to
the caller to remember the display type.
2014-08-08 16:34:38 -04:00
John MacFarlane
7b47042ae6 Textile reader: fixed list parsing bug. Closes #1500. 2014-08-08 12:18:47 -07:00
John MacFarlane
dd78dd6d1b Textile reader: don't allow inline formatting to extend over newline.
This matches behavior of RedCarpet, avoids some ugly bugs, and improves
performance.
2014-08-08 12:18:47 -07:00
John MacFarlane
e5fb97ff4f Merge pull request #1502 from jkr/streamlineMath
Streamline OMML parser
2014-08-08 11:26:26 -07:00
Jesse Rosenthal
2f7a627f6d OMath: Finish initial cleanup.
This gets rid of commented-out functions, cleans up whitespace errors,
and exports and imports the correct functions.
2014-08-08 14:16:54 -04:00
Jesse Rosenthal
ba5804f9ec OMath: Remove Namespaces
We still need to test against prefixes, but this is only going to look
at oMath fragments, so we're not going to be worried about looking up
the real namespace.
2014-08-08 14:15:17 -04:00
Jesse Rosenthal
0acd139fb1 OMath: Start phasing out internal OMath type.
This is the first step in removing the intermediate OMath type, which we
no longer need since we're writing straight to TeXMath Exp.
2014-08-08 14:14:30 -04:00
Jesse Rosenthal
cf849443cb OMath parser: don't group expressions if there's only one. 2014-08-08 14:12:05 -04:00
Matthew Pickering
40602c3df6 HTML EPUB exts: switch element can now be in either the inline or block position 2014-08-08 10:25:40 -07:00
John MacFarlane
10b662c120 EPUB test renaming.
Renamed epub test files so they're identified more clearly as
epub:  features.{epub,native} -> epub.features.{epub,native},
and similarly with formatting.{epub,native}.

Added epub test files to cabal file, so they'll be included in
the tarball.
2014-08-07 22:25:06 -07:00
John MacFarlane
94466c0060 HTML reader: Really ignore DOCTYPE and xml declarations.
This actually does what d71b013841
said it did.

Revised epub tests to remove the repeated DOCTYPE and xml tags.
2014-08-07 22:12:44 -07:00
John MacFarlane
3c4079edc8 Merge pull request #1488 from mpickering/epubfixes
EPUB Reader: Improved image extraction
2014-08-07 19:00:32 -07:00
John MacFarlane
08bed142ba Merge pull request #1496 from mpickering/master
Org Writer: Write anchor elements
2014-08-07 16:29:20 -07:00
Matthew Pickering
07bb41d6da Org Writer: Write anchor elements
The Org Writer now writes empty span elements which have an id as an anchor.

For example `Span ("uid", [], []) []` becomes `<<uid>>`
2014-08-08 00:20:18 +01:00
Matthew Pickering
090b2da267 EPUB tests: Updated test file 2014-08-07 22:56:30 +01:00
Matthew Pickering
19d2ff68b1 EPUB Reader: Improved how images are extracted 2014-08-07 22:56:30 +01:00
John MacFarlane
17e48ba81e Merge pull request #1494 from jkr/math-module
Math module
2014-08-07 13:44:19 -07:00
John MacFarlane
44dad52866 Merge pull request #1495 from jkr/inline-drawings
Docx reader: Inline image fix
2014-08-07 13:41:58 -07:00
Jesse Rosenthal
98d14b2b2a Docx reader: Test inline image code. 2014-08-07 15:34:49 -04:00
Jesse Rosenthal
7bd7d4d476 Docx reader: Handle inline drawings.
Previous drawings that were under some other toplevel run (i.e., a
hyperlink) wouldn't be properly handled. This should fix that.
2014-08-07 15:01:05 -04:00
Jesse Rosenthal
d293dd528b OMath module: Add new file. 2014-08-07 12:41:33 -04:00
Jesse Rosenthal
a7967d1aef Docx reader: Split math out into math module.
Could use some cleanup, but this is the first step for getting
an OMML reader into TeXMath.
2014-08-07 12:20:22 -04:00
Matthew Pickering
13f26af84f Docx Reader: Added Default instances and removed withDState
Signed-off-by: Jesse Rosenthal <jrosenthal@jhu.edu>
2014-08-06 19:15:33 -04:00
John MacFarlane
482f7f8e15 pandoc: Don't strip path off of sourceURL.
We need this information for relative URLs!

This should resolve the continuing problem noted in #750.
2014-08-06 14:36:46 -07:00
John MacFarlane
56f2c61cf2 Merge pull request #1492 from jkr/nodocxenv
Get rid of unused docx variable.
2014-08-06 14:16:25 -07:00
Jesse Rosenthal
91ab2f155f Get rid of unused docx variable.
Since changing the Docx type, this is no longer necessary. Thanks to
Matthew Pickering for picking up on this.
2014-08-06 12:19:24 -04:00
John MacFarlane
444b1c2ad8 Merge pull request #1491 from jkr/texmath-equations
Docx Reader: Use TeXMath for writing equations.
2014-08-06 09:07:00 -07:00
Jesse Rosenthal
cd9ca5a18a Docx reader: remove now-unnecessary state variable.
This also introduces a `defaultDState` value.
2014-08-06 11:20:41 -04:00
Jesse Rosenthal
cdd769624f Remove now-unnecessary TexChar
TeXMath does the work now.
2014-08-06 11:20:41 -04:00
Jesse Rosenthal
06488c95fa Add a note on how mapD works. 2014-08-06 11:20:41 -04:00
Jesse Rosenthal
3bc2ea4cf7 Docx reader: Use TeXMath to write math
The new version of TeXMath can translate from its type system into
LaTeX. So instead of writing the LaTeX ourself, we write to the TeXMath
`Exp` type, and let TeXMath do the rest.
2014-08-06 11:20:27 -04:00
John MacFarlane
192a33cc61 Merge pull request #1490 from ulikoehler/master
MediaWiki reader doesn't recognize german "Bild"
2014-08-05 16:25:59 -07:00
Uli Köhler
9d07db933c MediaWiki reader doesn't recognize german "Bild" 2014-08-06 00:47:23 +02:00
John MacFarlane
1819bdfaed Merge pull request #1487 from mpickering/master
MediaBag: Improved normalisation when writing files
2014-08-05 08:28:28 -07:00
Matthew Pickering
b04bb3b6d2 MediaBag: Improved normalisation when writing files 2014-08-05 11:02:23 +01:00
John MacFarlane
2de2842bdd Merge pull request #1486 from Aelve/minor
Very minor cleanup and readability changes
2014-08-04 22:07:02 -07:00
John MacFarlane
39b59b7603 Merge pull request #1476 from jkr/endnote-fix
Docx Parser: Produce endnotes.
2014-08-04 21:59:58 -07:00
John MacFarlane
d71b013841 HTML reader: ignore <?xml..> and <DOCTYPE..> tags.
Previously they were parsed as raw.
2014-08-04 18:39:39 -07:00
John MacFarlane
2fabdf9d93 README: Removed duplicate ref of [EPUB]. 2014-08-04 12:43:13 -07:00
John MacFarlane
40d8100d44 Use texmath 0.7 interface. 2014-08-04 11:13:09 -07:00
Artyom Kazak
675b15458a Slightly fix readability of main program file. 2014-08-04 19:58:25 +04:00
Artyom Kazak
141fdf944a Add PatternGuards pragmas. 2014-08-04 19:58:25 +04:00
Artyom Kazak
eb88444452 Remove redundant isHexDigit function. 2014-08-04 19:58:25 +04:00
Artyom Kazak
e51a2cedf9 Remove dangling where from one function. 2014-08-04 19:58:25 +04:00
Artyom Kazak
82118b3328 Use stripPrefix where appropriate. 2014-08-04 19:57:42 +04:00
Artyom Kazak
feebab9740 Clean up mediaTypeOf a bit. 2014-08-04 19:41:37 +04:00
Artyom Kazak
f659644fcc Use mapM_ instead of () <$ mapM in one place. 2014-08-04 19:41:37 +04:00