Commit Graph
17613 Commits
Author SHA1 Message Date
Evan Silberman aabbda2fa2 Make the horizontal rule less whimsical 2024-09-02 11:09:10 -07:00
Evan Silberman 9821407262 Use dev doclayout, stack.yaml edition 2024-09-02 11:09:08 -07:00
Evan Silberman ec9ec839c9 Hide DocLayout's link to avoid clashes 2024-09-02 11:08:13 -07:00
Evan Silberman d09477400f Introduce ANSI writer for formatted console output
The ANSI writer (-t ansi) outputs a document formatted with ANSI control
sequences for reading on the console.

Most Pandoc elements are supported and printed in a reasonable way, if
not always ideally. This version does no detection of terminal
capabilities nor does it fall back to different output styles for
less-capable terminals.

Some gory details:

- Title blocks are formatted with modest extravagance in --standalone
  mode.
- Strong, Emph, Underline, and Strikeout spans are all formatted
  accordingly using SGR codes (which will be silently ignored by
  terminals that don't support them).
- Headings have somewhat arbitrary styles applied to them that
  probably need immediate improvement.
- Blockquotes and all flavors of list look pretty good.
- Code spans are colored magenta-on-white, which on the author's
  terminal looks kind of like the pinkish treatment of code spans used
  by many stylesheets. This probably isn't a good final decision.
- Code blocks are formatted by Skylighting's formatANSI using standard
  writer options and included directly in the output. This has some
  issues; see code comments.
- Links are printed with OSC 8 to create hyperlinks and colored cyan.
  The author's terminal automatically adds a dotted-underline to OSC 8
  hyperlinks, but only colors them differently on command-mouseover.
  Setting an underlined style on links may be more broadly accessible.
  OSC 8 support is not checked for, so on terminals not supporting it or
  with support disabled, the link text will be colored but not do
  anything and the links will not be printed.
- Images are displayed as their alt text. Support for the Kitty and
  iTerm 2 inline image protocols is planned. Supporting other terminals
  by using Chafa (https://hpjansson.org/chafa/) to print sixels etc would
  be cool too but the author would have to do some FFI stuff and it would
  add a dependency to Pandoc.
- Tables are replaced with a useless placeholder. Table output using
  box-drawing characters is desired.
- Subscripts and Superscripts are just parenthesized when accurate Unicode
  representations aren't available. Because these span types could have
  all kinds of semantics, there's not an obvious thing to do with them.
- Simple math is translated to Pandoc inlines using existing
  functionality.  An ambitious person could look into emulating the
  console-mode math output of a computer algebra system, or rendering each
  display math element as an image with TeX or Typst and including it, or
  some other thing.
2024-09-02 11:08:13 -07:00
Evan Silberman 5e5ce1fae4 Match writer.djot expected output to doclayout
For reasons not currently clear to me(!), the tip of doclayout consumes
the breaking space that is followed by nothing (i.e. the ignored raw
LaTeX inline). The tests of djoths itself still pass.
2024-09-02 11:08:13 -07:00
Evan Silberman c296c0fcfe Depend on newer dev doclayout 2024-09-02 11:08:12 -07:00
Evan Silberman 44bd58cb64 Expose formatANSI from skylighting-format-ansi
For use by the ANSI writer
2024-09-02 11:07:41 -07:00
Evan Silberman 3ca82f21b0 Hide Color type from DocLayout to avoid clash 2024-09-02 11:07:41 -07:00
Evan Silberman 1ed9692e74 Move to{Sub,Super}scriptInline to T.P.W.Shared 2024-09-02 11:07:41 -07:00
John MacFarlane 1393cda27d LaTeX reader: parse nested tabular environments.
Closes #4746.
2024-09-01 11:04:46 -07:00
John MacFarlane 4a3b002a63 HTML reader: read TeX annotation in mathml content if present.
KaTeX (and probably other tools that produce MathML from TeX)
includes an annotation tag with the original TeX; we extract this
if present instead of converting the MathML.

See #9971.
2024-09-01 10:19:41 -07:00
John MacFarlane 49e82f9a7f HTML reader: better handle KaTeX-generated math.
KaTeX emits the mathml followed by a span with an HTML fallback.
Previously pandoc was converting both.  We now ignore the HTML
fallback span, marked with class `katex-html`.

Closes #9971.
2024-08-31 10:17:00 -07:00
closeobserve 7a83cac6c3 chore: fix some comments 2024-08-29 21:23:17 -07:00
John MacFarlane 1a56865705 Markdown writer: avoid emitting markdown caption if...
...table has fallen back to raw HTML, which will then contain
a `<caption>` tag.

Closes #10094.
2024-08-29 11:15:20 -07:00
John MacFarlane a0bc3a574e RST reader: improve simple table support.
Multiline rows occur only when the *first* cell is empty; we were
previously treating lines with *any* empty cell as row continuations.

Closes #10093.

In addition, we no longer wrap multiline cells in Para if they
can be represented as Plain. This is consistent with docutils
behavior.
2024-08-29 10:41:52 -07:00
Ian Max Andolinaandiandol 54452e71fd INSTALL.md — reorganise info on static binaries and add conda-forge install options (#10098)
See #10069 -- the static linked pandoc on other OSes also
have a limitation to use binary lua packages. So added
this point at the top of the document. In addition
conda-forge is cross-platform way to install pandoc
and other tools, added to Windows, macOS and
Linux sections.

Co-authored-by: iandol <iandol@seneca.org>
2024-08-28 09:26:15 -07:00
John MacFarlane 6c4691324f AsciiDoc writer: add link: prefix when needed.
AsciiDoc requires it except for http, https, irc, mailto, ftp schemes.

Closes #10105.
2024-08-23 12:20:43 -07:00
Tristano Ajmone 494716c529 User Guide: Fix CSL Docs broken link (#10100)
In "Specifying bibliographic data," update the URL for CSL YAML/JSON
HTML-like markup: that section is no longer part of the official CSL
documentation and has been moved to the citeproc-js documentation.
2024-08-22 10:13:57 -07:00
Albert Krewinkel db3febd0f1 Org reader: refactor, cleanup parser for raw block contents. 2024-08-08 18:27:45 +02:00
Gordon Woodhull 2575490c17 typst template: move header-includes before show doc (#10070)
Closes #9996.
2024-08-08 09:18:21 -07:00
Albert Krewinkel b2755f77ba Org reader: fix parsing of src blocks with an -i flag.
Tabs are now preserved in the contents of *src* blocks if the the block
has the `-i` flag.

Fixes: #10071
2024-08-08 17:01:34 +02:00
John MacFarlane 1f093eab98 Asciidoc writer: preserve original base level.
We used to normalize so that the base level is always 1, but
asciidoc no longer seems to care about that, and the behavior
creates difficulties when we are converting fragments.

Closes #10062.
2024-08-06 20:07:27 -07:00
John MacFarlane 5967d7ae0b Use latest dev typst. 2024-08-06 19:49:58 -07:00
John MacFarlane f276f46d6a Use dev versions of typst and texmath 2024-08-06 17:08:16 -07:00
John MacFarlane 9bf112b9af LaTeX writer: preserve locator labels with --natbib.
In #9275 we made pandoc strip off locator labels (e.g. `p.`)
for natbib and biblatex output. In fact, this is only desirable
for biblatex.  natbib needs the locators to be preserved.

Closes #10057.
2024-08-06 15:16:24 -07:00
Ian Max Andolina f31c065cc1 ODT: Add TableCaption to styles.xml (#10058) 2024-08-06 10:29:15 -07:00
John MacFarlane 720aa87402 HTML writer: add data- when rendering label attribute.
Fixes #10048.
2024-08-01 08:41:00 -07:00
John MacFarlane 3d0faf6927 AsciiDoc writer: don't emit empty figure caption.
Closes #10047.
2024-08-01 08:06:45 -07:00
Kolen Cheung 0494f71e4c Document the use of luatexja
when CJKmainfont is used with lualatex
C.f. #3873
2024-07-31 08:17:17 -07:00
John MacFarlane edb9e049ca Fix asciidoc link in MANUAL. See #10039. 2024-07-30 14:46:44 -07:00
John MacFarlane a2cae348b9 VimWiki reader: remove partial functions. 2024-07-30 10:17:57 -07:00
John MacFarlane bc3eaf0724 Chunks: replace partial function tail with drop 1. 2024-07-30 09:52:56 -07:00
John MacFarlane 1aeb4a2ebe Todo comment in cabal.project. 2024-07-29 19:47:04 -07:00
Jonathan d89681179d default.latex: wrong beamer color in (sub)section page
The default.latex template defines "part title", "section title" and
"subsection title" via \setbeamertemplate. But for "section title" and
"subsection title", the beamercolorbox also used the "part title"
parameter instead of the "(sub)section title". This had the effect that
for (sub)section pages the color attributes of the part title were used.
2024-07-29 10:52:16 -07:00
John MacFarlane aa5ad5cff4 Add a citations (typst) section to the manual.
Also clarify that `citations` affects both input and output for
`org`.

See #9127.
2024-07-29 09:08:24 -07:00
John MacFarlane b8ed3718b8 Add note on --citeproc that you may need to disable citations...
extension on the output format (e.g., `-t markdown-citations`) to
see the rendered citation.

Supersedes #9127.
See #10012.
2024-07-29 09:05:31 -07:00
John MacFarlane 9a778e01cc Revert "Bump tls version in stack.yaml."
This reverts commit ad69e03dd4.

crypton-connection isn't compatible with the latest tls.
pandoc-lua-engine-0.3.1 pandoc-cli-3.3 pandoc-server-0.1.0.7 3.3
2024-07-28 16:52:12 -07:00
John MacFarlane 1a4f7726ed Update AUTHORS.md 2024-07-28 14:18:42 -07:00
John MacFarlane ad69e03dd4 Bump tls version in stack.yaml. 2024-07-28 14:16:19 -07:00
John MacFarlane 092af7ff5d Update MANUAL date and man pages. 2024-07-28 14:13:20 -07:00
John MacFarlane cb605bb7bf Bump pandoc-server to 0.1.0.7, depend on latest pandoc 2024-07-28 13:46:42 -07:00
John MacFarlane ac98a22bee Bump pandoc version in pandoc-lua-engine. 2024-07-28 13:45:13 -07:00
John MacFarlane 7200b2bbfc Bump pandoc-lua-engine version to 0.3.1, depend on it in pandoc-cli 2024-07-28 13:44:12 -07:00
John MacFarlane ab94daf416 Bump to 3.3, update changelog 2024-07-28 13:41:56 -07:00
John MacFarlane d34430e1e5 Use released typst 0.5.0.5. 2024-07-28 13:34:12 -07:00
John MacFarlane 7bc4f60789 Update FAQ for converting a directory of files in Windows.
Use fullname rather than name (#5429 comment).
2024-07-28 09:13:56 -07:00
John MacFarlane d299328022 Allow --number-sections to take an optional true|false argument.
This was omitted when we allowed this for other boolean flags.
2024-07-27 21:01:00 -07:00
John MacFarlane 6c43c03398 Docx writer: fix regression with nested lists.
Closes #9994.  The bug affects e.g. ordered lists with bullet
sublists; after the sublist the top-level list reverts to bullets
instead of being properly numbered.

This regression was introduced in version 3.2.1 and was caused by
commit f5531f1.
2024-07-27 21:01:00 -07:00
John MacFarlane 9cdc99cb7d RTF reader: handle \*\shppict without dropping image.
Closes #10025.
2024-07-27 21:01:00 -07:00
Albert Krewinkel 2f36df65e6 MANUAL: fix copyright years 2024-07-19 14:40:30 +02:00