| Age | Commit message (Collapse) | Author |
|
`foldl'` is exported by Prelude by base 4.20+. So we need to do
some qualified importing to avoid warnings about redundant imports.
|
|
A new command line option `--syntax-highlighting` is provided; it takes
the values `none`, `default`, `idiomatic`, a style name, or a path to a
theme file. It replaces the `--no-highlighting`, `--highlighting-style`,
and `--listings` options.
The `writerListings` and `writerHighlightStyle` fields of the
`WriterOptions` type are replaced with `writerHighlightStyle`.
Closes: #10525
|
|
This fixes the `webtex` option when used without parameter in a defaults file.
|
|
Each supported engine is now printed on a line of its own.
|
|
These are the development versions of the LaTeX binaries; installable,
e.g., with `tlmgr install latex-base-dev`.
Closes: #10991
|
|
Text.Pandoc.App.CommandLineOptions and pandoc-cli/src/pandoc.hs
had similar code for generating version information.
To avoid duplication, we now export `versionInfo` from
Text.Pandoc.App [API change]. (The function is reexported from the
non-public module Text.Pandoc.App.CommandLineOptions.) This function
has three parameters that can be filled in when it is called by
pandoc-cli.
This change will make it simpler to revise version information.
|
|
This reverts commit 2cf9b55421d7026dac8c45730b8538f13e4bbb78.
|
|
Export `copyrightMessage` from the unexported module
Text.Pandoc.App.CommandLineOptions
and reexport from Text.Pandoc.App [API change].
This avoids the need for a duplicated version in pandoc-cli, which can
now depend on the library's exported version.
|
|
Per GNU guidelines:
https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html
|
|
Closes #10961.
|
|
This allows non-string values (booleans, lists, maps)
to be given to template variables on the command line.
Closes #10341.
Supersedes #10342.
|
|
When `groff` is used as a PDF engine, the `groff` extension
to `ms` is automatically enabled.
Limitations:
- `groff` currently produces larger PDFs than `pdfroff`.
- With `groff`, a table of contents produced with
`--table-of-contents/--toc` will always be placed at the end of
the document.
- Certain characters (e.g. Greek characters) may be dropped in
the PDF outline.
Closes #10738.
|
|
Two new command-line options are added:
`--lof[=true|false]`, `--list-of-figures[=true|false]`
`--lot[=true|false]`, `--list-of-tables[=true|false]`
Only docx, latex, and context are supported at this point.
Setting the `lof` and `lot` variables will also work for the formats that are
currently supported.
[API changes]
+ Lua: `list_of_figures` and `list_of_tables` can now be used in writer options.
+ Text.Pandoc.Options: add `writerListOfFigures` and `writerListOfTables` fields
to `WriterOptions`.
+ Text.Pandoc.App.Opt: add `optListOfFigures` and `optListOfTables` to `Opt`.
Closes #8245.
Co-authored-by: John MacFarlane <[email protected]>
|
|
+ Add command line options `--table-caption-position` and
`--figure-caption-position`. These allow the user to specify whether
to put captions above or below tables and figures, respectively.
The following output formats are supported: HTML (and related such
as EPUB), LaTeX (and Beamer), Docx, ODT/OpenDocument, Typst.
+ Text.Pandoc.Options: add `CaptionPosition` and new
`WriterOptions` fields `writerFigureCaptionPosition` and
`writerTableCaptionPosition` [API change].
+ Text.Pandoc.Opt: add `Opt` fields `optFigureCaptionPosition` and
`optTableCaptionPosition` [API change].
+ Docx writer: make table/figure rendering sensitive to caption
position settings.
+ OpenDocument writer: make table/figure rendering sensitive to
caption position settings.
+ Typst writer/template: implement figure caption positions by
triggering a show rule in the default template, which determines caption
positions for figures and tables globally.
+ LaTeX writer: make table/figure rendering sensitive to caption
position settings. Closes #5116.
+ HTML writer/template: make `<figcaption>` placement sensitive to caption
position settings. For tables, `<caption>` must be the first element,
and positioning is determined by CSS, for here we set a variable
which the default template is sensitive to.
|
|
wkhtmltopdf is deprecated. weasyprint is the easiest-to-install,
maintained alternative. For better results, one might prefer
pagedjs-cli.
Closes #10142.
|
|
This was omitted when we allowed this for other boolean flags.
|
|
New cli option: `--link-images`. This causes images to be linked
rather than embedded in ODT.
New field in WriterOptions: `writerLinkImages` [API change].
New field in Opt: `optLinkImages` [API change].
Closes #9815.
|
|
|
|
Omit the information about versions of dependencies.
We no longer emit version info at this level anyway;
pandoc-cli intercepts `--version`.
This code would only be called if someone used the pandoc
library function `handleWithOptInfo` in their own program.
|
|
The substantive change here is the `-strue` will now work
instead of being interpreted as `-s -true`.
This is somewhat ad hoc, but I don't think we'll ever have
an output format named `rue`, so it's probably okay.
|
|
In 3.1.5 boolean arguments were allowed an optional argument
(true|false). This created a regression for uses of fused
short arguments, e.g. `-somyfile.html`, which was equivalent
to `-s -omyfile.html`, but now raised an error because
pandoc attempted to parse `o` as a boolean `true` or `false`.
This change adds a preprocessing step on the raw arguments
before they are sent to the option parser. In this preprocessing
step, `-somyfile.html` would be split into two arguments,
`-s` and `-omyfile.html`. The splitting happens when a
short boolean option is followed by another short option.
Closes #8956.
|
|
Thanks @fsoedjede
|
|
|
|
|
|
It takes a boolean argument, and now that all of our boolean
flags take such an argument, we can make this one optional for
consistency.
|
|
Always give the name of the relevant argument.
See #8879.
|
|
Default is true if no value is specified, so this is fully backwards-compatible.
Closes #8788.
|
|
|
|
This prevented users to use custom writers with uppercase characters in
their filenames. Format-normalization, including lower-casing of
format identifiers, happens during format parsing.
|
|
* Add `--chunk-template` CLI option, allowing more control over the
chunk filenames in chunked HTML output.
* Text.Pandoc.App: Add `optChunkTemplate` constructor to Opt [API change].
* Text.Pandoc.Options: add `writerChunkTemplate` contsructor to
WriterOptions [API change].
* Text.Pandoc.Chunks: add Data, Typeable, Generic instances for
PathTemplate.
|
|
Closes #8586.
|
|
`pandoc-version`, `outputfile`, `title-prefix`, `epub-cover-image`,
`curdir`, `dzslides-core` can be overridden by `--variable` on the
command line.
Previously they would create lists in the template Context,
which is not desirable.
|
|
Rationale: we need this splitting level now not just in
EPUB but in chunked HTML.
`--epub-chapter-level` will still function as a deprecated
synonynm. `epub-chapter-level` will also continue to work in
defaults files, ande `epub_chapter_level` will still work for
Lua marshalling.
[API changes]
Text.Pandoc.App.Opt: remove `optEpubChapterLevel`, add
`optSplitLevel`.
Text.Pandoc.Options: remove `writerEpubChapterLevel`, add
`writerSplitLevel`.
|
|
|
|
The new type CustomComponents is exported from T.P.Scripting, and the
ScriptEngine fields are changed. Instead of separate fields for custom
readers and writers, we now have a single function that loads any number
of "components" from a script: these may be custom readers, custom
writers, templates for writers, or extension configs. (Note: it's
possible to have a custom reader and a custom writer for a format
together in the same file.)
Pandoc now checks the folder `custom` in the user's data directory for a
matching script if it can't find one in the local directory. Previously,
the `readers` and `writers` data directories were search for custom
readers and writers, respectively. Scripts in those directories must be
moved to the `custom` folder.
Custom readers used to implement a fallback behavior that allowed to
consume just a string value as input to the `Reader` function. This has
been removed, the first argument is now always a list of sources. Use
`tostring` on that argument to get a string.
Closes #8417.
Signed-off-by: Albert Krewinkel <[email protected]>
|
|
A new error `PandocNoTemplateError` (code 87) is thrown if a template is
required but cannot be found.
|
|
New command line option: `--epub-title-page=true|false`.
New `writerEpubTitlePage` field on `WriterOptions` [API change].
New `optEpubTitlePage` field on `Opts` [API change].
Closes #6097.
|
|
They now return `Either OptInfo Opt`.
Add `OptInfo` type.
Add `handleOptInfo` function. This performs the IO actions for
things like `--version` that were previously done in `parseOptionsFromArgs`.
An argument for a `ScriptingEngine` has been added, to facilitate
printing custom templates and custom extensions for Lua filters.
(However, at this stage nothing is yet done with it.)
[API change]
|
|
|
|
T.P.Extensions [API change]:
+ Add CustomExtension constructor to Extension.
+ Remove Bounded, Enum instances for Extension.
+ Add `extensionsToList` function.
+ Revise `readExtension` so it can handle CustomExtension, and so
that it returns a Text rather than Maybe Text.
+ Add `showExtension`.
T.P.Format:
+ Revise error checking to handle CustomExtension.
|
|
This is just `nubOrd` from Data.Containers.ListUtils.
|
|
|
|
|
|
|
|
Rolls back 0ab014ed1e5890e338792fab98aecc45cd889f99.
We don't need this because we aren't needing to print the Lua
version in options any more; we're handling `--version` now at
the pandoc-cli level.
|
|
This makes T.P.Class more self-contained, and suitable for extraction
into a separate package if desired.
[API changes]
- T.P.Data is now an exported module, providing `readDataFile`,
`readDefaultDataFile` (both formerly provided by T.P.Class),
and also `getDataFileNames` (formerly unexported in
T.P.App.CommandLineOptions).
- T.P.Translations is now an exported module (along with
T.P.Translations.Types), providing `readTranslations`,
`getTranslations`, `setTranslations`, `translateTerm`,
`lookupTerm`, `readTranslations`, `Term(..)`, and `Translations`.
- T.P.Class: `readDataFile`, `readDefaultDataFile`, `setTranslations`,
and `translateTerm` are no longer exported.
`checkUserDataDir` is now exported.
- Text.Pandoc now exports Text.Pandoc.Data and `setTranslations`
and `translateTerm`.
|
|
Print flag settings (lua, server) and versions of all relevant packages.
Add suffix for nightly builds.
Move `nightly` flag from pandoc to pandoc-cli.
Closes #8339.
|
|
|
|
|
|
and add a new `pandocVersion` value with type `Version`. This is
consistent with the type used for `pandocTypesVersion` and allows to use
the value where a Version type is required.
|