Age | Commit message (Collapse) | Author | Files | Lines |
|
...when `bracketed_spans` enabled.
Closes #3229.
|
|
|
|
|
|
Previously a tight bullet sublist got rendered with
a blank line after, while a tight ordered sublist did
not. Now we don't get the blank line in either case.
Closes #3232.
|
|
Previously two backslashes were inserted, which gave a
literal backslash.
Closes #3225.
|
|
When a piece of text has a text 'Source_Text' then
we assume that this is a piece of the document
that represents a code that needs to be inlined.
Addapted an odt writer to also reflect that change;
previously it was just writing a 'preformatted' text using
a non-distinguishable font style.
Code blocks are still not recognized by the ODT reader.
That's a separate issue.
|
|
We already handled alt text. This just puts the image "title" into the
docx "title" attr.
|
|
This also affects other HTML slide show formats.
Closes #2221.
|
|
|
|
The `--chapters` option is replaced with `--top-level-division` which allows
users to specify the type as which top-level headers should be output. Possible
values are `section` (the default), `chapter`, or `part`.
The formats LaTeX, ConTeXt, and Docbook allow `part` as top-level division, TEI
only allows to set the `type` attribute on `div` containers. The writers are
altered to respect this option in a sensible way.
|
|
TEI doesn't have `<book>` elements but only generic `<divN>` division elements.
Checking the template for a trailing `</book>` is nonsensical.
|
|
Add --parts command line argument.
This only effects LaTeX writer, and only for non-beamer output formats.
It changes the output levels so the top level is 'part', the next
'chapter' and then into sections.
|
|
The writer no longer adds an extra space before footnote markers.
Fixes: #3162
|
|
We do basically the same thing every time we insert notes, so let's cut
down on code duplication.
|
|
The following markup features are used to output the lines of the `LineBlock`
element:
- AsciiDoc: a `[verse]` block,
- ConTeXt: text surrounded by `\startlines` and `\endlines`,
- HTML: `div` with an per-element style setting to interpret the content as
pre-wrapped,
- Markdown: line blocks if the `line_blocks` extension is enabled, a simple
paragraph with hard linebreaks otherwise,
- Org: VERSE block,
- RST: a line block, and
- all other formats: a paragraph, containing hard linebreaks between lines.
Custom lua writers should be updated to use the `LineBlock` element.
|
|
This allows footnotes and refs to be placed at the end of blocks and
sections. Note that we only place them at the end of blocks that are at
the top level and before headers that are the top level. We add an
environment variable to keep track of this. Because we clear the
footnotes and refs when we use them, we also add a state variable to
keep track of the starting number.
Finally, note that we still add any remaining footnotes at the end. This
takes care of the final section, if we are placing at the end of a
section, and will always come after a final block as well.
|
|
This will make it easier to keep track of what level of block we are at.
|
|
Previously we'd emit raw HTML tables even if the `raw_html`
extension was disabled.
Now we just emit `[TABLE]` if no table formats are enabled
and raw HTML is not enabled.
We also check for the `raw_html` extension before emiting
a raw HTML block.
Closes #3154.
|
|
PrintWidth is set at the beginning and stays the same throughout the
document writing, so we just set it as an env variable in the Reader
monad.
|
|
More meaningful variable name, and explanatory comment.
|
|
Now RTL is turned and off by a general function, `withDirection`
wrapping `inlineToOpenXML` and `blockToOpenXML`. This acts according to
the `envRTL` variable. This means we can just set the environment at the
outset, and change the environment with `local` as need be.
Note that this requires making the `inlineToOpenXML` and
`blockToOpenXML` functions into wrappers around
primed-versions (`{inline,block}ToOpenXML`) where the real work takes
place.
|
|
In general, we want things that are either:
1. unchanging environment variables, or
2. environment variables that will change for a the scope of
a function and then pop back
to be in the reader monad. This is safer for (1), since we won't
accidentally change it, and easier for (2), since we can use `local`
instad of setting the old value and then resetting.
We keep the StateT monad for values that we will want to accumulate or
change and then use later.
|
|
A few commented out functions were left in the code during the
conversion from StateT to ReaderT. This removes them.
|
|
We had to use this because we set the env, which means that setRTL
wouldn't do anything at the top level. We now don't set the env (it will
always be false at the outset), which means the toplevel setRTL will
work if necessary.
|
|
We only filter on the name, not the prefix.
|
|
At the toplevel we don't check to see if RTL is already set.
|
|
|
|
|
|
Things that get pushed and then reset are better in ReaderT, because
they can be run with `local`.
|
|
This will allow us to add text and paragraph properties depending on if
rtl is already set or not.
(It would probably be cleaner and safer to move the paraprops and
textprops to this part of the stack in the future.)
|
|
This means that underscores won't be used for emphasis,
or CAPS for bold. The metadata fields will just have unadorned
text.
Closes #3066.
|
|
In AsciiDoc, you must use a special form of emphasis (double `__`)
for intraword emphasis. Pandoc was previously using this more
than necessary.
Closes #3068.
|
|
LaTeX: Do not set [htbp] figure placement options.
|
|
Backticks in verbatim environments are converted to
open-single-quotes. This change makes them appear as backticks. This
corresponds to how we treat `'' in verbatim environments (with
\textquotesingle{}).
|
|
We don't want ligatures like ` ?` ` (which produces `¿`) inside
`\texttt{}` environments, so we enclose the backtick in braces.
This fixes #3121
|
|
This closes #3102. Note that DocBook does not have a class attribute,
but at least this provides an anchor for internal links.
|
|
This was only necessary for GHC versions with base below 4.5
(i.e., ghc < 7.4).
|
|
Do not set `[htbp]` placement options on each figure to allow overriding
them by them using `\fps@figure` redefintion either in header or in
template.
|
|
Translate NARROW NO-BREAK SPACE into LaTeX' `\,`.
|
|
Closes #3089.
|
|
Pandoc and Org-mode use different programming language identifiers. An
additional translation between those identifiers is added to avoid
unexpected behavior. This fixes a problem where language specific
source code would sometimes be output as example code.
|
|
Org-mode treats links as document internal searches unless the link
target looks like a URL or file path, either relative or absolute. This
change ensures that this is always the case.
|
|
An Org-mode figure should be surrounded by blank lines. The figure
would be recognized regardless, but images in the following line would
unintentionally be treated as figures as well.
|
|
Org-mode only treats an image as a figure if it is directly preceded by
a caption.
|
|
Use "custom-style" instead of "docx-style." This allows it to be used in
other formats like ODT in the future.
|
|
|
|
|
|
This enables dynamic styling on spans. It uses the same prefix as we
used on divs ("docx-style" for the moment). It does not yet inject the
style into styles.xml.
|
|
This injects new dynamic paragraph properties to be into the style
file. Nothing occurs if the prop already exists in the style file.
|
|
We want to be able to inject these into our styles.xml.
|