aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Docx/Parse.hs
AgeCommit message (Collapse)AuthorFilesLines
2014-08-09Docx Reader: Added recognition of sym element in paragraphsMatthew Pickering1-0/+19
2014-08-08OMath parser: Change signature of exported function.Jesse Rosenthal1-3/+7
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-08OMath: Finish initial cleanup.Jesse Rosenthal1-14/+4
This gets rid of commented-out functions, cleans up whitespace errors, and exports and imports the correct functions.
2014-08-08OMath: Remove NamespacesJesse Rosenthal1-2/+2
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-07Merge pull request #1494 from jkr/math-moduleJohn MacFarlane1-366/+7
Math module
2014-08-07Docx reader: Handle inline drawings.Jesse Rosenthal1-3/+15
Previous drawings that were under some other toplevel run (i.e., a hyperlink) wouldn't be properly handled. This should fix that.
2014-08-07Docx reader: Split math out into math module.Jesse Rosenthal1-366/+7
Could use some cleanup, but this is the first step for getting an OMML reader into TeXMath.
2014-08-06Add a note on how `mapD` works.Jesse Rosenthal1-0/+3
2014-08-06Docx reader: Use TeXMath to write mathJesse Rosenthal1-22/+125
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-01Docx Parser: Produce endnotes.Jesse Rosenthal1-2/+2
The parser had been changing footnotes and endnotes into footnotes. This isn't a problem, because pandoc collapses them, but the parser should maintain as much of the docx structure as is collapsed, and let the toplevel reader worry about how to translate it into Pandoc. (This would be an issue when, as is planned, the docx parser spins off into its own module.) The output is the same, so no test change is required.
2014-07-30Docx reader: Make docx reader put image data in MediaBag.Jesse Rosenthal1-5/+5
Image data will not be put in a media bag map, which will be output along with the pandoc output.
2014-07-12Removed space at ends of lines in source.John MacFarlane1-24/+24
2014-07-12Docx Reader: Add a compatibility layer for Except.Jesse Rosenthal1-3/+3
mtl switched from ErrorT to ExceptT, but we're not sure which mtl we'll be dealing with. This should make errors work with both. The main difference (beside the name of the module and the monad transformer) is that Except doesn't require an instance of an Error Typeclass. So we define that for compatability. When we switch to a later mtl, using Control.Monad.Exception, we can just erase the instance declaration, and all should work fine.
2014-07-12Docx Reader: A nicer Docx type.Jesse Rosenthal1-685/+670
This modifies the Docx type in the parser to avoid all the extra files (Notes, numbering, etc). A reader monad keeps track of these, and applies them at the end. The reader monad is stacked with ErrorT to enable better error-handling than the old Maybes. (Note that the better error handling isn't really there yet, but it is now possible.) One long-term goal of these changes is to make it easier to write the Docx type. This should make it easier to develop a standalone docx package in the future.
2014-07-02Docx Reader: Parse omml equations.Jesse Rosenthal1-8/+336
2014-06-29Docx reader: Add ParIndentation type to parser.Jesse Rosenthal1-5/+26
This lets us keep more information about the indentation, and act accordingly in the reader.
2014-06-25Docx reader: Code cleanup in parse.Jesse Rosenthal1-38/+12
Remove some redundant ways of dealing with Maybe.
2014-06-25Docx reader: Remove unnecessary filter in Parse.Jesse Rosenthal1-7/+2
mapMaybe does the filtering for us.
2014-06-25Docx reader: Parse Insertions and Deletions.Jesse Rosenthal1-1/+17
This is just for the Parse module, reading it into the Docx format. It still has to be translated into pandoc.
2014-06-25Docx Reader: Add change typesJesse Rosenthal1-1/+5
Insertion and deletion. Dates are just strings for now.
2014-06-19Add literal tabs to parser.Jesse Rosenthal1-1/+4
2014-06-16Naming: Use Docx instead of DocX.John MacFarlane1-0/+604
For consistency with the existing writer.