Commit graph

1347 commits

Author SHA1 Message Date
Albert Krewinkel
ebb8f23b66 Use hslua-module-path 0.1.0 2021-02-02 21:04:30 -08:00
Albert Krewinkel
61b108d527 Lua: add module "pandoc.path"
The module allows to work with file paths in a convenient and
platform-independent manner.

Closes: #6001
Closes: #6565
2021-02-02 21:04:30 -08:00
John MacFarlane
02d3c71e72 BibTeX writer: use doclayout and doctemplate.
This change allows bibtex/biblatex output to wrap as other
formats do, depending on the settings of `--wrap` and `--columns`.

It also introduces default templates for bibtex and biblatex,
which allow for using the variables `header-include`, `include-before`
or `include-after` (or alternatively the command line options
`--include-in-header`, `--include-before-body`, `--include-after-body`)
to insert content into the generated bibtex/biblatex.

This change requires a change in the return type of the unexported
`T.P.Citeproc.writeBibTeXString` from `Text` to `Doc Text`.

Closes #7068.
2021-02-01 18:05:20 -08:00
John MacFarlane
b239c89a82 BibTeX writer fixes. Closes #7067.
+ Require citeproc 0.3.0.7, which correctly titlecases when titles
  contain non-ASCII characters.
+ Correctly handle 'pages' (= 'page' in CSL).
+ Correctly handle BibLaTeX 'langid' (= 'language' in CSL).
+ In BibTeX output, protect foreign titles since there's no language
  field.
2021-02-01 11:23:07 -08:00
John MacFarlane
a9adb29648 Require citeproc 0.3.0.6. 2021-01-30 19:09:08 -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
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
John MacFarlane
07c98eae50 Use citeproc >= 0.3.0.4. 2021-01-15 14:17:17 -08:00
John MacFarlane
4a223e68f4 Use commonmark 0.1.1.3. 2021-01-11 12:23:55 -08: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
c83811773e Bump to 2.11.4.
API change: export getReferences from T.P.Citeproc.
2021-01-10 10:16:15 -08:00
Albert Krewinkel
4f34345867
Update copyright notices for 2021 (#7012) 2021-01-08 09:38:20 -08:00
David Martschenko
385b6a3b21
Implement defaults file inheritance (#6924)
Allow defaults files to inherit options from other defaults files by
specifying them with the following syntax:
`defaults: [list of defaults files or single defaults file]`.
2021-01-05 10:15:59 -08:00
John MacFarlane
886faa3cbc Bump to 2.11.3.2, update changelog and man page 2020-12-29 12:48:55 -08:00
John MacFarlane
5d8b57444e Use citeproc 0.3.0.3.
Fixes an issue in author-only citations when both an
author and translator are present.
2020-12-29 10:43:50 -08:00
John MacFarlane
a7a162ea55 Update test for new citeproc and require it in cabal. 2020-12-28 14:40:23 -08:00
John MacFarlane
19d4e43605 Require texmath 0.12.1. 2020-12-27 22:57:14 -08:00
Albert Krewinkel
8f402beab9
LaTeX writer: support colspans and rowspans in tables. (#6950)
Note that the multirow package is needed for rowspans.
It is included in the latex template under a variable,
so that it won't be used unless needed for a table.
2020-12-20 18:04:54 -08:00
John MacFarlane
37ba5d5dfe Bump to 2.11.3.1 and update changelog and man page. 2020-12-18 15:29:57 -08:00
John MacFarlane
aa37970969 Use citeproc 0.3.0.1. 2020-12-18 15:08:23 -08:00
John MacFarlane
591bb2bace Add test/writer.asciidoctor, tables.asciidoctor to extra-source-files. 2020-12-18 11:27:41 -08:00
John MacFarlane
29e7fef729 Include missing jats test files in pandoc.cabal.
See #6961.
2020-12-18 08:02:36 -08:00
John MacFarlane
9ec3d6ee97 Use skylighting 0.10.2.
Cloess #6625.
2020-12-17 09:32:13 -08:00
John MacFarlane
914cf0b602 Fix citeproc regression with duplicate references.
- Use dev version of citeproc, which handles duplicate
  ids better, preferring the last one in the list
  and discarding the rest.
- Ensure that inline citations take priority over external
  ones.

See jgm/citeproc#36.

This restores the behavior of pandoc-citeproc.
2020-12-16 15:37:40 -08:00
John MacFarlane
b4b4e32307 Properly handle boolean values in writing YAML metadata.
(Markdown writer.)
This requires doctemplates >= 0.9.
Closes #6388.
2020-12-15 23:45:34 -08:00
John MacFarlane
2ce14997ad Require binary >= 0.7.
Needed for runGetOrFail.
2020-12-13 10:33:46 -08:00
Albert Krewinkel
ccd235e31f
LaTeX writer: extract table handling into separate module. 2020-12-12 16:48:28 +01:00
John MacFarlane
248a2a1db5 cabal: remove -Werror=missing-home-modules.
It causes problems using cabal repl.
2020-12-10 10:27:31 -08:00
John MacFarlane
1fd642dd30 Move executable to app directory.
Otherwise we have problems with cabal repl.
2020-12-10 10:08:24 -08:00
John MacFarlane
a3eb87b2ea Add sourcepos extension for commonmarke
* Add `Ext_sourcepos` constructor for `Extension`.
* Add `sourcepos` extension (only for commonmark).
* Bump to 2.11.3

With the `sourcepos` extension set set, `data-pos` attributes are added
to the AST by the commonmark reader. No other readers are affected.  The
`data-pos` attributes are put on elements that accept attributes; for
other elements, an enlosing Div or Span is added to hold the attributes.

Closes #4565.
2020-12-10 08:59:55 -08:00
John MacFarlane
0dd228593f Use latest citeproc release. 2020-12-09 09:34:15 -08:00
John MacFarlane
1489bb8414 Use skylighting 0.10.1. 2020-11-24 21:26:25 -08:00
Albert Krewinkel
41237fcc0e
HTML reader: extract table parsing into separate module 2020-11-24 14:17:35 +01:00
Albert Krewinkel
f9258371dd HTML reader: extract submodules
Reducing module size should reduce memory use during compilation.

This is preparatory work to tackle support for more table features.
2020-11-23 10:12:20 +01:00
John MacFarlane
3f278f580e Remove 'static' flag.
This isn't really necessary and can be misleading
(e.g. on macOS, where a fully static build isn't
possible). cabal's new option
`--enable-executable-static` does the same. On stack
you can add something like this to the options for your
executable in package.yaml:

    ld-options: -static -pthread
2020-11-18 21:08:24 -08:00
John MacFarlane
e17f970ed0 Use citeproc 0.2 2020-11-18 17:49:30 -08:00
John MacFarlane
46bbdad838 Don't allow macos builds with 'static' flag.
Closes #6771.
2020-11-18 15:41:48 -08:00
Albert Krewinkel
94c9028819 JATS writer: move Table handling to separate module
This makes it easier to split the module into smaller parts.
2020-11-17 09:46:30 +01:00
John MacFarlane
79907e5f17 Bump to 2.11.2 for next release (minor API change in Logging). 2020-11-15 08:34:45 -08:00
John MacFarlane
cfb017c76b Bump to 2.11.1.1 and update changelog. 2020-11-07 11:12:19 -08:00
John MacFarlane
e6abf3b8ed Use citeproc 0.1.1.1.
Closes #6813.
2020-11-05 21:23:57 -08:00
John MacFarlane
9de386352a Require latest commonmark, commonmark-extensions.
Fixes a bug with `autolink_bare_uris` and commonmark.
2020-11-05 16:58:36 -08:00
John MacFarlane
391f6e5f80 Use latest commonmark, commonmark-extensions. 2020-11-05 15:05:11 -08:00
John MacFarlane
b5e9c2a7a6 Use citeproc 0.1.1. 2020-11-04 11:15:48 -08:00
John MacFarlane
f502c8d944 Bump version to 2.11.1 and update changelog. 2020-11-02 22:20:44 -08:00
John MacFarlane
992657efaa Use latest commonmark, commonmark-extensions.
This fixes a bug with nested blocks in footnotes with the
`footnote` extension to `commonmark`.  See jgm/commonmark-hs#63.
2020-11-01 10:48:47 -08:00
John MacFarlane
f20ec6b329 Bump to 2.11.0.4. 2020-10-22 22:06:38 -07:00