Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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.
|
|
|
|
To avoid to pass opts explicitly around (as we
do not use it very much at the moment anyway)
|
|
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.
|
|
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.
|
|
|
|
Record relationship between original id and auto id, so we can fix links
after.
|
|
In preparation for auto ids.
|
|
Using pattern guard, in preparation for doing some more complicated
stuff with it (recording header anchors, so we can change them to auto
ids.)
|
|
Use PatternGuards to get rid of need for `isJust`, `fromJust`
altogether.
|
|
It only applies to headers, so we can just apply it when we make a
header.
|
|
This is a ReaderT State stack, which keeps track of some environment info, such
as the options and the docx doc. The state will come in handy in the future,
for a couple of planned features (rewriting the section anchors as auto_idents,
and hopefully smart-quoting).
|
|
See #1346.
|
|
Track changes with options
|
|
Remove some redundant ways of dealing with Maybe.
|
|
|
|
|
|
|
|
|
|
mapMaybe does the filtering for us.
|
|
This will only read the insertions, and ignore the deletions.
|
|
This is just for the Parse module, reading it into the Docx format. It
still has to be translated into pandoc.
|
|
Insertion and deletion. Dates are just strings for now.
|
|
If a block has an indentation less than or equal to zero, it should not be
treated as a block quote.
|
|
This marks the removal of the final tree-walk in the code. (Though there
is still one in the Lists module.)
|
|
This commit also fixes a problem with the previous code pushes, which
wouldn't allow code blocks to share a div.
|
|
|
|
|
|
Docx rewrite and cleanup (in terms of Reducible typeclass)
|
|
This cleans up them implementation, and cuts down on tree-walking.
Anecdotally, I've seen about a 3-fold speedup.
|
|
This will allow us to get rid of more general functions we no longer need in
the main reader.
|
|
This defines a typeclass `Reducible` which allows us to "reduce" pandoc
Inlines and Blocks, like so
Emph [Strong [Str "foo", Space]] <++> Strong [Emph [Str "bar"]], Str
"baz"] =
[Strong [Emph [Str "foo", Space, Str "bar"], Space, Str "baz"]]
So adjacent formattings and strings are appropriately grouped.
Another set of operators for `(Reducible a) => (Many a)` are also
included.
|
|
Otherwise we get curly quotes in the PDF output.
Closes #1364.
|