Commit graph

526 commits

Author SHA1 Message Date
Frederik Elwert
90804b5506 Add title-slide-attributes variable to reveal.js template. (#5981) 2019-12-11 08:26:54 -08:00
John MacFarlane
e16fd88c2e Rename template 'filters' as 'pipes'
to avoid confusion with the other notion of filter used by pandoc.
We may want to rename this upstream in doctemplates as well.
2019-12-07 11:42:29 -08:00
John MacFarlane
8ad14d6f57 Removed trailing whitespace in manual. 2019-12-07 09:06:20 -08:00
John MacFarlane
6bb552c589 Document display math syntax in manual. 2019-12-07 09:05:07 -08:00
John MacFarlane
d643393a69 Update manual date and man page. 2019-12-05 12:38:42 -08:00
John MacFarlane
e7833c4dfb Clean up manual on pdf generation backend options.
See #5940.
2019-12-05 10:15:53 -08:00
John MacFarlane
992f77c17c Roll back part of of --shift-heading-level-by change.
With positive heading shifts, starting in 2.8 this option caused
metadata titles to be removed and changed to regular headings.
This behavior is incompatible with the old behavior of
`--base-header-level` and breaks old workflows, so with this
commit we are rolling back this change.

Now, there is an asymmetry in positive and negative heading
level shifts:

+ With positive shifts, the metadata title stays the same and
  does not get changed to a heading in the body.
+ With negative shifts, a heading can be converted into the
  metadata title.

I think this is a desirable combination of features, despite
the asymmetry.  One might, e.g., want to have a document
with level-1 section headigs, but render it to HTML with
level-2 headings, retaining the metadata title (which pandoc
will render as a level-1 heading with the default template).

Closes #5957.
Revises #5615.
2019-12-05 09:59:50 -08:00
John MacFarlane
e479a88722 Bump to 2.8.0.1 and update changelog and manual. 2019-11-26 21:18:31 -08:00
John MacFarlane
7fb9432ae1 Update to doctemplates 0.7.2, update template docs.
This adds the `nowrap` filter.
2019-11-24 09:53:45 -08:00
Alexandre Franke
a09edd1703 Add support for $toc-title$ to HTML (4 and 5) (#5930) 2019-11-23 17:13:23 -08:00
Ian Max Andolina
39fde70c41 Remove grffile requirement in MANUAL.txt (#5927)
See #5848 for the details.
2019-11-22 19:56:25 -08:00
John MacFarlane
124fc40dd7 Update date on manual. 2019-11-22 07:59:52 -08:00
Brian Wignall
a946424e3c Fix typos (#5919) 2019-11-20 09:44:23 -08:00
John MacFarlane
038f70c84a Update man page. 2019-11-18 20:13:21 -08:00
John MacFarlane
0d4813d7ba Update MANUAL.txt for doctemplates changes. 2019-11-18 20:10:32 -08:00
John MacFarlane
73fb9496bc Reverted the behavior change with --title-prefix.
It now implies `--standalone` again, as before.
2019-11-17 17:35:50 -08:00
John MacFarlane
147ef90fde Ensure that options imply --standalone even in defaults file.
Certain options (`--self-contained`, `--include-in-header`, etc.)
imply `--standalone`.  We now handle this after option parsing
so that it affects options specified in defaults files too.

Behavior change: `--title-prefix` no longer implies `--standalone`.
2019-11-17 17:21:55 -08:00
John MacFarlane
0cea8df8ac MANUAL: fix formatting for --shift-heading-level. 2019-11-16 18:52:50 -08:00
John MacFarlane
ce976810b2 Adjust date on manual, regenerate man page. 2019-11-16 12:54:19 -08:00
John MacFarlane
bfa6c0b57d Default files: Allow leaving input-files blank again.
Leaving it blank yields a Nothing value (interpreted as stdin).
Providing an empty list is intepreted as no input.

This resolves one part of #5888.
2019-11-14 21:46:35 -08:00
John MacFarlane
ec043e0d97 Default files: combine with prior values when appropriate.
Certain command-line arguments can be repeated:
`--metadata-file`, `--css`, `--include-in-header`,
`--include-before-body`, `--include-after-body`, `--variable`,
`--metadata`, `--syntax-definition`.  In these cases, values
specified in default files should be added to the list rather
than replacing values specified earlier on the command line
(perhaps in other default files).

So, for example, if one does

    pandoc --variable foo=3 --defaults d1 --defaults d2

and `d1` sets the variable `bar` and `d2` sets `baz`,
all three variables will be set.

Closes #5894.
2019-11-13 16:51:02 -08:00
John MacFarlane
28a1f50111 Update manual in light of last change. 2019-11-13 16:33:49 -08:00
John MacFarlane
d3966372f5
Clarify MANUAL.txt on --preserve-tabs 2019-11-11 17:08:11 -08:00
John MacFarlane
741b1f7fb4 Markdown reader: fix small super/subscript issue.
Superscripts and subscripts cannot contain spaces,
but newlines were previously allowed (unintentionally).
This led to bad interactions in some cases with footnotes.
E.g.

```
foo^[note]
bar^[note]
```

With this change newlines are also not allowed inside
super/subscripts.

Closes #5878.
2019-11-11 09:08:52 -08:00
John MacFarlane
9c7f75afb5 Change merge behavior for metadata.
Previously, if a document contained two YAML metadata blocks
that set the same field, the conflict would be resolved in favor
of the first. Now it is resolved in favor of the second (due to
a change in pandoc-types).

This makes the behavior more uniform with other things in pandoc
(such as reference links and `--metadata-file`).
2019-11-07 10:48:38 -08:00
John MacFarlane
adad3c70b6 Allow singular input-file in defaults file.
Closes #5877.
2019-11-06 09:06:49 -08:00
John MacFarlane
f515f984d4 Revise MANUAL's comment on table-mode. 2019-11-03 14:57:27 -08:00
John MacFarlane
e906e5ac23 Allow pdf output to stdout.
PDF output will not be output to the terminal, but can be
sent to stdout using either `-o -` or a pipe.

The intermediate format will be determined based on
the setting of `--pdf-engine`.

Closes #5751.
2019-11-03 11:44:00 -08:00
John MacFarlane
15e1ca6441 Manual: clarify when macro definitions are passed as raw latex.
In Markdown input, they are always passed through.
In LaTeX, only if `latex_macros` is disabled.
2019-11-02 11:03:47 -07:00
John MacFarlane
db972b8ea0 LaTeX reader: parse macro defs as raw latex...
when `latex_macros` is disabled.  (When `latex_macros` is enabled,
we omit them, since pandoc is applying the macros itself.)

Previously, it was documented that the macro definitions got
passed through as raw latex regardless of whether `latex_macros`
was set -- but in fact they never got passed through.
2019-11-02 10:36:31 -07:00
John MacFarlane
cebf0091ca Document how to use custom writers with --standalone.
Closes #5866.
2019-11-02 08:24:39 -07:00
John MacFarlane
02c579ff3c Revert "ALlow multiple comma-separated files for --defaults."
This reverts commit e96f3fd813.
2019-11-01 21:48:30 -07:00
John MacFarlane
e96f3fd813 ALlow multiple comma-separated files for --defaults. 2019-11-01 10:14:30 -07:00
John MacFarlane
bf9e3faa35 --defaults improvements.
- ToYAML instance is now for `Opt -> Opt`, rather than `Opt`.

- This allows us to handle `--defaults` without clobbering all the
  options that occur prior to `--defaults` on the command line.
  (Note, however, that options in `--defaults` can replace these
  options if the `--defaults` option is used after them,
  which may be a bit confusing given the name.)

- `--defaults` may now be used multiple times on the command line,
  allowing users to break defaults into different chunks.
2019-11-01 09:03:40 -07:00
John MacFarlane
080a3cdaeb Update Template syntax in MANUAL.txt with latest doctemplates. 2019-10-29 22:39:25 -07:00
John MacFarlane
d8d784ab54 Fixed typo in example. 2019-10-14 08:48:51 -07:00
mb21
bfbff3106d KaTeX math: respect classoption=fleqn variable
closes #5815
2019-10-14 08:47:40 -07:00
John MacFarlane
2f32b5316f More documentation of default files 2019-10-11 10:06:01 -07:00
John MacFarlane
9e3e195dd4 Fix gfm_auto_identifiers behavior with emojis.
Closes #5813.

Note that we also now use emoji names for emojis
when `ascii_identifiers` is enabled.
2019-10-11 10:00:33 -07:00
John MacFarlane
34e6464e30 Improve sample --defaults file in MANUAL.txt. 2019-10-11 08:57:49 -07:00
John MacFarlane
7388cd3e7a Improve parsing of --defaults.
- Add FromYAML instances to Opt and to all subsidiary types.
- Remove the use of HsYAML-aeson, which doesn't give good
  position information on errors.
- Rename some fields in Opt to better match cli options or
  reflect what the ycontain [API change]:

  + optMetadataFile -> optMetadataFiles
  + optPDFEngineArgs -> optPDFEngineOpts
  + optWrapText -> optWrap
- Add IpynbOutput enumerated type to Text.Pandoc.App.Opts.
  Use this instead fo a string for optIpynbOutput.
- Add FromYAML instance for Filter in Text.Pandoc.Filters.

With these changes parsing of defaults files should be
complete and should give decent error messages.

Now (unlike before) we get an error if an unknown field
is used.
2019-10-10 23:21:18 -07:00
John MacFarlane
2523941453 Fix examplel for defaults. 2019-10-10 10:34:35 -07:00
John MacFarlane
5085fe605a Added documentation for --defaults. 2019-10-10 10:33:35 -07:00
John MacFarlane
a3cd74c29b --metadata-file: when multiple files specified, second takes precedence...
on conflicting fields.  This changes earlier behavior (but not in
a release), where first took precedence.

Note that this may seem inconsistent with the behavior of
multiple YAML blocks within a document, where the first takes
precedence.  Still, it is convenient to be able to override
defaults with options later on the command line.
2019-10-10 10:00:45 -07:00
John MacFarlane
68b09a6d81 Make some writers sensitive to 'unlisted' class on headings.
If this is present on a heading with the 'unnumbered' class,
the heading won't appear in the TOC.  This class has no
effect if 'unnumbered' is not also specified.

This affects HTML-based writers (including slide shows
and epub), LateX (including beamer), RTF, and PowerPoint.
Other writers do not yet support `unlisted`.

Closes #1762.
2019-10-10 09:15:40 -07:00
John MacFarlane
3f28e332bf Remove misleading sentence in --variables documentation. 2019-10-07 11:54:51 -07:00
John MacFarlane
175c57a966 Clarify that --dpi provides a default and doesn't override...
dpi values specified in the images themselves.  See #5721.
2019-10-06 09:32:45 -07:00
Wandmalfarbe
94a10ea1a5 PR corrections. 2019-10-03 17:24:09 -07:00
Wandmalfarbe
3459700312 Add documentation for the variable hyperrefoptions. 2019-10-03 17:24:09 -07:00
John MacFarlane
0b2dc480be Minor reformatting of exit code table. 2019-09-29 16:33:57 -07:00
John MacFarlane
f03e8c2c6c MANUAL: Use a table for exit codes. 2019-09-29 15:20:11 -07:00
John MacFarlane
054c30228d MANUAL: Put all template variable docs into one section. 2019-09-29 15:14:46 -07:00
John MacFarlane
2956c695f6 MANUAL.txt - use axt headers consistently. 2019-09-29 15:09:41 -07:00
John MacFarlane
ac4067fe2e MANUAL.txt: Add fuller documentation of templates.
Including new template syntax, partials, etc.

Closes #5779.
2019-09-29 15:00:34 -07:00
John MacFarlane
746c92a41a Raise error on unsupported extensions. Closes #4338.
+ An error is now raised if you try to specify (enable or
  disable) an extension that does not affect the given
  format, e.g. `docx+pipe_tables`.

+ The `--list-extensions[=FORMAT]` option now lists only
  extensions that affect the given FORMAT.

+ Text.Pandoc.Error: Add constructors `PandocUnknownReaderError`,
  `PandocUnknownWriterError`, `PandocUnsupportedExtensionError`.
  [API change]

+ Text.Pandoc.Extensions now exports `getAllExtensions`,
  which returns the extensions that affect a given format
  (whether enabled by default or not). [API change]

+ Text.Pandoc.Extensions: change type of `parseFormatSpec`
  from `Either ParseError (String, Extensions -> Extensions)`
  to `Either ParseError (String, [Extension], [Extension])`
  [API change].

+ Text.Pandoc.Readers: change type of `getReader` so it returns
  a value in the PandocMonad instance rather than an Either
  [API change].  Exceptions for unknown formats and unsupported
  extensions are now raised by this function and need not be handled by
  the calling function.

+ Text.Pandoc.Writers: change type of `getWriter` so it returns
  a value in the PandocMonad instance rather than an Either
  [API change].  Exceptions for unknown formats and unsupported
  extensions are now raised by this function and need not be handled by
  the calling function.
2019-09-29 11:43:17 -07:00
John MacFarlane
981b5de790 MANUAL.txt: fixed some markdown errors. 2019-09-28 11:16:46 -07:00
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
John MacFarlane
b08c8627d3 Allow some command line options to take URL in addition to FILE.
`--include-in-header`, `--include-before-body`, `--include-after-body`
2019-01-24 16:21:57 -08:00
Andrew Dunning
e18d9ba542 Manual: Reorganize template variables (#5249)
Add additional headings to categorize variables, and
alphabetize when there is large number; add more examples.
2019-01-23 15:36:11 -08:00
Andrew Dunning
673d545016 LaTeX template: Restrict institute to Beamer (#5219)
The `\institute` command is only standard in the Beamer class.
Use a conditional to restrict this to Beamer output rather than
output an empty command. To add this information to a LaTeX
class providing an `\institute` command, use `header-includes`.
2019-01-23 10:31:26 -08:00
John MacFarlane
395ea03069 Support ipynb (Jupyter notebook) as input and output format.
[API change]

* Depend on ipynb library.

* Add `ipynb` as input and output format.

* Added Text.Pandoc.Readers.Ipynb (supports both nbformat v3 and v4).

* Added Text.Pandoc.Writers.Ipynb (supports nbformat v4).

* Added ipynb readers and writers to T.P.Readers,
  T.P.Writers, and T.P.Extensions.  Register the
  file extension .ipynb for this format.

* Add `PandocIpynbDecodingError` constructor to Text.Pandoc.Error.Error.

* Note: there is no template for ipynb.
2019-01-22 21:45:59 -08:00
Andrew Dunning
3707bed4c1 LaTeX template: Use footnotehyper if available (#5234)
Use the [`footnotehyper`](https://ctan.org/pkg/footnotehyper/) package if available.
This is a rewrite of `footnote` that is compatible with `hyperref` and `babel-frenchb`.

This patch also addresses the incompatibility with `xcolor` noted in #4861, but the
new package has only been available since 2016, so this template still loads `xcolor`
earlier for compatibility with older distributions. Note that the `footnote` package 
is part of `collection-latexrecommended` in TeX Live, so there shouldn't be any
problem loading it unconditionally as we now do if `footnotehyper` is not available.
2019-01-22 21:13:09 -08:00
Lev E. Givon
690193e4e5 Clarify that $ must come right before $. (#5243) 2019-01-22 20:58:18 -08:00
John MacFarlane
847ff4f83d Mention raw_attribute in documentation for raw_html and raw_tex.
Thanks to @eiro.  Closes #5240.
2019-01-21 20:42:46 -08:00
Andrew Dunning
96892ea8d7 LaTeX template: Simplify fontspec usage (#5218)
Simplify the approach of #5212, ensuring that `mainfont` is used as the base font for scaling and that LuaLaTeX does not display the mono font with TeX ligatures (as it does not use the `Mapping=tex-ansi` option).

With a modified version of `\defaultfontfeatures`, fontspec will continue to report scaling against the old default font in the log, but it nonetheless displays main font at the specified size. Using this rather than setting `Scale=MatchLowercase` for each family individually means that users will not lose scaling when upgrading to the new template if they were using other font options. Scaling can be disabled for an individual family by adding the option `Scale=1` to `sansfontoptions`, `monofontoptions`, etc.

Remove the `\setromanfont` command added in #4665, as this is not documented in the fontspec manual and appears to be a deprecated alias for `\setmainfont`.

For the release notes, I should also add that one can imitate the previous appearance with `-V mainfontoptions="Scale=MatchLowercase"`.
2019-01-12 17:39:47 -08:00
Andrew Dunning
fd222b811b LaTeX template: Render \subtitle (#5213)
Addresses closed issues #4675, #3896, #1327.

This renders `\subtitle` using the `etoolbox` package if `\subtitle` is not already
defined by the documentclass (as it is in beamer, KOMA, memoir classes).

 Based on an example from Enrico Gregorio, <https://tex.stackexchange.com/a/50186>.

Update list of LaTeX packages.

Note that `etoolbox` must be loaded outside the command definition.
Putting it inside causes an error if `\title` is placed after `\begin{document}`.
It's already loaded on LuaLaTeX/XeLaTeX in any case.
2019-01-11 11:17:53 -08:00
John MacFarlane
20bce07dd8 Clarified automatic identifiers.
We remove non-alphanumerics.  This includes, e.g., emojis.

Closes #5201.
2019-01-07 15:05:49 -08:00
Alexander
40c30a9d88 Add DokuWiki reader (#5108)
Closes #1792
2019-01-06 15:06:32 -08:00
John MacFarlane
577ad44350 MANUAL: Update list of latex packages used. 2019-01-03 10:53:48 -08:00
John MacFarlane
308e4671d6 A trivial change to document the addition of task_lists.
These notes should have been in the previous commit message.

Added `task_list` extension.

API changes:

+ Added constructor `Ext_task_lists` to `Extension`.
+ Added `taskListItemFromAscii` and `taskListItemToAscii` to
  Text.Pandoc.Shared.

Task lists are supported form markdown and gfm input.
They should work, to some degree, in all output formats,
though in most formats you'll get an ordered list with
a following task list box.  In HTML and LaTeX/PDF output,
the bullet will be suppressed for nicer output.
2019-01-02 11:38:44 -08:00
Mauro Bieg
f1d83aea12 Implement task lists (#5139)
Closes #3051
2019-01-02 11:36:37 -08:00
John MacFarlane
1bbbd5fad3 Manual: make it clear that hard_line_breaks works in gfm.
See #5195.
2019-01-02 10:14:37 -08:00
Geoffrey Ely
0673da04fe Fix typo in MANUAL.txt
The example to create a div with id `refs` instead creates a div with class `#refs`.  The fix is to add curly brackets.
2018-12-27 11:43:03 -05:00
Mauro Bieg
e4340b384f ICML writer: support custom-styles (#5137)
see #2106
2018-12-12 14:51:14 -05:00
John MacFarlane
839bd3cfe6 Update date in manual and update man page. 2018-11-24 20:40:07 -08:00
John MacFarlane
f961dd7c1b MANUAL: Fix outdated description of latex_macros extension. 2018-11-21 22:56:50 -05:00
John MacFarlane
3689d047a8 MANUAL.txt: Clarified placement of bibliography. 2018-11-19 10:46:50 -08:00
John MacFarlane
2347babbf0 MANUAL: Under security, added note about +RTS option to limit heap size.
See #5047.
2018-11-15 10:10:40 -08:00
John MacFarlane
4a950feb8e Fix note on curly brace syntx for locators. 2018-11-13 07:05:58 -08:00
John MacFarlane
a01ee64970 Document new explicit syntax for citeproc locators. 2018-11-12 20:20:32 -08:00
John MacFarlane
a36d202e86 Text.Pandoc.Shared: add parameter to uniqueIdent, inlineListToIdentifier.
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.
2018-11-11 13:46:23 -08:00
John MacFarlane
ca17ae5246 Remove ascii_identifiers from githubMarkdownExtensions.
GitHub doesn't seem to strip non-ascii characters.
2018-11-11 11:04:34 -08:00
John MacFarlane
f16e29ee2b MANUAL.txt: remove confusing cross-links for some extensions.
I think the text comment to look in the pandoc markdown section
is enough.
2018-11-05 17:20:41 -08:00
John MacFarlane
c4223ca094 MANUAL: don't put pandoc in code ticks in heading. 2018-11-05 10:09:52 -08:00
John MacFarlane
1269fbd032 MANUAL.txt: --ascii works for gfm too. 2018-11-05 09:46:04 -08:00
quasicomputational
a747268823 CommonMark writer: respect --ascii (#5043) 2018-11-05 09:33:10 -08:00
John MacFarlane
249fd40838 MANUAL.txt: added "A note on security." 2018-11-05 09:21:43 -08:00
John MacFarlane
41b8ad6dd7 MANUAL.txt: add man to --from options. 2018-11-04 11:28:10 -08:00
John MacFarlane
db8ff174e5 Document romanfont, romanfontoptions. 2018-11-03 12:42:36 -07:00
John MacFarlane
2f65263851 AsciiDoc writer: use single-line section headers.
The underline style is now deprecated.
Previously `--atx-headers` would enable the single-line
style; now the single-line style is always used.

Closes #5038.
2018-11-03 12:03:05 -07:00
John MacFarlane
c0e0ef12cf Update manual date and man page. 2018-11-01 21:56:41 -07:00
John MacFarlane
e10d5b3d5b Change 'groff' -> 'roff'.
These formats (man, ms) are not groff-specific.
2018-11-01 16:46:43 -07:00
John MacFarlane
26341c1632 Implement --ascii for Markdown writer. 2018-11-01 16:31:04 -07:00
John MacFarlane
f379edc4ad HTML writer: use character entities references when possible for HTML5. 2018-11-01 16:08:27 -07:00
Mauro Bieg
614b1c0c61 MANUAL: clarify LaTeX image dimensions output 2018-11-01 14:15:09 -07:00
John MacFarlane
7c9ff8461f small wording change 2018-10-28 16:18:11 -07:00
mb21
7e6f13cf81 EPUB writer: use metadata field css instead of stylesheet
closes #4990
2018-10-28 16:18:11 -07:00
John MacFarlane
efbb329f1a Groff escaping changes.
- `--ascii` is now turned on automatically for man output, for
  portability.  All man output will be escaped to ASCII.
- In T.P.Writers.Groff, `escapeChar`, `escapeString`, and
  `escapeCode` now take a boolean parameter that selects
  ascii-only output.  This is used by the Ms writer for
  `--ascii`, instead of doing an extra pass after writing
  the document.
- In ms output without `--ascii`, unicode is used whenever
  possible (e.g. for double quotes).
- A few escapes are changed: e.g. `\[rs]` instead of `\\` for
  backslash, and `\ga]` instead of `` \` `` for backtick.
2018-10-18 10:21:34 -07:00
quasicomputational
6207bdeb68 CommonMark writer: add plain text fallbacks. (#4531)
Previously, the writer would unconditionally emit HTMLish output for
subscripts, superscripts, strikeouts (if the strikeout extension is
disabled) and small caps, even with raw_html disabled.

Now there are plain-text (and, where possible, fancy Unicode)
fallbacks for all of these corresponding (mostly) to the Markdown
fallbacks, and the HTMLish output is only used when raw_html is
enabled.

This commit adds exported functions `toSuperscript` and
`toSubscript` to `Text.Pandoc.Writers.Shared`.  [API change]

Closes #4528.
2018-10-05 21:33:14 -07:00
John MacFarlane
36f1846cc3 Implement --ascii (writerPreferAscii) in writers, not App.
Now the `write*` functions for Docbook, HTML, ICML, JATS,
Man, Ms, OPML are sensitive to `writerPreferAscii`.  Previously
the to-ascii translation was done in Text.Pandoc.App, and
thus not available to those using the writer functions
directly.

In addition, the LaTeX writer is now sensitive to
`writerPreferAscii` and to `--ascii`.  100% ASCII
output can't be guaranteed, but the writer will use
commands like `\"{a}` and `\l` whenever possible,
to avoid emiting a non-ASCII character.

A new unexported module, Text.Pandoc.Groff, has been
added to store functions used in the different groff-based
writers.
2018-09-30 22:32:00 -07:00
John MacFarlane
c07b9aebc2 Version to 2.3.1. 2018-09-27 23:09:06 -07:00