Age | Commit message (Collapse) | Author | Files | Lines |
|
Nicer Docx type
|
|
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.
|
|
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.
|
|
Removed `Ext_fenced_code_attributes` from `markdown_github`
extensions.
If this extension is not set, the first class attribute will
be printed after the opening fence as a bare word.
Closes #1416.
|
|
Replaced all inline occurences of fmap with the more idiomatic (<$>).
|
|
This function is equivalent to the more general (<*) which is defined in
Control.Applicative. This change makes pandoc code easier to understand for
those not familar with the codebase.
|
|
Before it wasn't possible to use these general combinators with the ParsecT
transformer but with the more general types this is now possible.
|
|
Closes #1394.
|
|
This sets `stateInHtmlBlock` to `Just "div"` when we're parsing
an HTML div.
Without this fix, a closing `</div>` tag could be parsed as part
of a list item rather than after the list.
|
|
Closes #1121.
|
|
Semantics should be the same.
|
|
The standard seems to be captions above tables. (See
http://tex.stackexchange.com/questions/3243/why-should-a-table-caption-be-placed-above-the-table)
|
|
|
|
|
|
claremacrae-dokuwiki
|
|
- We no longer include trailing spaces and newlines in the
raw blocks.
- We look for closing tags for elements (but without backtracking).
- Each block-level tag is its own RawBlock; we no longer try to
consolidate them (though `--normalize` will do so).
Closes #1330.
|
|
|
|
This is used to keep track of the ending tag we're waiting
for when we're parsing inside HTML block tags.
|
|
|
|
- Added `audio` and `source` in `eitherBlockOrInline`.
- Moved `video`, `svg`, `progress`, `script`, `noscript`, `svg` from
`blockTags` to `eitherBlockOrInline`.
- `map` and `object` were mistakenly in both lists; they have been removed
from `blockTags`.
|
|
Docx Reader: Parse Docx OMML math/equations
|
|
|
|
|
|
|
|
|
|
|
|
This is a first stab at writing out equations in LaTeX based on
omml equations in Word. There are some glitches: unicode chars not known to
LaTeX are silently skipped, and functions (such as `\oiiint`) not in the
standard LaTeX packages are inserted, which can lead to pdf compilation
errors (depending, of course, on your preamble).
Adding, for example, `\usepackage[charter]{mathdesign}` to the preamble will
allow you to use most of the more esoteric functions.
|
|
This will allow us to deal with unicode characters from word equations. This
part of the process will need to continue to be improved.
|
|
|
|
|
|
This added \cite and \begin latex to the testuite output.
|
|
TODO Also implement nested blockquotes.
|
|
|
|
To avoid to pass opts explicitly around (as we
do not use it very much at the moment anyway)
|
|
|
|
|
|
For example, this fixes the display of a broken table, and
it also fixes the various HTML horizontal rules.
|
|
|
|
This gets rid of `divAttrToContainers`: an internal convenience function
which had become pretty inconvenient. Rather than converting classes and
indentations to string lists and back, we deal with the `pPr` attribute
directly.
|
|
* Added normalizeInlines, normalizeBlocks.
* Type signature is now more narrow, `Pandoc -> Pandoc` instead of
`Data a :: a -> a`. Some users may need to change their uses of
`normalize` to the newly exported `normalizeInlines` or
`normalizeBlocks`.
|
|
Fix hanging indent behavior
|
|
Here, when hanging indents are greater than or equal to left indents, we
don't set it to block quote. Such indents are frequently used in
academic bibliographies. (Thanks to Caleb McDaniel.)
|
|
This lets us keep more information about the indentation, and act
accordingly in the reader.
|
|
Docx writer: insert bookmark tags inside <w:p> tag.
|
|
This makes the header anchors in pandoc-generated ooxml match those
generated by word.
|
|
|
|
The new code was got from inspecting changes in MediaWiki.hs
This slightly changes the output of Div blocks, but I'm not
convinced the original behaviour was really correct anyway.
The code for handling Span does nothing for now, until I can
work out the desired behaviour, and add tests for it.
|
|
|
|
Previously, a fresh state was created for the purpose of updating. In
the future, when there is more than one field in the state, this
obviously won't work.
|
|
Previously, only those with an anchor got an auto id. Now, all do, which
puts it in line with pandoc's markdown extension.
|