Commit graph

15176 commits

Author SHA1 Message Date
John MacFarlane
52b78b10c8 Avoid putting a frame around speaker notes in beamer.
If speaker notes (a Div with class 'notes') occur right
after a section heading, but above slide level, the
resulting `\note{..}` caommand should not be wrapped in
a frame, as that will cause a spurious blank slide.

Closes #7857.
2022-01-20 19:09:44 -08:00
John MacFarlane
6361d43e53 MANUAL: add that speaker notes can be used with beamer.
Closes #7856.
2022-01-20 18:48:14 -08:00
John MacFarlane
ef8135b4a7 HTML writer: don't break lines inside code elements.
With the new (default) line wrapping of HTML, in
conjunction with the default CSS which includes
`code { whitespace: pre-wrap; }`, spurious line
breaks could be introduced into inline code.

Closes #7858.
2022-01-20 09:17:34 -08:00
John MacFarlane
d9ec95e7ab Modify stringify so it ignores [Citation] inside Cite.
Otherwise we'll sometimes get two copies of things, one
from the `citationPrefix` or `citationSuffix` and another
from the embedded fallback text.

When there is no fallback text, we'll get no content.
However, it really isn't an alternative to just rely
on the result of running `query` on the embedded `Citation`s;
this will result in a jumble of text rather than anything
structured.

Closes #7855.
2022-01-19 22:06:06 -08:00
John MacFarlane
89c8f2866e Use skylighting 0.12.2. 2022-01-19 15:44:27 -08:00
John MacFarlane
d5818413ff Docx reader: parse both zotero citation and bibliography...
as FieldInfo.
2022-01-19 10:31:00 -08:00
John MacFarlane
73fe7c129e Docx reader: add skeleton for parsing zotero ADDINs.
So far this just adds a constructor for FieldInfo;
we'll need to adjust the rest of the reader code to
parse the JSON and do something with it.

See #7840.
2022-01-19 10:20:15 -08:00
John MacFarlane
6723891c72 Markdown writer: handle explicit column widths with pipe tables.
If a table has explicit column width information *and* the
content extends beyond the `--columns` width, we need to
adjust the widths of the pipe separators to encode this width
information.

Closes #7847.
2022-01-19 09:36:48 -08:00
Albert Krewinkel
b794b534a5
Remove unused file test/command/jats.csl 2022-01-19 10:12:32 +01:00
Michael Hoffmann
e146b1ff3b
Docx writer: Separate tables even with RawBlocks between (#7844)
Adjacent docx tables need to be separated by an empty paragraph. If
there's a RawBlock between tables which renders to nothing, be sure to
still insert the empty paragraph so that they will not collapse
together.

Fixes #7724
2022-01-18 14:28:28 -08:00
Even Brenden
6b7a688695
Add pandoc-lua-marshal to Nix shell (#7849) 2022-01-18 14:17:04 -08:00
John MacFarlane
13a1e1b54c Add note about api docs to RELEASE_CHECKLIST. 2022-01-17 21:47:16 -08:00
John MacFarlane
d2a9562554 Omit --enable-doc in the cabal haddock invocation.
tools/build-and-upload-api-docs.sh.  I'm not sure what
this was supposed to do but it seems undocumented.
2022-01-17 21:03:25 -08:00
John MacFarlane
c1717378b0 Fix some haddock errors. 2022-01-17 21:03:25 -08:00
John MacFarlane
545c0911aa T.P.App.Opt: fix logic bug in fullDefaultsPath.
Previously we would (also) search the default user data directory
for a defaults file, even if a different user data directory
was specified using `--data-dir`.  This was a mistake; if
`--data-dir` is used, the default user data directory should
not be searched.
2022-01-17 21:03:25 -08:00
John MacFarlane
a92ae0a58a T.P.Shared.defaultUserDataDir: behavior change.
If the XDG data directory is not defined (e.g. because
it's not supported in the OS or HOME isn't defined), we
return the empty string instead of raising an exception.

Closes #7842.
2022-01-17 21:03:25 -08:00
John MacFarlane
5811baf80f Update build-and-upload-api-docs.sh.
Using the template at https://hackage.haskell.org/upload

It still fails because of a missing doc-index.json for Glob?
2022-01-17 21:03:25 -08:00
Albert Krewinkel
7f50324ff9
PDF: support pagedjs-cli as pdf engine (#7838)
PagedJS is a polyfill and supports the Paged Media standards by the W3C.
<https://www.pagedjs.org/>
2022-01-17 09:19:03 -08:00
John MacFarlane
41476092ff Add DS_Store to .gitignore. 2022-01-16 12:11:03 -08:00
Nikolai Korobeinikov
b683b8d48a
Support checklists in asciidoctor writer (#7832)
The checklist syntax (similar to `task_list` in markdown) seems to be
an asciidoctor-only addition.

Co-authored-by: ricnorr <ricnorr@yandex-tream.ru>
2022-01-16 11:05:19 -08:00
John MacFarlane
1e48297304 Fix pattern syntax in sample readability custom reader. 2022-01-16 11:02:03 -08:00
John MacFarlane
039c7e925a Minor edits to new custom reader example. 2022-01-16 10:44:26 -08:00
John MacFarlane
1be49f11f7 doc/custom-readers.lua: add example for "readable HTML." 2022-01-16 10:41:04 -08:00
Mauro Bieg
9e60142cc9
CSS in HTML template: adjust #TOC and h1 on mobile (#7835) 2022-01-16 09:22:43 -08:00
John MacFarlane
7b8f8ceffe Fix message in man page about where code can be found. 2022-01-15 13:03:02 -08:00
John MacFarlane
6c378e65ab Regenerate man page. 2022-01-15 12:58:31 -08:00
John MacFarlane
c6cf78a033 Improve on fix to #7506.
Don't boldface code in output formats that can represent
it as monospace.

Define aliases for VI, VB, VBI as well.
2022-01-15 12:57:26 -08:00
John MacFarlane
f5d720ae79 Regenerate man page with new method for verbatim. 2022-01-15 12:41:46 -08:00
John MacFarlane
c40727bfbb Man writer: use custom font V for inline code.
The V font is defined conditionally, so that it renders
like CB in output formats that support that, and like B
in those that don't (e.g. the terminal).

We could just redefine C, but this would affect code
blocks, too, and putting them all in boldface looks ugly,
I think.

Possible drawback: fragments created by pandoc's man
writer will presuppose a nonstandard V font.

Closes #7506.
Supersedes 253467a549.
2022-01-15 12:39:19 -08:00
John MacFarlane
a1cfe04a26 MANUAL: fix formatting of some occurrences of 'pandoc'. 2022-01-15 12:09:51 -08:00
John MacFarlane
253467a549 Man writer: Use boldface for inline code.
Closes #7506.

This also allows us to get rid of some special casing
on definition lists that ensured that options in code
spans would be boldface.  (If this change is ever reverted,
we'll need that again.)
2022-01-15 12:07:18 -08:00
John MacFarlane
4214218256 T.P.Readers.LaTeX.Parsing: don't export totoks.
Make the first param of `tokenize` a SourcePos instead of
SourceName, and use it instead of `totoks`.
2022-01-14 21:27:33 -08:00
John MacFarlane
55cc9040cb Update man page. 2022-01-14 10:36:59 -08:00
John MacFarlane
20c4bc3261 Bump to 2.17.0.1, update changelog. 2022-01-14 10:36:33 -08:00
John MacFarlane
0856eb3d1d Add FAQ on images in ipynb containers.
Closes #7749.
2022-01-14 10:21:29 -08:00
John MacFarlane
7f4907b2ce Use commonmark-pandoc 0.2.1.2.
Fixes #7769.
2022-01-14 10:07:06 -08:00
John MacFarlane
a8be26b43d Add pandoc-lua-marshal-0.1.3.1 to stack.yaml 2022-01-14 10:07:01 -08:00
Albert Krewinkel
96db10c8d7 Require pandoc-lua-marshal 0.1.3.1
Fixes a problem with `List.includes` and `List.find` that caused a Lua
stackoverflow and subsequent program crash.

Fixes: #7831
2022-01-14 11:05:19 +01:00
Kolen Cheung
ed2ab2e2b0
HTML template: load header-includes before math (#7833)
MathJax expect the config comes before loading the MathJax script.
This change of order allows one to config MathJax via header-includes,
which loads before the MathJax script.

This potentially is a breaking change.

However, the only kind math supported by pandoc that is configurable
seems to be katex, and according to src/Text/Pandoc/Writers/HTML.hs
the way it is configured is hard-coded (katex doesn't seem to offer
MathJax style config that is independent of loading katex.)
So it seems it is safe to change this order without breaking
others' documents.

c.f. #2750
2022-01-13 20:31:32 -08:00
John MacFarlane
0d1ba3dce3 When reading defaults file, stop at a line ....
This line signals the end of a YAML document.
This restores the behavior we got with HsYaml.
yaml complains about content past this line.
See https://github.com/jgm/pandoc/issues/4627#issuecomment-1012438765
2022-01-13 11:58:33 -08:00
John MacFarlane
09b773e1ad Use ghc4pandoc 9.0.2 image for faster linux builds. 2022-01-13 08:43:40 -08:00
John MacFarlane
e532bceb8a Add test for #7826 notes-after-punctuation. 2022-01-13 08:41:05 -08:00
John MacFarlane
a9f6ed2f97 Fix 'make trypandoc' target. 2022-01-12 22:33:56 -08:00
John MacFarlane
4fdbb30a97 Citeproc: allow notes-after-punctuation to work...
with numerical styles that use superscripts (e.g.
american-medical-association.csl), as well as with
note styles. The default setting of `notes-after-punctuation`
is true for note styles and false otherwise.

This restores a behavior of pandoc-citeproc that wasn't properly
carried over to Citeproc.

Closes #7826.
See also jgm/pandoc-citeproc#384.
2022-01-12 21:08:28 -08:00
John MacFarlane
fcbd016423 Changelog formatting. 2022-01-12 18:57:33 -08:00
John MacFarlane
dc34c734f7 Changelog formatting fix. 2022-01-12 18:52:01 -08:00
John MacFarlane
d8deb8b6c3 Fix typo in changelog. 2022-01-12 18:46:29 -08:00
John MacFarlane
1c2bf24476 Fix typo in changelog. 2022-01-12 18:44:07 -08:00
John MacFarlane
c0584bc699 Use ghc4pandoc 8.10.7 docker image for linux builds.
9.2.1 still fails without special treatment.
2022-01-12 18:01:42 -08:00
John MacFarlane
d3e99421b0 Use ghc 9.2.1 docker image for deb pkg. 2022-01-12 17:43:15 -08:00