Commit Graph
15543 Commits
Author SHA1 Message Date
John MacFarlane e90ce8e1ab Unescape characters in \lstinline inside \passthrough.
For full motivation, see #1629 ; this improves on
99e24cf183.

Closes #8179.
2022-07-18 19:52:33 +02:00
Albert Krewinkel dfbfbfbf24 Parsing.GridTable: remove use of unsafe function last 2022-07-18 12:14:54 +02:00
Benjamin Wuethrich 7999b0b96e Fix links in manual (#8188)
* Fix link to slide shows section
* Fix link to reveal.js section
2022-07-18 10:16:36 +02:00
John MacFarlane 98fb8521a7 RST writer: Fix missing spaces with nested inlines.
Previously spaces around links inside italics were omitted.

Closes #8182.
2022-07-16 15:49:45 +02:00
Albert Krewinkel c724e9cb7c Require pandoc-lua-marshal 0.1.7
Adds a `clone` methods to Pandoc objects and allows to pass Blocks in
instead of full Caption elements.
2022-07-16 15:29:18 +02:00
Albert Krewinkel daef24f022 Lua: extend pandoc.system module. (#8184)
The module now has the additional functions `list_directory`,
`make_directory`, and `remove_directory`. This makes it easier to write
cross-platform scripts that need to inspect or modify the file system.
2022-07-15 21:22:33 +02:00
John MacFarlane 7119fee963 lua-filters.md: Add link to @wlupton's logging.lua.
Closes #8146.
2022-07-15 21:18:21 +02:00
Albert Krewinkel 12cc140272 Lua: add fields pandoc.readers and pandoc.writers. (#8177)
The set of supported input and output formats is made available to Lua
users.
2022-07-12 20:14:42 +02:00
John MacFarlane c7f5fd2400 RST writer: always escape literal backslash.
Previously we didn't escape it when it is word-internal,
but that seems wrong.  See #8178.
2022-07-12 20:11:05 +02:00
Albert Krewinkel 405a31c3fd CI: remove cabal command prefix.
This was required for older cabal-install versions, but these are no
longer supported.
2022-07-12 14:25:50 +02:00
John MacFarlane c950a28191 ms template: redefine rather than removing .CH macro.
This responds to feedback in #8175.
2022-07-12 00:03:51 +02:00
John MacFarlane cf57a8344a Fix roff ms syntax highlighting definitions.
Begin each string definition with `\&`.
Closes #8175. Thanks to Branden Robinson.
2022-07-11 23:58:13 +02:00
John MacFarlane 05ab2060d6 ms writer: add comment in preamble stating generator. 2022-07-11 23:40:45 +02:00
John MacFarlane 9d256aa19b Use latest dev citeproc 2022-07-11 23:40:13 +02:00
Ivan Panchenko 6ae91045a2 Fix mistakes in the User’s Guide (#8173) 2022-07-11 11:08:10 +02:00
John MacFarlane 56051c8ac3 RTF reader: support \nosupersub.
Closes #8170.
2022-07-07 22:56:29 +02:00
Elliot Bobrow 7fdc01ac0d Use formatCode from #7525 in HTML and MediaWiki (#8162)
Move formatting from inside inline code elements to the outside in order
to retain formatting.
2022-07-06 22:10:24 +02:00
John MacFarlane befa9d1301 Ensure that Nulls are ignored in creating slide shows.
Also ensure that Nulls are ignored in sectionification
by `makeSections`.

Closes #8155.
2022-07-04 14:34:14 +02:00
John MacFarlane f2f9c896ee Add FAQ on preventing column widths in pipe tables.
See #8139.
2022-07-04 13:35:12 +02:00
John MacFarlane 5df94da831 Remove Muse reader round-trip tests.
These are nondeterministic and have repeatedly failed
on strange edge cases.

The Muse reader's maintainer has not been active, and
it isn't worth developer time to chase down these problems.
2022-07-03 01:19:40 +02:00
Sukil Etxenike 227b21e0cb Document math support in PowerPoint (#8161)
In the manual, there is an indication that Math is rendered in all output formats, yet there is no mention of PowerPoint below, when specifying how it is rendered.
2022-07-03 01:02:04 +02:00
John MacFarlane 3571352a0a Use citeproc 0.8. 2022-07-01 12:12:58 +02:00
Masataka Ogawa 6c31cae68b Update filter.md Noto Sans CJK TC -> JP (#8153)
Noto Sans CJK TC, that is suggested as a character set that contains Japanese characters, may not be suitable to properly display Japanese characters. Rather, Noto Sans CJK JP is much more recommendable for that purpose.

Although some characters originated from China are quite similar among countries/regions, most of them have evolved into different shapes in Mainland China, Hong Kong, Taiwan, Japan, Korea, and Vietnam. Therefore, it is best to use a character set that the language of the country/region uses for the readability/recongnizability sake. See also [an webpage that discusses the glyph appearance issue in Chinese, Japanese, Korean, and Vietnamese languages](https://heistak.github.io/your-code-displays-japanese-wrong/).

[README of Noto CJK](https://github.com/googlefonts/noto-cjk/blob/main/README.md) may be also good resource to know which font should be used to display characters of each language.
2022-06-30 14:48:45 +02:00
John MacFarlane c1ccbc553f PDF: use sha1 hash of filename when converting svg.
The previous code threw away the directory component of
the filename in constructing a new one. This led to
surprising results if you had e.g. `foo/pic.svg` and `bar/pic.svg`;
in the final PDF they'd be the same image, because the latter
would overwrite the former in the temp directory.
2022-06-24 17:52:39 -07:00
Albert Krewinkel 41af476a3d JATS template: mark authors with cor-id as corresponding authors
Corresponding authors are marked by setting the attribute
`corresp="yes"` in their respective `<contrib>` element.
2022-06-24 15:44:38 +02:00
Albert Krewinkel 6d351df1ed Lua: ensure that tables marshaled via JSON arrays behave like Lists.
This allows to invoke methods like `map` and `includes` on lists like
`PANDOC_WRITER_OPTIONS.extensions`.
2022-06-23 22:53:11 +02:00
black-desk 2abf56f508 Remove extra soft break for tasklist (#8142)
Browser will display the extra newline character between checkbox and
text as a space, which make tasklist items cannot be aligned.

I just remove it.
2022-06-23 09:59:11 -07:00
John MacFarlane 3876f15b45 Ensure that metadata values w/o trailing newlines are...
parsed as inlines, as the manual states.

Previously, they were parsed as inlines if they would
otherwise have been a single Plain or Para, but otherwise
left unchanged.  This led to some quirky results (e.g. #8143).
We now use the general function `blocksToInlines` from T.P.Shared.
2022-06-22 23:09:51 -07:00
John MacFarlane e0dea96d6c Improve documentation of horizontal rules and YAML metadata.
Horizontal rules should have blank space after them, or
pandoc may interpret them as beginning a YAML metadata
block or table.

Closes #8140.
2022-06-22 10:22:46 -07:00
Castedo Ellerman e7269beeb6 Follow JATS4R recommendation and PudMed Central (#8041)
Using the default jats template of pandoc 2.18, the https://jats4r.org/jats4r-validator/ warns: "The license URI is given in `@xlink:href`. For JATS 1.1d3 and later, if the license is defined by a canonical URI, then it should be specified in the `<ali:license_ref>` child element."

I can confirm that what JATS4R recommends here is consistent with the JATS article packages found on the FTP site for the
PubMed Central Open Access Subset <https://www.ncbi.nlm.nih.gov/pmc/tools/openftlist/> (at least with the eLife article I looked at).

This proposed change follows the JATS4R recommendation and an example eLife article on the PubMed Central FTP site.
2022-06-22 10:17:24 -07:00
John MacFarlane 8fc370bcec Document docx writer's use of Source Code style. 2022-06-21 12:33:15 -07:00
Albert Krewinkel f49bee5c31 ConTeXt writer: support complex table structures. (#8116)
The following table feature are now supported in ConTeXt:

- colspans,
- rowspans,
- multiple bodies,
- row headers, and
- multi-row table head and foot.

The wrapping `placetable` environment is also given a `reference` option
with the table identifier, enabling referencing of the table from within
the document.
2022-06-21 10:22:34 -07:00
Gabriel Lewertowski ab712246f0 Update fonts MIME following IANA recommendation (#8127) 2022-06-21 10:21:34 -07:00
Elliot Bobrow f317ec41a1 LaTeX: Handle formatted text inside code inline (#8129)
Add `formatCode` function to Text.Pandoc.Shared [API change].

Use this in the LaTeX reader so that e.g.
`\texttt{\textbf{bold code}}` is parsed as `Strong [Code ("",[],[]) "bold code"]`.
2022-06-20 12:18:05 -07:00
Georgi Lyubenov a21d6e9fa6 Future compat against liftA2 export from Prelude (#8132) 2022-06-19 12:36:21 -07:00
Amir Dekel 5fe154deb2 Org reader: Fix Post / Pre mixup when setting emphasis chars (#8134) 2022-06-19 19:52:56 +02:00
Albert Krewinkel f39eeba35f Lua: do not reset foreign encoding before running Lua
This was a leftover from previous hslua versions that relied heavily on
`Foreign.C.withCString` and the like. However, hslua 2 and later use
bytestring functions to retrieve string values, so this is no longer
needed.
2022-06-19 14:33:33 +02:00
Albert Krewinkel 0f573a5368 Require hslua-2.2.1, unless lua53 flag is set.
This fixes a problem where the encoding used for Lua filenames would
sometimes mismatch the encoding used by the OS. The file wasn't found
when that happened, for example with an umlaut-containing filename on
Windows. The change ensures that all characters of available in the
default locale can be used in the filename.
2022-06-19 14:30:27 +02:00
Albert Krewinkel a4a0a47a91 Allow aeson 2.1 (#8130) 2022-06-16 11:34:52 -06:00
Albert Krewinkel 37fc412daa doc/lua-filters.html: add list of common pitfalls
A list with common filtering and Lua pitfalls is added to the
"debugging" section.

Closes: #6077
2022-06-16 17:40:33 +02:00
Albert Krewinkel 0bd8a0e3d1 CI: test with latest GHC minor versions 2022-06-16 12:14:55 +02:00
John MacFarlane 2cc93c87c1 MANUAL: add note to --sandbox about embed_data_files.
See #8128.
2022-06-15 16:07:27 -06:00
John MacFarlane a6344893b0 Use dev version of citeproc. 2022-06-15 10:52:26 -06:00
John MacFarlane 786a2d4757 Update default.csl from the latest chicago-author-date.csl. 2022-06-14 20:42:49 -06:00
Elliot Bobrow 6ff4972ca9 add --embed-resources flag (#8121)
* Add `--embed-resources` flag for `--self-contained` without implying
  `--standalone`
* Deprecate `--self-contained flag`

Closes #7331
2022-06-14 17:00:18 -06:00
Bastien Dumont 7244821705 Make clear that walk performs a deep copy (#8124)
Relevant discussion here: https://groups.google.com/g/pandoc-discuss/c/-NoL3Ft9AC8

I felt that it could be useful to inform that walk is the only way to get a deep copy of a List. I wrote this where I think that users will likely loop up for this feature, but it may be out of place.
2022-06-14 16:14:19 -06:00
John MacFarlane b263f38304 LaTeX reader: improve mathEnvWith.
When converting e.g. an align environment to an aligned environment
inside a Math element, we need to include a newline before the
`\end{aligned}`, since the previous line might end in a comment.

Closes #8122.
2022-06-13 23:14:51 -06:00
John MacFarlane 54b20e5733 Use ghc 9.2.3 for linux builds. 2022-06-10 11:13:22 -07:00
Wentao Han 8197ae00b8 LaTeX writer: Extend list of book documentclasses (#8053) 2022-06-10 08:42:14 -07:00
John MacFarlane 30d802fe38 MANUAL: note that custom readers/writers will...
be sought in the readers/writers subdirectory of
the user data directory if not found relative to
the working directory.

Documents #8112.
2022-06-10 08:40:27 -07:00