Age | Commit message (Collapse) | Author | Files | Lines |
|
With simple tables, we have a clash with heading syntax.
Closes #5936.
|
|
If a simple table would be too wide, we use a grid table.
The code for generating grid tables has been adjusted to
give more intelligent column widths when widths aren't
given. (This also affects the markdown writer.)
Closes #5899.
|
|
The check whether a complex inline element following a string must be
escaped, now depends on the last character of the string instead of the
first.
Fixes: #5906
|
|
Closes #5898.
|
|
PR #5884.
+ Use pandoc-types 1.20 and texmath 0.12.
+ Text is now used instead of String, with a few exceptions.
+ In the MediaBag module, some of the types using Strings
were switched to use FilePath instead (not Text).
+ In the Parsing module, new parsers `manyChar`, `many1Char`,
`manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`,
`mantyUntilChar` have been added: these are like their
unsuffixed counterparts but pack some or all of their output.
+ `glob` in Text.Pandoc.Class still takes String since it seems
to be intended as an interface to Glob, which uses strings.
It seems to be used only once in the package, in the EPUB writer,
so that is not hard to change.
|
|
When the image has the `align-right` (etc.) class, we now use
an `:align:` attribute.
Closes #4420.
|
|
Completes 8e01ccb41dde8a5e6123f5b0746c36f240576047
|
|
+ Remove Text.Pandoc.Pretty; use doclayout instead. [API change]
+ Text.Pandoc.Writers.Shared: remove metaToJSON, metaToJSON'
[API change].
+ Text.Pandoc.Writers.Shared: modify `addVariablesToContext`,
`defField`, `setField`, `getField`, `resetField` to work with
Context rather than JSON values. [API change]
+ Text.Pandoc.Writers.Shared: export new function `endsWithPlain` [API
change].
+ Use new templates and doclayout in writers.
+ Use Doc-based templates in all writers.
+ Adjust three tests for minor template rendering differences.
+ Added indentation to body in docbook4, docbook5 templates.
The main impact of this change is better reflowing of content
interpolated into templates. Previously, interpolated variables
were rendered independently and intepolated as strings, which could lead
to overly long lines. Now the templates interpolated as Doc values
which may include breaking spaces, and reflowing occurs
after template interpolation rather than before.
|
|
* Require recent doctemplates. It is more flexible and
supports partials.
* Changed type of writerTemplate to Maybe Template instead
of Maybe String.
* Remove code from the LaTeX, Docbook, and JATS writers that looked in
the template for strings to determine whether it is a book or an
article, or whether csquotes is used. This was always kludgy and
unreliable. To use csquotes for LaTeX, set `csquotes` in your
variables or metadata. It is no longer sufficient to put
`\usepackage{csquotes}` in your template or header includes.
To specify a book style, use the `documentclass` variable or
`--top-level-division`.
* Change template code to use new API for doctemplates.
|
|
We only treat Span as transparent if it has no attributes.
|
|
Previously an Emph inside a Span was being treated as
nested markup and ignored. With this patch, the Span
is just ignored.
Closes #5446.
|
|
The haddock module header contains essentially the
same information, so the boilerplate is redundant and
just one more thing to get out of sync.
|
|
Quite a few modules were missing copyright notices.
This commit adds copyright notices everywhere via haddock module
headers. The old license boilerplate comment is redundant with this and has
been removed.
Update copyright years to 2019.
Closes #4592.
|
|
Closes #5128.
|
|
The parameter is Extensions. This allows these functions to
be sensitive to the settings of `Ext_gfm_auto_identifiers` and
`Ext_ascii_identifiers`.
This allows us to use `uniqueIdent` in the CommonMark reader,
replacing some custom code.
It also means that `gfm_auto_identifiers` can now be used
in all formats.
Semantically, `gfm_auto_identifiers` is now a modifier of
`auto_identifiers`; for identifiers to be set, `auto_identifiers`
must be turned on, and then the type of identifier produced
depends on `gfm_auto_identifiers` and `ascii_identifiers` are set.
Closes #5057.
|
|
Closes #4750.
Text.Pandoc.Writers.Shared now exports hasSimpleCells [API change].
|
|
Remove exported functions `metaValueToInlines`, `metaValueToString`.
Add new exported functions `lookupMetaBool`, `lookupMetaBlocks`,
`lookupMetaInlines`, `lookupMetaString`.
Use these whenever possible for uniformity in writers.
API change (major, because of removed function `metaValueToInlines`.
`metaValueToString` wasn't in any released version.)
|
|
We can't always tell if it's LaTeX, ConTeXt, or plain TeX.
Better just to use "tex" always.
Also changed:
ConTeXt writer: now outputs raw "tex" blocks as well as "context".
(Closes #969).
RST writer: uses ".. raw:: latex" for "tex" content.
(RST doesn't support raw context anyway.)
Note that if "context" or "latex" specifically is desired,
you can still force that in a markdown document by using
the raw attribute (see MANUAL.txt):
```{=latex}
\foo
```
Note that this change may affect some filters, if they assume that raw
tex parsed by the Markdown reader will be RawBlock (Format "latex").
In most cases it should be trivial to modify the filters to accept
"tex" as well.
|
|
Also omit Div with class "admonition-title". These are generated
by the RST reader and should be omitted on round-trip.
Closes #4833.
|
|
|
|
* Use a Span with class "title-reference" for the default
title-reference role.
* Use B.text to split up contents into Spaces, SoftBreaks, and Strs
for title-reference.
* Use Code with class "interpreted-text" instead of Span and Str for
unknown roles. (The RST writer has also been modified to round-trip
this properly.)
* Disallow blank lines in interpreted text.
* Backslash-escape now works in interpreted text.
* Backticks followed by alphanumerics no longer end interpreted text.
Closes #4811.
|
|
(#4814)
|
|
Closes #4803
After this commit use `$titleblock$` in order to get what was contained
in `$title$` before, that is a title and subtitle rendered according to
the official rST method:
http://docutils.sourceforge.net/docs/user/rst/quickstart.html#document-title-subtitle. from
With this commit, the `$title$` and `$subtitle$` metadata are available and they
simply carry the metadata values. This opens up more possibilities in templates.
|
|
|
|
This fixes conversions from org with example blocks.
Closes #4748.
|
|
via the "section-numbering" directive in standalone output.
|
|
|
|
nested inlines are not valid RST syntax, so we flatten them following
some readability criteria discussed in #4368.
|
|
Previously we used an odd mix of 3- and 4-space indentation.
Now we use 3-space indentation, except for ordered lists,
where indentation must depend on the width of the list marker.
Closes #4563.
|
|
This seems to be necessary if we are to use our custom Prelude
with ghci.
Closes #4464.
|
|
|
|
There is nothing in RST that corresponds to e.g. `Emph []`, so we just filter out elements like this.
|
|
This is to help enable solutions solutions to #4434 and #4368.
|
|
+ Whitespace is ignored at the beginning and end of emphasis, as per
<http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup>.
+ Export `stripLeadingTrailingSpace` from `Text.Pandoc.Writers.Shared`.
|
|
|
|
|
|
|
|
|
|
We were missing an `_`.
See #4188.
|
|
|
|
|
|
|
|
|
|
(Use a :literal: role.)
Closes #3974.
|
|
Closes #3978.
|
|
Closes #3937.
|
|
...by parsing them as Span with "role" attributes.
This way they can be manipulated in the AST.
Closes #3407.
|
|
Wrapping is not allowed.
|
|
Now we raise a proper error on template failure.
|
|
This gives 20-30% speedup and reduction of memory
usage in most of the writers.
|