John MacFarlane
7d01887dda
Fix corner case in YAML metadata parsing.
...
Previously YAML metadata would sometimes not get recognized if a
field ended with a newline followed by spaces. Closes #6823 .
2020-11-10 09:47:24 -08:00
John MacFarlane
08ce3addde
Hlint suggestions.
2020-11-07 10:53:07 -08:00
Albert Krewinkel
527346cc7e
Lint code in PRs and when committing to master ( #6790 )
...
* Remove unused LANGUAGE pragmata
* Apply HLint suggestions
* Configure HLint to ignore some warnings
* Lint code when committing to master
2020-11-07 10:38:03 -08:00
Albert Krewinkel
0ed3436588
doc/filters.md: describe technical details of filter invocations ( #6815 )
2020-11-06 15:37:24 -08:00
John MacFarlane
535bd607de
Support nocase spansn for csljson output
2020-11-06 09:16:24 -08:00
John MacFarlane
06d3071090
LaTeX reader: better handling of \\
inside math in table cells.
...
Previously this confused the table parser. Closes #6811 .
2020-11-05 16:13:35 -08:00
John MacFarlane
090b0877bc
Citeproc: improve punctuation in in-text note citations.
...
Previously in-text note citations inside a footnote
would sometimes have the final period stripped, even
if it was needed (e.g. on the end of 'ibid').
See #6813 .
2020-11-05 11:15:23 -08:00
John MacFarlane
efe74746d8
DokuWiki writer: translate language names for code elements...
...
...and improve whitespace. Closes #6807 .
2020-11-04 22:38:53 -08:00
John MacFarlane
08134388ad
MediaWiki writer: use syntaxhighlight tag...
...
instead of deprecated source, for highlighted code.
Also support `startFrom` attribute and `numberLines`.
Closes #6810 .
2020-11-04 21:20:41 -08:00
John MacFarlane
0bd6fb4745
Simplified idpred in citeproc.
2020-11-04 11:10:49 -08:00
John MacFarlane
8f75a53542
Properly support optional cite argument for \blockquote
.
...
(LaTeX reader)
Closes #6802 .
2020-11-03 10:25:56 -08:00
John MacFarlane
6cbe5efd56
LaTeX reader: fix bug parsing macro arguments.
...
If `\cL` is defined as `\mathcal{L}`, and `\til` as `\tilde{#1}`,
then `\til\cL` should expand to `\tilde{\mathcal{L}}`, but pandoc
was expanding it to `\tilde\mathcal{L}`. This is fixed by
parsing the arguments in "verbatim mode" when the macro expands
arguments at the point of use.
Closes #6796 .
2020-11-02 15:04:16 -08:00
Albert Krewinkel
1175b0a008
T.P.Filter: allow shorter YAML representation of Citeproc
...
The map-based YAML representation of filters expects `type` and `path`
fields. The path field had to be present for all filter types, but is
not used for citeproc filters. The field can now be omitted when type
is "citeproc", as described in the MANUAL.
2020-11-02 15:14:19 +01:00
John MacFarlane
6051c751ce
Citeproc: use comma for in-text citations inside footnotes.
...
When an author-in-text citation like `@foo` occurs in a footnote,
we now render it with: `AUTHOR NAME + COMMA + SPACE + REST`.
Previously we rendered: `AUTHOR NAME + SPACE + "(" + REST + ")"`.
This gives better results. Note that normal citations are still
rendered in parentheses.
2020-11-01 10:48:47 -08:00
John MacFarlane
01f2d81168
Improve deNote.
2020-11-01 10:48:47 -08:00
Andy Morris
f1f2728259
Fix duplicate "class" attribute in HTML writer
2020-10-30 16:38:59 +01:00
John MacFarlane
3e6d009c6b
Use new citeproc; do note capitalization here, not in citeproc.
2020-10-29 21:53:02 -07:00
John MacFarlane
bc3f16b0c1
Allow citation-abbreviations in defaults file.
2020-10-29 15:54:50 -07:00
John MacFarlane
bd7c9eb32b
LaTeX writer: Improved calculation of table column widths.
...
We now have LaTeX do the calculation, using `\tabcolsep`.
So we should now have accurate relative column widths no
matter what the text width.
The default template has been modified to load the calc
package if tables are used.
2020-10-29 12:10:05 -07:00
John MacFarlane
95c9f3da63
Remove obsolete comment
2020-10-27 21:05:59 -07:00
John MacFarlane
3190ce95c2
Citeproc: properly handle csl
field with data:
URI.
...
This is used with the JATS writer, so this fixes a regression
in pandoc 2.11 with JATS output and citeproc.
Closes #6783 .
2020-10-27 21:04:24 -07:00
John MacFarlane
3d93414e5d
Add PandocBibliographyError and use it in parsing bibliographies.
...
This ensures that bibliography parsing errors generate messages
that include the bibliography file name -- otherwise it can be
quite mysterious where it is coming from.
[API change] New PandocBibliographyError constructor on
PandocError type.
2020-10-26 14:46:53 -07:00
Nils Carlson
dd3d920ba0
DocBook Reader: fix duplicate bibliography bug ( #6773 )
...
Also add unit test to ensure the behavior stays consistent.
2020-10-26 12:49:03 -07:00
John MacFarlane
9ab04a92f8
HTML reader: Parse contents of iframes.
...
See #6770 .
2020-10-23 23:31:36 -07:00
John MacFarlane
4bf171e11d
HTML reader: parse inline svg as image...
...
...unless `raw_html` is set in the reader (in which case
the svg is passed through as raw HTML).
Closes #6770 .
2020-10-23 22:09:39 -07:00
John MacFarlane
efc6994c8a
Commonmark writer: fix regression with fenced divs.
...
Starting with 2.10.1, fenced divs no longer render with
HTML div tags in commonmark output. This is a regression
due to our transition from cmark-gfm. This commit fixes it.
Closes #6768 .
2020-10-23 09:25:07 -07:00
John MacFarlane
f9c6167ad1
citeproc - improved removal of final period...
...
...in citations inside notes in note-based styles.
These citations are put in parentheses, but the final
period must be removed.
See jgm/citeproc#20
2020-10-21 22:23:21 -07:00
John MacFarlane
76315d99ca
More refinements to --version output.
...
Add ipynb version. Put user data directory on same line as
heading "User data directory" (dropping "default").
2020-10-19 17:12:36 -07:00
John MacFarlane
1a2f8733b6
Normalize rewritten image paths with --extract-media.
...
This change will avoid mixed paths like this one when
`--extract-media` is used with a Word file:
`![](C:\Git\TIJ4\Markdown/media/image30.wmf)`
Instead we'll get
`![](C:\Git\TIJ4\Markdown`media`image30.wmf)`.
Closes #6761 .
2020-10-19 16:32:39 -07:00
John MacFarlane
9ecea0bc62
Modify --version output.
...
Use space more efficiently and report the citeproc version along
with skylighting, texmath, and pandoc-types.
2020-10-19 16:32:39 -07:00
Nils Carlson
2332a08f1e
DocBook reader: bibliomisc and anchor support ( #6754 )
...
Also do some minor refactoring - bibliodiv without
a title no longer results in an empty Header.
2020-10-16 23:52:19 -07:00
John MacFarlane
eb3307da4e
Fix handling of xdata in bibtex/biblatex bibliographies.
...
Closes #6752 .
2020-10-15 17:41:45 -07:00
Michael Hoffmann
988d381aad
Fix some small typos in the API documentation ( #6751 )
...
While reading the docs I found a couple of small typos.
2020-10-15 17:09:29 -07:00
Albert Krewinkel
90af138443
Fix typos in comments, doc strings, error messages, and tests
...
Typos reported by
https://fossies.org/linux/test/pandoc-master.tar.gz/codespell.html
See: #6738
2020-10-14 22:26:51 +02:00
John MacFarlane
0b3b77415f
Modify fix to #6742 to use stringToLaTeX.
2020-10-14 10:22:15 -07:00
John MacFarlane
e0da02623e
LaTeX reader: support more acronym commands.
...
`\acl`, `\aclp`, and capitalized versions of already
supported commands.
Closes #6746 .
2020-10-13 21:00:02 -07:00
John MacFarlane
a55fb5f29d
LaTeX writer: escape option values in lstlistings environment.
...
Closes #6742 .
2020-10-13 20:53:39 -07:00
John MacFarlane
ef6627f645
LaTeX writer: fix handling of pt-BR.
...
For polyglossia we now use
`\setmainlanguage[variant=brazilian]{portuguese}`
and for babel
`\usepackage[shorthands=off,main=brazilian]{babel}`.
Closes #2953 .
2020-10-12 21:35:36 -07:00
John MacFarlane
12ff835a8a
Commonmark reader: add pipe_table extension after defaults.
...
Otherwise we get bad results for non-table, non-paragraph
lines containing pipe characters.
Closes #6739 .
See also jgm/commonmark-hs#52 .
2020-10-12 21:24:26 -07:00
John MacFarlane
2007cff203
Markdown writer: Fix autolinks rendering for gfm.
...
Previously, autolinks rendered as raw HTML, due to the
`class="uri"` added by pandoc's markdown reader.
Closes #6740 .
2020-10-12 18:57:04 -07:00
John MacFarlane
0b5e2601f5
LaTeX reader: allow blank lines inside \author
.
2020-10-10 16:28:52 -07:00
Kolen Cheung
0166b8f857
Options.hs: defaultMathJaxURL: use tex-chtml-full instead of tex-mml-chtml ( #6600 )
...
Closes #6599
c.f. https://docs.mathjax.org/en/latest/web/components/combined.html
Note that while this use the full variant of the js, this drops the mathml support.
That should be okay, because pandoc renders math in HTML as TeX when using
mathjax.
This change reduces latency.
2020-10-10 11:11:58 -07:00
John MacFarlane
e7adc2917b
In fetching parent of dependent CSL style, first...
...
look locally, and only do an HTTP request if it's not
found locally.
2020-10-09 13:35:53 -07:00
John MacFarlane
9a6c42590f
LaTeX reader: Fix parsing of "show name" in newtheorem.
...
Previously we were just treating it as a string and
ignoring accents and formatting. See #6734 .
2020-10-08 22:47:32 -07:00
John MacFarlane
2d4214fa31
Extend fix to #6719 to JATS reader
2020-10-08 21:36:08 -07:00
John MacFarlane
f19286cf12
DocBook reader: don't squelch space at end of emphasis element.
...
Instead, include it after the emphasis. Closes #6719 .
Same fix was made for other inline elements, e.g. strikethrough.
2020-10-08 21:27:52 -07:00
John MacFarlane
dd3c4000ff
Small improvements to BibTeX parser.
2020-10-08 20:48:19 -07:00
John MacFarlane
480f582664
Export ParseError from T.P.Parsing.
2020-10-08 18:55:20 -07:00
John MacFarlane
641849b70a
Be less aggressive about using quotes for YAML values.
...
We need quotes if `[` or `{` or `'` is at the beginning of
the line, but not otherwise.
2020-10-08 10:54:53 -07:00
John MacFarlane
2566ff6624
Qualify some uses of fail to avoid ambiguity.
2020-10-08 09:12:29 -07:00