Commit graph

370 commits

Author SHA1 Message Date
Nils Carlson
8028de3322 odt: Add external option for native numbering
This adds an external options +native_numbering to the
ODT writer enabling enumeration of figures and tables in
ODT output.
2019-09-24 15:23:59 -07:00
John MacFarlane
d247e9f72e Make plain output plainer.
Previously we used the following Project Gutenberg conventions
for plain output:

- extra space before and after level 1 and 2 headings
- all-caps for strong emphasis `LIKE THIS`
- underscores surrounding regular emphasis `_like this_`

This commit makes `plain` output plainer. Strong and Emph
inlines are rendered without special formatting.  Headings
are also rendered without special formatting, and with only
one blank line following.

To restore the former behavior, use `-t plain+gutenberg`.

API change: Add `Ext_gutenberg` constructor to `Extension`.

See #5741.
2019-09-22 11:33:09 -07:00
Nikolay Yakimov
9dbfd23c56 Update documentation wrt docx reader custom style names 2019-09-21 11:37:21 -07:00
Ben Steinberg
7389919bb4 Preserve built-in styles in DOCX with custom style (#5670)
This commit prevents custom styles on divs and spans from overriding
styles on certain elements inside them, like headings, blockquotes,
and links. On those elements, the "native" style is required for the
element to display correctly. This change also allows nesting of
custom styles; in order to do so, it removes the default "Compact"
style applied to Plain blocks, except when inside a table.
2019-09-20 22:13:29 -07:00
John MacFarlane
b222272b60 Add note on --print-default-template explaining how to print partials. 2019-09-16 09:45:03 -07:00
John MacFarlane
4f909c626c Change exit codes.
It's good practice not to use codes 1-2 for user errors.
Also, we used 65 for two different errors.

- PandocAppError was 1, is now 4
- PandocOptionError was 2, is now 6
- PandocMakePDFError was 65, is now 66
2019-09-12 08:46:38 -07:00
John MacFarlane
5aef7d04f0 MANUAL: add section for exit codes. 2019-09-12 08:36:49 -07:00
John MacFarlane
88dc6fac5d Add --shift-heading-level-by option.
Deprecate --base-heading-level.

The new option does everything the old one does, but also
allows negative shifts.  It also promotes the document
metadata (if not null) to a level-1 heading with a +1 shift,
and demotes an initial level-1 heading to document metadata
with a -1 shift. This supports converting documents that
use an initial level-1 heading for the document title.

Closes #5615.
2019-09-10 23:16:13 -07:00
John MacFarlane
4dad7c5e86 MANUAL: document some pptx limitations...
in slide show section:

- no incremental display (#5689)
- no pause with `. . .` (#5701)
2019-09-08 22:41:04 -07:00
John MacFarlane
8696725cd9 Add -L option as shortcut for --lua-filter. 2019-09-08 22:37:38 -07:00
Owen McGrath
92debe4b9e Change optMetadataFile type from Maybe to List (#5702)
Changed optMetadataFile from `Maybe FilePath` to `[FilePath]`. This allows
for multiple YAML metadata files to be added. The new default value has
been changed from `Nothing` to `[]`.

To account for this change in `Text.Pandoc.App`, `metaDataFromFile` now
operates on two `mapM` calls (for `readFileLazy` and `yamlToMeta`) and a fold.

Added a test (command/5700.md) which tests this functionality and
updated MANUAL.txt, as per the contributing guidelines.

With the current behavior, using `foldr1 (<>)`, values within files
specified first will be used over those in later files. (If the reverse
of this behavior would be preferred, it should be fixed by changing
foldr1 to foldl1.)
2019-08-24 09:41:25 -07:00
Mauro Bieg
ace4cdfc23 MANUAL: link to YAML spec (#5687) 2019-08-14 10:09:19 -07:00
John MacFarlane
b35fae6511 Use doctemplates 0.3, change type of writerTemplate.
* 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.
2019-07-28 19:25:45 -07:00
Mauro Bieg
3edee7f68c MANUAL: reveal.js flags (#5653) 2019-07-19 12:21:32 -07:00
Tristan Stenner
09f30d65e4 Add option to include source files in ConTeXt PDFs (#5578)
Add a metadata option (`includesource`) to attach the source documents to the resulting PDF.
2019-07-16 09:31:59 -07:00
Karl Pettersson
5303791bc4 Customizable type of PDF/A for the ConTeXt writer (issue #5608) (#5610)
* Let the user choose type of PDF/A generated with ConTeXt (closes #5608)
* Updated ConTeXt test documents for changes in tagging
* Updated color profile settings in accordance with ConTeXt wiki
* Made ICC profile and output intent for PDF/A customizable
* Read pdfa variable from meta (and updated manual)
2019-07-15 11:55:04 -07:00
John MacFarlane
6d30d3e0b3 Pass through aria- attributes to HTML5.
Also document addition of data- prefix to unknown attributes.

Closes #5646.
2019-07-12 17:03:01 -07:00
Jeroen de Haas
e67f4c58f2 Powerpoint code formatting is now context dependent (#5573)
This commit alters the way in which the Powerpoint writer treats
inline code and code blocks.

- Inline code is now formatted at the same size as the surrounding
  text.
- Code blocks are now given a margin and font size according to their
  level.
- Furthermore this commit allows changing the font with which code is
  formatted via the `monofont` option.

Tested in
- PowerPoint 365 for Windows - 1808 (Build 10730.20344 Click-to-Run)
- PowerPoint 365 for Mac - 16.26 (19060901)
2019-06-14 08:42:06 -07:00
John MacFarlane
b6d564696f Update manual date, readme, man page. 2019-06-11 21:50:10 -07:00
John MacFarlane
931030d95d PDF via ms: make TOC appear at beginning and in PDF bookmarks.
Previously the TOC appeared at the end of the document,
and was not bookmarked.

If you want it to continue appearing at the end, add
`--pdf-engine-opt=--no-toc-relocation` to your command
line.

Closes #5553.
2019-06-08 11:53:37 -07:00
Albert Krewinkel
20503894f3
MANUAL.txt, pandoc.cabal: mention Jira as possible target format 2019-06-06 08:09:42 +02:00
John MacFarlane
b5af8eed38 Fix document section assignments in EPUB writer.
For example, introduction should go in bodymatter, not frontmatter, and
epigraph, conclusion, and afterward should go in bodymatter, not
backmatter.

For the full list of assignments, see the manual.

Closes #5546.
2019-06-04 09:20:29 -07:00
John MacFarlane
0e2d6561be MANUAL: add note about title-meta, author-meta, date-meta.
Closes #5486.
2019-05-28 09:26:57 -07:00
♫ Christian Krause ♫
51fa5f6ee2 MANUAL.txt: removes double 'inside' (#5489) 2019-05-07 12:24:12 -04:00
John MacFarlane
fee3258280 Add template variable curdir with working directory
from which pandoc is run.  Closes #5464.
2019-05-04 09:07:50 -07:00
John MacFarlane
f75fcf6f31 Update man page and README. 2019-04-05 15:11:08 -07:00
Andrew Dunning
81461dde58 Manual: Improve 'header' and 'heading' usage (#5424)
Corrects usage of 'heading' and 'header' in text (but does not change programmed names).
Partially addresses #5423.
2019-04-02 18:21:19 -06:00
Andrew Dunning
3d1409347a LaTeX template: Ensure correct heading/table order (#5421)
Improve the workaround for #1658, adapting a solution by @u-fischer in
<https://github.com/latex3/latex2e/issues/131> that works whether or not
the `indent` variable is enabled.

Remove `subparagraph` variable in LaTeX template.  The default is now
to use run-in style for level 4 and 5 headings (`\paragraph` and `\subparagraph`).
To get the previous default behavior (where these were formatted as blocks,
like `\subsubsection`), set the `block-headings` variable.

An example is given in the manual of reformatting the appearance of headings
more thoroughly using KOMA-Script.

Closes #5365.
2019-04-02 18:18:36 -06:00
John MacFarlane
ba8d0d9f01 Add xwiki output format to manual. 2019-04-02 16:41:50 -07:00
Jesse Rosenthal
9d1a4d1086 Docs: Specify that templates from PPT 2013 are known to work.
There have been problems reported with other recent versions.

Starts to address #5402
2019-03-31 13:32:32 -04:00
John MacFarlane
036179e44a MANUAL: add paragraph on options affecting markdown in ipynb. 2019-03-29 21:59:12 -07:00
John MacFarlane
3862565132 Update manual date and man page. 2019-03-13 20:59:25 -07:00
John MacFarlane
4810f300e1 Add recommendation to use raw_attribute with ipynb.
See #5354.
2019-03-09 16:53:29 -08:00
John MacFarlane
bf4a164a6f Allow -o/--output to be used with --print-*.
`--print-default-data-file`
`--print-highlighting-style`
`--print-default-template`

Note that `-o` must occur BEFORE the `--print*` command on the command line
(this is documented).

Closes #5357.
2019-03-08 08:44:45 -08:00
Cormac Relf
d638873433 Add tectonic as an option for --pdf-engine. (#5346)
Closes #5345

Runs tectonic on STDIN instead of a temporary .tex file, so that it
looks in the working directory for `\include` and `\input` like the rest
of the engines.

Allows overriding the output directory without messing up the args
with `--pdf-engine-opt=--outdir --pdf-engine-opt="$DIR"`.
2019-03-07 10:16:40 -07:00
John MacFarlane
9a511660ab Update manual date, man page, README.md. 2019-03-03 09:46:21 -08:00
John MacFarlane
0bed0ab5a3 Use XDG data directory for user data directory.
Instead of `$HOME/.pandoc`, the default user data directory is
now `$XDG_DATA_HOME/pandoc`, where `XDG_DATA_HOME` defaults to
`$HOME/.local/share` but can be overridden by setting the environment
variable.

If this directory is missing, then `$HOME/.pandoc` is searched
instead, for backwards compatibility.  However, we recommend
moving local pandoc data files from `$HOME/.pandoc` to
`$HOME/.local/share/pandoc`.

On Windows the default user data directory remains the same.

Closes #3582.
2019-03-02 15:03:59 -08:00
John MacFarlane
068fff2023 Update MANUAL on slide shows to reflect changes. 2019-03-01 21:51:29 -08:00
John MacFarlane
77faccb505 Shared: add filterIpynbOutput. [API change]
Add command line option `--ipynb-output=all|none|best`.

Closes #5339.
2019-02-28 21:50:09 -08:00
John MacFarlane
f6ebb33353 Remove spaces on empty lines in manual. 2019-02-28 15:29:04 -08:00
Agustín Martín Barbero
b5d393fc61 Clarify variable substitution indentation in templates (#5338)
Add `The value of a variable will be indented to the same level as the variable.` to the MANUAL.
2019-02-28 09:45:41 -07:00
John MacFarlane
11aa5fd288 Add latexmk as an option for --pdf-engine.
Closes #3195.

Note that you can use --pdf-engine-opt=-outdir=bar to specify
a persistent temp dir.
2019-02-27 23:55:17 -08:00
Mauro Bieg
ba065cb7f4 MANUAL: reorder custom-styles section (#5324) 2019-02-20 22:36:28 -07:00
Pascal Wagler
66ed198fff Added support for the subject metadata variable to PDF. (#5289) 2019-02-09 13:54:19 -08:00
TG
568b25d33a Adds Asciidoctor sprcific writer and tests 2019-02-09 08:21:53 -08:00
TG
8fdeae2872 AsciiDoc Writer: DisplayMath as asciidoc latexmath block 2019-02-09 08:20:56 -08:00
John MacFarlane
7974a5d169 Update manual. 2019-01-30 22:00:54 -08:00
Tristan Stenner
e782577eec Manual: document date-meta template variable (#5260)
In HTML based formats the `date` metadata variable is converted to ISO 8601
and available as `$date-meta`, but it's not documented at the moment.
2019-01-30 16:39:12 -08:00
Agustín Martín Barbero
9894d05fe3 Improve writing metadata for docx, pptx and odt (#5252)
* docx writer: support custom properties.  Solves the writer part of #3024.
  Also supports additional core properties:  `subject`, `lang`, `category`,
  `description`.

* odt writer: improve standard properties, including the following core properties:
  `generator` (Pandoc/VERSION), `description`, `subject`, `keywords`,
  `initial-creator` (from authors), `creation-date` (actual creation date).
  Also fix date.

* pptx writer: support custom properties.  Also supports additional core
  properties: `subject`, `category`, `description`.

* Includes golden tests.

* MANUAL: document metadata support for docx, odt, pptx writers
2019-01-26 16:14:35 -08:00
John MacFarlane
7012782b79 Update ipynb example in manual. 2019-01-25 16:12:45 -08:00