Commit graph

14010 commits

Author SHA1 Message Date
John MacFarlane
aa60d9b230 Add shell.nix. 2021-01-31 12:06:38 -08:00
John MacFarlane
d1875b69ec RST reader: fix handling of header in CSV tables.
The interpretation of this line is not affected
by the delim option. Closes #7064.
2021-01-31 12:05:46 -08:00
Albert Krewinkel
9c8ff53b54
CslJson writer: fix compiler warning 2021-01-31 14:37:47 +01:00
John MacFarlane
a9adb29648 Require citeproc 0.3.0.6. 2021-01-30 19:09:08 -08:00
John MacFarlane
6695917258 CslJson writer: output [] if no references in input,
instead of raising a PandocAppError as before.
2021-01-30 18:10:22 -08:00
John MacFarlane
fe06437ba4 Use tasty-bench instead of criterion for benchmarks.
It is much lighter-weight.
2021-01-30 18:01:14 -08:00
John MacFarlane
a6c7469c85 Use latest citeproc.
The fix to jgm/citeproc#49 also closes #7060.
2021-01-30 13:56:43 -08:00
John MacFarlane
9223788a05 Markdown writer: handle math right before digit.
We insert an HTML comment to avoid a `$` right before
a digit, which pandoc will not recognize as a math delimiter.
2021-01-29 18:29:17 -08:00
Albert Krewinkel
d82fe52a02
JATS templates: tag author.name as string-name
The partitioning the components of a name into surname, given names,
etc. is not always possible or not available. Using `author.name` allows
to give the full name as a fallback to be used when `author.surname` is
not available.
2021-01-29 09:51:20 +01:00
Albert Krewinkel
300b9b0ea3
JATS writer: escape special chars in reference elements.
Prevents the generation of invalid markup if a citation element contains
an ampersand or another character with a special meaning in XML.
2021-01-29 09:51:20 +01:00
John MacFarlane
2ca61a5350 Improve docs for cite-method. 2021-01-27 09:22:50 -08:00
John MacFarlane
98c2a52b4e Clean up BibTeX parsing.
Previously there was a messy code path that gave strange
results in some cases, not passing through raw tex but
trying to extract a string content.  This was an artefact
of trying to handle some special bibtex-specific commands
in the BibTeX reader. Now we just handle these in the
LaTeX reader and simplify parsing in the BibTeX reader.
This does mean that more raw tex will be passed through
(and currently this is not sensitive to the `raw_tex`
extension; this should be fixed).

Closes #7049.
2021-01-26 22:45:57 -08:00
Mauro Bieg
12bc662535 LaTeX writer: change BCP47 lang tag from jp to ja
fixes #7047
2021-01-26 15:29:33 -08:00
Albert Krewinkel
490065f3ed Lua: always load built-in Lua scripts from default data-dir
The Lua modules `pandoc` and `pandoc.List` are now always loaded from the
system's default data directory. Loading from a different directory by
overriding the default path, e.g. via `--data-dir`, is no longer supported to
avoid unexpected behavior and to address security concerns.
2021-01-26 09:43:56 -08:00
John MacFarlane
3f9eee473d Update AUTHORS.md. 2021-01-23 15:54:38 -08:00
John MacFarlane
54d8c6959c Update README and man page. 2021-01-22 21:37:59 -08:00
John MacFarlane
8e3c44909a Update changelog. 2021-01-22 21:37:04 -08:00
John MacFarlane
198ce0cde9 ImageSize: use viewBox for svg if no length, width.
This change allows pandoc to extract size information
from more SVGs.  Closes #7045.
2021-01-22 20:49:41 -08:00
John MacFarlane
f5e3c1dad6 Use citeproc 0.3.0.5. 2021-01-22 11:06:35 -08:00
John MacFarlane
83d7804b8f
Merge pull request #7042 from tarleb/jats-element-citations
JATS writer: use element citations
2021-01-22 10:39:58 -08:00
Albert Krewinkel
b4b3560191
JATS writer: allow to use element-citation 2021-01-22 19:35:08 +01:00
John MacFarlane
fa952c8dbe Add biblatex, bibtex as output formats (closes #7040).
* `biblatex` and `bibtex` are now supported as output
  as well as input formats.

* New module Text.Pandoc.Writers.BibTeX, exporting
  writeBibTeX and writeBibLaTeX. [API change]

* New unexported function `writeBibtexString` in
  Text.Pandoc.Citeproc.BibTeX.
2021-01-22 10:08:43 -08:00
Albert Krewinkel
87083bd1d6
Text.Pandoc.Citeproc: use finer grained imports
This allows to import the module in writers without causing a circular
dependency.
2021-01-21 23:22:08 +01:00
John MacFarlane
5f98ac62e3 JATS writer: Ensure that disp-quote is always wrapped in p.
Closes #7041.
2021-01-19 20:39:58 -08:00
John MacFarlane
1c4d14cdcc RST writer: fix #7039.
We were losing content from inside spans with a class,
due to logic that is meant to avoid nested inline
structures that can't be represented in RST.

The logic was a bit stricter than necessary.  This
commit fixes the issue.
2021-01-18 11:32:02 -08:00
John MacFarlane
c841bcf3b0 Revert "Markdown reader: support GitHub wiki's internal links (#2923) (#6458)"
This reverts commit 6efd3460a7.

Since this extension is designed to be used with
GitHub markdown (gfm), we need to implement the parser
as a commonmark extension (commonmark-extensions),
rather than in pandoc's markdown reader.  When that is
done, we can add it here.
2021-01-16 16:22:04 -08:00
Gautier DI FOLCO
6efd3460a7
Markdown reader: support GitHub wiki's internal links (#2923) (#6458)
Canges overview:

 * Add a `Ext_markdown_github_wikilink` constructor to `Extension` [API change].
 * Add the parser `githubWikiLink` in `Text.Pandoc.Readers.Markdown`
 * Add tests.
2021-01-16 16:15:33 -08:00
John MacFarlane
83336a45a7 Recognize more extensions as markdown by default.
`mkdn`, `mkd`, `mdwn`, `mdown`, `Rmd`.
Closes #7034.
2021-01-16 11:15:35 -08:00
John MacFarlane
e7ea89928f Improve .gitignore. 2021-01-15 22:41:39 -08:00
John MacFarlane
07c98eae50 Use citeproc >= 0.3.0.4. 2021-01-15 14:17:17 -08:00
John MacFarlane
3d6ebc9051 Use dev version of citeproc.
Change a citation test which had wrong disambiguation
(see jgm/citeproc#44).
2021-01-15 11:51:07 -08:00
John MacFarlane
76b36fcb17 Use simple default.nix.
Remove nix makefile targets.
2021-01-13 09:52:09 -08:00
John MacFarlane
2787083b76 Use project.nix instead of default.nix for generated file. 2021-01-12 22:32:26 -08:00
John MacFarlane
bd3b7c2e2c Delete default.nix.
It is generated and shouldn't be in repository.
2021-01-12 22:29:29 -08:00
John MacFarlane
ea96bc52e4 CONTRIBUTING: note on GNU xargs 2021-01-12 21:53:39 -08:00
John MacFarlane
526e7f5c55 Gitignore: add .DS_Store, .orig 2021-01-12 21:50:22 -08:00
John MacFarlane
91fbea29dd Add files for using nix-shell.
'make nix-shell' enters a nix shell with pandoc dependencies
installed.
2021-01-12 21:18:17 -08:00
John MacFarlane
387d3e76ee Markdown writer: cleaned up raw formats.
We now react appropriately to gfm, commonmark, and commonmark_x
as raw formats.
2021-01-12 10:20:32 -08:00
John MacFarlane
c451207b08 Docx writer: handle table header using styles.
Instead of hard-coding the border and header cell vertical alignment,
we now let this be determined by the Table style, making use of
Word's "conditional formatting" for the table's first row.
For headerless tables, we use the tblLook element to tell Word
not to apply conditional first-row formatting.

Closes #7008.
2021-01-12 09:49:10 -08:00
John MacFarlane
4a223e68f4 Use commonmark 0.1.1.3. 2021-01-11 12:23:55 -08:00
Albert Krewinkel
45174d7385
MANUAL.txt: update description of -L/--lua-filter.
The example filter was outdated, a reference to the separate Lua filters
documentation is added instead.
2021-01-11 16:16:05 +01:00
Albert Krewinkel
68fa437999
JATS writer: fix citations (#7018)
* JATS writer: keep code lines at 80 chars or below

* JATS writer: fix citations
2021-01-10 15:35:48 -08:00
John MacFarlane
a41cb09afe Update default CSL to use latest chicago-author-date.csl. 2021-01-10 12:52:50 -08:00
John MacFarlane
e741c7f553 Fix infinite HTTP requests when writing epubs from URL source.
Due to a bug in code added to avoid overwriting the cover image
if it had the form `fileX.YYY`, pandoc made an endless sequence
of HTTP requests when writing epub with input from a URL.

Closes #7013.
2021-01-10 12:49:53 -08:00
John MacFarlane
d98ec4feb8 T.P.Citeproc: factor out and export getStyle. 2021-01-10 11:48:53 -08:00
John MacFarlane
402d984bc5 T.P.Citeproc: factor out getLang. 2021-01-10 10:28:53 -08:00
John MacFarlane
c83811773e Bump to 2.11.4.
API change: export getReferences from T.P.Citeproc.
2021-01-10 10:16:15 -08:00
John MacFarlane
15e33b33b4 T.P.Citeproc: refactor and export getReferences.
See #7016.
2021-01-10 10:15:30 -08:00
Albert Krewinkel
fe1378227b
Org reader: allow multiple pipe chars in todo sequences
Additional pipe chars, used to separate "action" state from "no further
action" states, are ignored. E.g., for the following sequence, both
`DONE` and `FINISHED` are states with no further action required.

    #+TODO: UNFINISHED | DONE | FINISHED

Previously, parsing of the todo sequence failed if multiple pipe chars
were included.

Closes: #7014
2021-01-09 13:40:31 +01:00
Albert Krewinkel
4f34345867
Update copyright notices for 2021 (#7012) 2021-01-08 09:38:20 -08:00