Commit graph

14078 commits

Author SHA1 Message Date
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
John MacFarlane
327e1428c5 gfm/commonmark writer: implement start number on ordered lists.
Previously they always started at 1, but according to the spec
the start number is respected. Closes #7009.
2021-01-07 16:42:05 -08:00
John MacFarlane
c0d8b186d1 T.P.Parsing: modify gridTableWith' for headerless tables.
If the table lacks a header, the header row should be an empty
list. Previously we got a list of empty cells, which caused
an empty header to be emitted instead of no header.  In LaTeX/PDF
output that meant we got a double top line with space between.

@tarleb @despres - please let me know if this is problematic
for some reason I'm not grasping.
2021-01-07 11:07:03 -08:00
John MacFarlane
533b2edd51 Remove \setupthinrules from default context template.
The width parameter this used is not actually supported,
and the command didn't do anything.
2021-01-06 14:39:44 -08:00
John MacFarlane
15ba184e6e HTML writer: fix implicit_figure at end of footnotes.
Closes #7006.
2021-01-05 12:07:02 -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
ea479bf28a LaTeX reader: handle filecontents environment.
Closes #7003.
2021-01-04 14:05:03 -08:00
John MacFarlane
1ce7db1fa6 EPUB writer: adjust internal links to identifiers...
defined in raw HTML sections after splitting into
chapters.

Closes #7000.
2021-01-04 11:38:18 -08:00
John MacFarlane
f04e02d8d5 EPUB writer: recognize Format "html4", Format "html5" as raw HTML. 2021-01-03 11:35:36 -08:00
John MacFarlane
21ee2d80c2 EPUB writer: adjust internal links to images, links, and tables...
after splitting into chapters. Previously we only did this for
Div and Span and Header elements.  See #7000.
2021-01-03 11:27:01 -08:00
Dimitri Sabadie
57b1094152
Org reader: mark verbatim code with class "verbatim". (#6998)
* Replace org-mode’s verbatim from code to codeWith.

This adds the `"verbatim"` class so that exporters can apply a specific
style on it. For instance, it will be possible for HTML to add a CSS
rule for code + verbatim class.

* Alter test for org-mode’s verbatim change.

See previous commit for further detail on the new implementation.
2021-01-03 08:57:47 +01:00
John MacFarlane
260aaaacc6 LaTeX reader: put contents of unknown environments in a Div...
when `raw_tex` is not enabled. (When `raw_tex` is enabled,
the whole environment is parsed as a raw block.)
The class name is the name of the environment.
Previously, we just included the contents without the
surrounding Div, but having a record of the environment's
boundaries and name can be useful.

Closes #6997.
2021-01-02 08:19:00 -08:00
John MacFarlane
9a18cf4b59 LaTeX writer: revert table line height increase in 2.11.3.
In 2.11.3 we started adding `\addlinespace`, which produced less
dense tables.  This wasn't an intentional change; I misunderstood
a comment in the discussion leading up to the change. This commit
restores the earlier default table appearance.

Note that if you want a less dense table, you can use something like
`\def\arraystretch{1.5}` in your header.

Closes #6996.
2021-01-02 07:56:07 -08:00
Albert Krewinkel
17e3efc785
Org reader: restructure output of captioned code blocks
The Div wrapper of code blocks with captions now has the class
"captioned-content". The caption itself is added as a Plain block
inside a Div of class "caption". This makes it easier to write filters
which match on captioned code blocks. Existing filters will need to be
updated.

Closes: #6977
2021-01-01 11:18:36 +01:00
John MacFarlane
23f964b907 Mediawiki reader: allow space around storng/emph delimiters.
Closes #6993.
2020-12-30 21:31:28 -08:00
John MacFarlane
0782d5882c Undo the "Use fromRight" hlint hint. 2020-12-30 16:04:09 -08:00
John MacFarlane
419190213a Hlint fixes 2020-12-30 15:38:48 -08:00
John MacFarlane
ee7cef7624 Update ms table tests. 2020-12-30 13:40:11 -08:00
John MacFarlane
49286a25df Ms writer: don't justify inside table cells. 2020-12-30 13:36:18 -08:00
John MacFarlane
ee03d86a5d MANUAL: Document use of citations in note styles.
See #6828.
2020-12-30 10:42:24 -08:00
John MacFarlane
dcbd8d326c CircleCI: fix stack installation.
homebrew no longer has a bottle for haskell-stack for the
old macOS version we're building on.
2020-12-29 15:41:18 -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
3cd21c5f6e Improve fix to #6983.
If we have a paragraph then a bookmarkEnd, we don't need to
insert the empty paragraph (and in fact it alters the spacing).

Closes #6983.
2020-12-29 08:44:43 -08:00
John MacFarlane
55f9b59af1 Docx writer: fix nested tables with captions.
Previously we got unreadable content, because docx seems
to want a `<w:p>` element (even an empty one) at the end of
every table cell.  Closes #6983.
2020-12-28 14:41:28 -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
053db934de Use latest citeproc release. 2020-12-28 12:09:28 -08:00
Albert Krewinkel
e837ed772e
HTML reader: use renderTags' from Text.Pandoc.Shared.
The `renderTags'` function was duplicated when the reader used `Text` as
its string type. The duplication is no longer necessary.

A side effect of this change is that empty `<col>` elements are written
as self-closing tags in raw HTML blocks.
2020-12-28 14:48:55 +01:00
Albert Krewinkel
8f8536abb7
MANUAL: note that textarea content is never parsed as Markdown. 2020-12-28 14:34:48 +01:00
John MacFarlane
99e1b67b74 Use meta-description instead of description in templates.
Since this is an attribute value, we need to prepare it
in the writer.
2020-12-27 23:19:14 -08:00
Jerry Sky
528b67df59
templates: added the description metatag to both html4 and html5 templates (#6982)
The `description` meta tag will make the generated HTML documents more complete and SEO-friendly.
2020-12-27 23:02:28 -08:00
John MacFarlane
19d4e43605 Require texmath 0.12.1. 2020-12-27 22:57:14 -08:00
timo-a
668596cc89
Add support for writing nested tables to asciidoc (#6972)
Added field to WriterState that denotes the current nesting level for traversing tables.
Depending on the value of that field nested tables are recognized and written.
Asciidoc supports one level of nesting. If deeper tables are to be written, they are
omitted and a warning is issued.
2020-12-27 18:42:28 -08:00