Age | Commit message (Collapse) | Author | Files | Lines |
|
This requires an updated version of pandoc-types that
introduces PageBreak definition.
Not that this initial commit only introduces ODT pagebreaks
and distinguishes for it page breaks before, after, or both,
the paragraph, as read from the style definition.
|
|
Removed separate 'parent' param in paraStyle.
|
|
This change makes the writer create only as many temporary
text styles as are absolutely necessary. It also consolidates
adjacent nodes with the same style.
Closes #3371.
|
|
|
|
|
|
So far this just reproduces capacity.
Later we'll be able to add features like warning
messages, dynamic loading of xml syntax definitions,
and dynamic loading of themes.
|
|
Unprefixed numbers where used by older org-mode versions, but are no
longer supported.
|
|
This addresses a problem of too-wide tables when empty cells
are used.
Thanks to Joost Kremers for reporting the issue.
|
|
Closes #3298.
|
|
Closes #3270.
|
|
Fix interaction of top-level divisions `part` or `chapter` with
unnumbered headers when emitting LaTeX. Headers are ensured to be
written using stared commands (like `\subsection*{}`).
Fixes: #3272
|
|
Previously pandoc would sometimes wrap lines too early
due to this bug.
Closes #3277.
|
|
Previously setting writerStandalone = True did nothing unless
a template was provided in writerTemplate. Now a fragment
will be generated if writerTemplate is Nothing; otherwise,
the specified template will be used and standalone output
generated. [API change]
|
|
|
|
The "default" option is no longer represented as `Nothing` but via a new
type constructor, making the `Maybe` wrapper superfluous.
The default behavior of using heuristics can now be enabled explicitly
by setting `--top-level-division=default`.
API change (`Text.Pandoc.Options`): The `Division` type was renamed to
`TopLevelDivision`. The `Section`, `Chapter`, and `Part` constructors
were renamed to `TopLevelSection`, `TopLevelChapter`, and
`TopLevelPart`, respectively. An additional `TopLevelDefault`
constructor was added, which is now also the new default value of the
`writerTopLevelDivision` field in `WriterOptions`.
|
|
indent (#2757)"
This reverts commit fee0b913c5dd95e50845f6f35430b7582322ef0b.
The previous commit did not provide a good way to get increased
indentation for nested block quotes.
Rolling it back for now. @jjsheets feel free to submit something
that handles multiple levels of block quote smoothly, if you like.
|
|
* Open Document writer: set first level of blockquotes to not use indent
Nested blockquotes start using indents like before. Quotation style is
still in use, so the style's indent settings take effect on the first
level of blockquotes.
* Removed list construction to improve pull request to fix #2747
|
|
Latex doesn't like when hypertargets or images are
put in the options list of the section. They are not
lost since they were actually duplicated and present
also in the second argument list.
Note on the implementation:
I had to inline the definiton of 'foldMap' since it is
not implemented in every version of Haskell that Pandoc
supports.
|
|
ODT's reader always put empty captions for the parsed
tables. This commit
1) checks paragraphs that follow the table definition
2) treats specially a paragraph with a style named 'Table'
3) does some postprocessing of the paragraphs that combines
tables followed immediately by captions
The ODT writer used 'TableCaption' style name for the caption
paragraph. This commit follows the open office approach which
allows for appending captions to table but uses a built-in style
named 'Table' instead of 'TableCaption'. Any users of odt format
(both writer and reader) are therefore required to change the
style's name to 'Table', if necessary.
|
|
Pandoc uses heuristics to determine the most resonable top-level
division type when emitting LaTeX or Docbook markup. It is now possible
to overwrite this implicitly set top-level division via the
`top-level-division` command line parameter.
API change (`Text.Pandoc.Options`): the type of the
`writerTopLevelDivision` field in of the `WriterOptions` data type is
altered from `Division` to `Maybe Division`. The field's default value
is changed from `Section` to `Nothing`.
Closes: #3197
|
|
|
|
The bugs caused spurious blank lines in grid tables
when we had things like
blankline $$ blankline
Closes #3251.
|
|
|
|
|
|
If cells contain more than a single Plain or Para, then
we need to set nonzero widths and put contents into minipages.
Closes #2666.
|
|
This also fixes excessive CPU and memory usage for tables
when --columns is set in such a way that cells must be very
tiny.
Now cells are guaranteed to be big enough so that single
words don't need to line break, even if this pushes the
line length above the column width.
Closes #1911.
|
|
Closes #3238.
Previously the Compact style wasn't being applied properly
to empty cells.
|
|
...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.
|