Commit graph

327 commits

Author SHA1 Message Date
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