| 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 allows to be more explicit about using a default style, and
providing a single point of truth for its value. The variable is an
alias for `pygments`.
|
|
Fail early when receiving binary input with recognized signature:
- zip[-based]: including OpenDocument and Microsoft formats
- PDF
- CFBF-based: old Microsoft formats including .doc and .xls
- DjVu
|
|
|
|
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.
|
|
If `--pdf-engine` is specified or if a PDF is being produced,
we set the `pdf-engine` variable. This allows writers and
templates to behave differently depending on the PDF engine.
|
|
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.
|
|
Otherwise we get undesirable results, as the format's native
citation mechanism is used instead of (or in addition to) the
citeproc-generated citations. Closes #10662.
|
|
The intent is to allow bash process substitution: e.g.,
`--template <(echo "foo")`.
Previously pandoc *always* added an extension based on the
output format, which caused problems with the absolute filenames
used by bash process substitution (e.g. `/dev/fd/11`).
Now, if the template has no extension, pandoc will first
try to find it without the extension, and then add the
extension if it can't be found.
So, in general, extensionless templates can now be used.
But this has been implemented in a way that should not cause
problems for existing uses, unless you are using a template
`NAME.FORMAT` but happen to have an extensionless file `NAME` in
the template search path.
Closes #5270.
|
|
|
|
|
|
This computes the sandboxed files from Opt and avoids some
code repetition in T.P.App and T.P.App.OutputSettings.
|
|
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]>
|
|
...in defaults files. These can contain paths of custom readers and
writers. See #8024.
|
|
writerEpubTitlePage, writerChunkTemplate, writerListTables.
|
|
This behaves the same as `[0,0,0,0,0]`.
|
|
+ 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.
|
|
Bundles all document transformations, i.e., functions that run
predefined filters on Pandoc documents.
|
|
|
|
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.
|
|
Previously a Div with an identifier derived from the filename
would be added around the contents of each file. This caused
problems for "chunking" files into chapters, e.g. in EPUB.
We no longer add the surrounding Div. This cooperates better with
chunking. Note, however, that if you have relied on the old
behavior to link to the beginning of the contents of a file using
its filename as identifier, that will no longer work.
Closes #8741.
|
|
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.
|
|
Previously if you did `pandoc -s -t bbb`, it would give you
an error about the missing bbb template instead of saying that
it's not a supported output format.
|
|
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.
|
|
The AsciiDoc community now regards the dialect parsed by `asciidoctor`
as the official AsciiDoc syntax, so it should be the target of our
`asciidoc` format.
Closes #8936.
The `asciidoc` output format now behaves like `asciidoctor` used to.
`asciidoctor` is a deprecated synonynm. For the old `asciidoc` behavior
(targeting the Python script), use `asciidoc_legacy`.
The templates have been consolidated. Instead of separate
`default.asciidoctor` and `default.asciidoc` templates, there is
just `default.asciidoc`.
Text.Pandoc.Writers.AsciiDoc API changes:
- `writeAsciiDoc` now behaves like `writeAsciiDoctor` used to.
- `writeAsciiDoctor` is now a deprecated synonym for `writeAsciiDoc`.
- New exported function `writeAsciiDocLegacy` behaves like
`writeAsciDoc` used to.
|
|
Default is true if no value is specified, so this is fully backwards-compatible.
Closes #8788.
|
|
(That is, whenever we have the filename and are in a
PandocMonad instance.)
This will lead to more informative error messages for UTF8
encoding, indicating the file path and byte offset where the
error occurs. Closes #8884.
|
|
This is like `Text.Pandoc.UTF8.toText`, except:
- it takes a file path as first argument, in addition to
bytestring contents
- it raises an informative error with source position if
the contents are not UTF8-encoded
[API change]
This replaces `utf8ToText` in `Text.Pandoc.App.Input`.
See #8884.
|
|
This wasn't implemented before due to an oversight. Closes #8908.
|
|
|
|
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.
|
|
* T.P.Format: export `formatFromFilePaths` [API change]
* Lua: add function `pandoc.format.from_path`
* Update lua-filters.md
* The old T.P.App.FormatHeuristics module has been removed.
This is an alternative to #8693.
|
|
* 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.
|