Age | Commit message (Collapse) | Author | Files | Lines |
|
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 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.
|
|
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.)
|
|
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).
|
|
|
|
This will only read the insertions, and ignore the deletions.
|
|
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.
|
|
|
|
This cleans up them implementation, and cuts down on tree-walking.
Anecdotally, I've seen about a 3-fold speedup.
|
|
The normalizing tests revealed a problem with unformatted spaces, brought about
by `spanTrim`. This fixes by not trimming the spaces out of spans until they
are in their final form.
|
|
There were some problems with the old str normalization. This fixes those
problems. Also, since it drills down on its own, it only needs to be
mapped over the blocks, not walked over the tree.
|
|
This was how it used to be before it was folded into blockNormalize.
|
|
`normalize` from Text.Pandoc.Shared is more general. In tests, though,
it more than doubles the run time. `strNormalize` does less, but it does
what we need. This comment is added for future maintainability.
|
|
Previously DefinitionList had been left out of `blockNormalize`. Now it
is included.
|
|
Use a function `stripSpaces`, instead of recursion. Makes it a bit
easier to read and mantain, and simplify normalizing DefinitionList,
which was left out the first time.
|
|
`blockNormalize` previously forgot to account for the case in which a
Header's inlines did not start with a space.
|
|
This will help take care of spaces introduced at the beginning of strings.
|
|
|
|
|
|
For consistency with the existing writer.
|