Age | Commit message (Collapse) | Author | Files | Lines |
|
The same init file (`data/init`) that is used to setup the Lua
interpreter for Lua filters is also used to setup the interpreter of
custom writers.lua.
|
|
Closes #4137.
|
|
|
|
This fixes a bug in 2.0.4, whereby pandoc could not
read the theme files generated with `--print-highlight-style`.
It also fixes some CSS issues involving line numbers.
Highlighted code blocks are now enclosed in a div with class
sourceCode.
Highlighting CSS no longer sets a generic color for pre
and code; we only set these for class `sourceCode`.
This will close #4133 and #4128.
|
|
* Deprecate `--strip-empty-paragraphs` option. Instead we now
use an `empty_paragraphs` extension that can be enabled on
the reader or writer. By default, disabled.
* Add `Ext_empty_paragraphs` constructor to `Extension`.
* Revert "Docx reader: don't strip out empty paragraphs."
This reverts commit d6c58eb836f033a48955796de4d9ffb3b30e297b.
* Implement `empty_paragraphs` extension in docx reader and writer,
opendocument writer, html reader and writer.
* Add tests for `empty_paragraphs` extension.
|
|
This works for any input format.
|
|
This generates a JSON version of a highlighting style, which can be
saved as a .theme file, modified, and used with `--highlight-style`.
Closes #4106.
Closes #4096.
|
|
Closes #4095.
|
|
Previously we only mentioned `--latexmathml`, even if `-m` was
used.
|
|
|
|
The `Generic` JSON instances for `Text.Pandoc.App.Opt` seem to tickle a
particulary bad quadratic complexity case (Generics complexity is worse
than quadratic with respect to the number of fields in the datatype).
This is with GHC-8.2.1, I didn't test it using 8.0 but I assume it is
similar.
Using `Generic`, compilation of the `Text.Pandoc.App` module takes
minutes and often gets killed due to out of memory on slower machines
with "only" 8GB of accessible memory. This is particularly annoying to
me since it means I cannot build pandoc on Travis.
TemplateHaskell is a little uglier, but the module seems to compile
within a few seconds, and compilation doesn't take more than 1GB of
memory.
Should I also change the other JSON instances throughout the codebase
for consistency?
|
|
|
|
It should replace a metadata value set in the document
itself, rather than creating a list including a new value.
Closes #4054.
|
|
`--latexmathml`,
`--gladtex`,
`--mimetex`,
`--jsmath`
|
|
- Ensure that epub2 is recognized as a non-text format,
so that a template is used.
- Don't include "prefix" attribute for ibooks for epub2.
It doesn't validate.
- Fix stylesheet paths; previously we had an incorrect
stylesheet path for the cover page and nav page.
|
|
|
|
|
|
|
|
|
|
|
|
- Removed writerPdfArgs from WriterOptions (API change).
- Added parameter for pdf args to makePDF.
|
|
|
|
|
|
Previously these were not triggering the helpful message
about option name changes.
|
|
|
|
* In Options.HTMLMathMethod, the KaTeX contsructor now takes only
one string (for the KaTeX base URL), rather than two [API change].
* The default URL has been updated to the latest version.
* The autoload script is now loaded by default.
|
|
They can be obtained from CommonState since we're
in PandocIO.
|
|
Removed `writerSourceURL` from `WriterOptions` (API change).
Added `stSourceURL` to `CommonState`.
It is set automatically by `setInputFiles`.
Text.Pandoc.Class now exports `setInputFiles`, `setOutputFile`.
The type of `getInputFiles` has changed; it now returns `[FilePath]`
instead of `Maybe [FilePath]`.
Functions in Class that formerly took the source URL as a parameter
now have one fewer parameter (`fetchItem`, `downloadOrRead`,
`setMediaResource`, `fillMediaBag`).
Removed `WriterOptions` parameter from `makeSelfContained` in
`SelfContained`.
|
|
This enables users to change the media files being extracted via lua
filters.
|
|
|
|
|
|
This changes the type of runLuaFilter.
|
|
This revises the last commit, fixing #3931.
|
|
Fixes #3931.
|
|
* Options: Added readerStripComments to ReaderOptions.
* Added `--strip-comments` command-line option.
* Made `htmlTag` from the HTML reader sensitive to this feature.
This affects Markdown and Textile input.
Closes #2552.
|
|
This contains a JSON representation of ReaderOptions.
|
|
|
|
Partial functions make me nervous.
|
|
* Rename --latex-engine to --pdf-engine
* In `Text.Pandoc.Options.WriterOptions`, rename `writerLaTeXEngine` to `writerPdfEngine` and `writerLaTeXArgs` to `writerPdfArgs`.
* Add support for `weasyprint` and `prince`, in addition to `wkhtmltopdf`, for PDF generation via HTML (closes #3906).
* `Text.Pandoc.PDF.html2pdf`: use stdin instead of intermediate HTML file
|
|
We now allow default output to stdout when it can be
determined that the output is being piped. (On Windows,
as mentioned before, this can't be determined.)
Using '-o -' forces output to stdout regardless.
|
|
Previously, for binary formats, output to stdout was disabled
unless we could detect that the output was being piped (and not
sent to the terminal). Unfortunately, such detection is not
possible on Windows, leaving windows users no way to pipe binary
output. So we have changed the behavior in the following way:
* If the -o option is not used, binary output is never sent
to stdout by default; instead, an error is raised.
* IF '-o -' is used, binary output is sent to stdout, regardless
of whether it is being piped. This works on Windows too.
|
|
Instead, just try running it and raise the exception if it
isn't found at that point.
This improves things for users of Cygwin on Windows, where
the executable won't be found by `findExecutable` unless
`.exe` is added.
The same exception is raised as before, but at a later
point.
Closes #3819.
|
|
|
|
* readDataFile, readDefaultDataFile, getReferenceDocx,
getReferenceODT have been removed from Shared and
moved into Class. They are now defined in terms of
PandocMonad primitives, rather than being primitve
methods of the class.
* toLang has been moved from BCP47 to Class.
* NoTranslation and CouldNotLoudTranslations have
been added to LogMessage.
* New module, Text.Pandoc.Translations, exporting
Term, Translations, readTranslations.
* New functions in Class: translateTerm, setTranslations.
Note that nothing is loaded from data files until
translateTerm is used; setTranslation just sets the
language to be used.
* Added two translation data files in data/translations.
* LaTeX reader: Support `\setmainlanguage` or `\setdefaultlanguage`
(polyglossia) and `\figurename`.
|
|
It is now carried in CommonState in PandocMonad instances.
(And thus it can be used by readers too.)
|
|
In Text.Pandoc.Class and Text.Pandoc.Template, resp.
We now get the datadir from CommonState.
|
|
|
|
|
|
Advise to use `gfm` instead.
|
|
|