Commit Graph
12836 Commits
Author SHA1 Message Date
John MacFarlane 530bfe5f5a Docx reader: fix list number resumption for sublists. Closes #4324.
The first list item of a sublist should not resume numbering
from the number of the last sublist item of the same level,
if that sublist was a sublist of a different list item.

That is, we should not get:

```
1. one
   1. sub one
   2. sub two
2. two
   3. sub one
```
2019-11-03 12:54:42 -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 c4ff0b5564 Update changelog.md. 2019-11-03 08:41:05 -08:00
Dmitry Pogodin 270ffe6ab5 Place caption before table in OpenDocument format. (#5869)
Closes #5681.
2019-11-03 07:17:05 -08:00
John MacFarlane 8a2e87758e Fix metadata replacement example in lua-filters doc.
Closes #5851.

We avoid the failure with a boolean value by simply checking
to make sure we have a table before indexing.
2019-11-02 22:55:58 -07:00
John MacFarlane 311a20c6c5 RST reader: avoid spurious warning...
when resolving links to internal anchors ending with `_`.
Closes #5763.
2019-11-02 22:26:07 -07:00
John MacFarlane 65593043c3 LaTeX reader: Fixed dollar-math parsing...
...to ensure that space is left between a control seq and
a following word that would otherwise change its meaning.

Closes #5836.
2019-11-02 12:44:48 -07:00
John MacFarlane f39c44f0ba Add test for #5836. 2019-11-02 12:27:15 -07:00
John MacFarlane 041cfbd5ee LaTeX untokenize: Ensure space between control sequence and following letter.
Closes #5836.
2019-11-02 12:20:04 -07:00
John MacFarlane 6c9a20b2d3 Test for macro definitions in LaTeX preamble. 2019-11-02 11:08:26 -07:00
John MacFarlane 7fac395284 LaTeX reader: Don't omit macro definitions defined in the preamble.
These were formerly omitted (though they still affected macro
resolution if `latex_macros` was set).  Now they are included in
the document.
2019-11-02 11:04:21 -07: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 724fd655e7 Add test case for #5845. 2019-11-02 09:40:08 -07:00
John MacFarlane 4b58384c0a LaTeX reader: fixed a hang/memory leak in certain circumstances.
We were using `grouped blocks` instead of `grouped block`.
This caused the reader to hang in an infinite loop
(with a memory leak) on e.g. `\parbox{1em}{#1}`.

Closes #5845.
2019-11-02 09:33:32 -07:00
John MacFarlane 180c96f9a0 Move extension-adding to applyDefaults 2019-11-02 08:27:03 -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 1b69d5ed94 Factor out applyDefaults in T.P.A.CommandLineOptions. 2019-11-01 09:52:39 -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
Albert Krewinkel 4e902b1d60 Jira writer: remove extraneous newline after single-line block quotes
See #5858
2019-10-31 22:01:12 +01:00
John MacFarlane 4f1224dc0b Use latest doclayout.
Closes #5863.
2019-10-30 21:26:21 -07:00
Florian Klink c6e936dec2 docbook reader: fix nesting of chapters and sections (#5864)
* Set dbBook to true when traversing a chapter too.
  Currently, a `<title/>` in a chapter and in a `<section/>` below that
  chapter have the same level if they're not inside a `<book/>`.

  This can happen in a multi-file book project. Also see the example at
  https://tdg.docbook.org/tdg/4.5/chapter.html

  Co-authored-by: Félix Baylac-Jacqué <felix@alternativebit.fr>

* Add docbook-chapter test

  This tests nested `<section/>` and makes sure `<title/>` in the first
  `<section/>` below `<chapter/>` is one level deeper than the `<chapter/>`'s
  `<title/>`, also when not inside a `<book/>`.

  Co-authored-by: Félix Baylac-Jacqué <felix@alternativebit.fr>
2019-10-30 08:51:33 -07:00
John MacFarlane 080a3cdaeb Update Template syntax in MANUAL.txt with latest doctemplates. 2019-10-29 22:39:25 -07:00
John MacFarlane 63cfd45406 T.P.W.Shared: Changed gridTables so it does better at...
...keeping the widths of columns.  See #4320.
Adjust test case for #4320.
2019-10-29 22:21:35 -07:00
John MacFarlane 1fe9742263 Changes to build with new doctemplates/doclayout.
The new version of doctemplates adds many features to pandoc's
templating system, while remaining backwards-compatible.
New features include partials and filters.  Using template filters,
one can lay out data in enumerated lists and tables.

Templates are now layout-sensitive: so, for example, if a
text with soft line breaks is interpolated near the end of
a line, the text will break and wrap naturally.  This makes
the templating system much more suitable for programatically
generating markdown or other plain-text files from metadata.
2019-10-29 22:21:35 -07:00
John MacFarlane 4d5fd9e2fe Remove include of grffile from default latex template.
This package is needed for proper handling of image filenames
containing periods (in addition to the period before the
extension).

Unfortunately, grffile breaks in the latest texlive update.
Until a fix is released (see ho-tex/oberdiek#73) it seems best
to remove this from the default template.

This may cause problems if you have filenames with periods.
The workaround is to put `\usepackage{grffile}` in header-includes,
and be sure you're using an older version of texlive packages.

See #5848. We will leave that issue open to remind us to
check upstream, and restore grffile when it's possible to
do so.
2019-10-29 21:44:08 -07:00
John MacFarlane a796b655cd Shared.makeSections: better behavior in some corner cases.
When a div surrounds multiple sections at the same level,
or a section of highre level followed by one of lower level,
then we just leave it as a div and create a new div for the
section.

Closes #5846, closes #5761.
2019-10-29 21:24:58 -07:00
John MacFarlane 47566817c5 Shared: improve isTight.
If a list has an empty item, this should not count against
its being a tight list.

Closes #5857.
2019-10-28 21:14:01 -07:00
Marcus Stollsteimer 57e2148ca2 Fix capitalization of "Linux" in docs (#5859) 2019-10-28 10:45:36 -07:00
Albert Krewinkel 88409f9afa doc/lua-filters.md: fix mistakes in mediabag module docs
See: #5851
2019-10-27 23:09:20 +01:00
Albert Krewinkel 909083090a Org reader: fix parsing of empty comment lines
Comment lines in Org-mode can be completely empty; both of these line
should produce no output:

    # a comment
    #

The reader used to produce a wrong result for the latter, but ignores
that line as well now.

Fixes: #5856
2019-10-27 23:00:30 +01:00
John MacFarlane bef124c98c Beamer writer: fix regression with hrules separating slides. 2019-10-25 23:01:29 -07:00
Ole Martin Ruud 45479114e8 HTML reader/writer: Better handling of <q> with cite attribute (#5837)
* HTML reader: Handle cite attribute for quotes.  If a `<q>` tag has a `cite` attribute, we interpret it as a Quoted element with an inner Span.  Closes #5798

* Refactor url canonicalization into a helper function

* Modify HTML writer to handle quote with cite.

[0]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q
2019-10-24 22:27:49 -07:00
John MacFarlane 91c325c714 T.P.Readers.LaTeX.Parsing: add [Tok] parameter to rawLaTeXParser.
This allows us to avoid retokenizing multiple times in
e.g. rawLaTeXBlock.  (Unexported module, so not an API change.)
2019-10-23 09:42:46 -07:00
Amogh Rathore d50f46d26d Add Reader support for HTML <samp> element (#5843)
The `<samp>` element is parsed as a Span with class `sample`.
Closes #5792.
2019-10-23 08:44:24 -07:00
John MacFarlane b80bd174a2 Use latest dev doctemplates 2019-10-16 09:25:52 -07:00
Florian B c55651d761 Add info about command test naming to CONTRIBUTING
Added a paragraph about naming conventions for tests in `test/command/`
to the contributors guide. Advises to include issue number and/or
feature being tested.
2019-10-16 09:09:08 -07:00
Florian B a933ad30fb Add support for reading & writing <mark> elements
Parse <mark> elements from HTML as HTML span like elements, with a
single class matching the tag name `mark`. Mark elements are rendered to
HTML using the native <mark> element.

Fixes https://github.com/jgm/pandoc/issues/5797.
2019-10-16 09:08:12 -07:00
John MacFarlane f1fd120d4a Use latest dev doctemplates. 2019-10-15 22:33:29 -07:00
Volodymyr Kozachynskyi 5af8b422dd Add Void Linux
No real website to package, added simply official webpage as href
2019-10-15 14:50:32 -07:00
Daniele D'Orazio 1425bf9a65 Add support for reading and writing <kbd> elements
* Text.Pandoc.Shared: export `htmlSpanLikeElements` [API change]

This commit also introduces a mapping of HTML span like elements that
are internally represented as a Span with a single class, but that are
converted back to the original element by the html writer. As of now,
only the kbd element is handled this way. Ideally these elements should
be handled as plain AST values, but since that would be a breaking
change with a large impact, we revert to this stop-gap solution.

Fixes https://github.com/jgm/pandoc/issues/5796.
2019-10-15 09:49:09 -07:00
Alexander Krotov a1977dd2d6 Muse reader: do not allow closing asterisks to be followed by "*" 2019-10-15 16:36:05 +03:00
John MacFarlane a0aeb135b3 Minor template & test changes for latest dev doctemplates. 2019-10-14 23:42:29 -07:00
Alexander Krotov d5c13dd438 Muse reader: do not split series of asterisks into symbols and emphasis
Fixes #5821
2019-10-15 01:55:32 +03:00
Alexander Krotov 13e0ac1104 Muse reader: do not terminate emphasis on "*" not followed by space 2019-10-15 01:02:54 +03:00
John MacFarlane d8d784ab54 Fixed typo in example. 2019-10-14 08:48:51 -07:00
mb21 25cb84d8d9 change indentation of math part in Writers/HTML.hs 2019-10-14 08:47:40 -07:00
mb21 bfbff3106d KaTeX math: respect classoption=fleqn variable
closes #5815
2019-10-14 08:47:40 -07:00