Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pandoc-cli for openSUSE:Factory checked in at 2026-06-10 16:10:50 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pandoc-cli (Old) and /work/SRC/openSUSE:Factory/.pandoc-cli.new.2375 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pandoc-cli" Wed Jun 10 16:10:50 2026 rev:25 rq:1358484 version:3.10 Changes: -------- --- /work/SRC/openSUSE:Factory/pandoc-cli/pandoc-cli.changes 2025-12-05 16:56:55.957127402 +0100 +++ /work/SRC/openSUSE:Factory/.pandoc-cli.new.2375/pandoc-cli.changes 2026-06-10 16:16:17.538251272 +0200 @@ -1,0 +2,6 @@ +Thu Jun 4 15:01:08 UTC 2026 - Peter Simons <[email protected]> + +- Update pandoc-cli to version 3.10. + Upstream does not provide a change log file. + +------------------------------------------------------------------- Old: ---- pandoc-cli-3.8.3.tar.gz New: ---- pandoc-cli-3.10.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pandoc-cli.spec ++++++ --- /var/tmp/diff_new_pack.AYA4Yp/_old 2026-06-10 16:16:19.266322885 +0200 +++ /var/tmp/diff_new_pack.AYA4Yp/_new 2026-06-10 16:16:19.270323051 +0200 @@ -1,7 +1,7 @@ # # spec file for package pandoc-cli # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2026 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: pandoc-cli -Version: 3.8.3 +Version: 3.10 Release: 0 Summary: Conversion between documentation formats License: GPL-2.0-or-later ++++++ pandoc-cli-3.8.3.tar.gz -> pandoc-cli-3.10.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-cli-3.8.3/lua/PandocCLI/Lua.hs new/pandoc-cli-3.10/lua/PandocCLI/Lua.hs --- old/pandoc-cli-3.8.3/lua/PandocCLI/Lua.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-cli-3.10/lua/PandocCLI/Lua.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {- | Module : PandocCLI.Lua @@ -9,8 +10,8 @@ -} module PandocCLI.Lua (runLuaInterpreter, getEngine) where +#ifdef REPL import Control.Monad ((<=<)) -import HsLua.CLI (EnvBehavior (..), Settings (..), runStandalone) import System.Environment (lookupEnv) import System.IO.Temp (withSystemTempFile) import System.IO (hClose) @@ -18,6 +19,12 @@ import Text.Pandoc.Error (handleError) import Text.Pandoc.Lua (runLua, runLuaNoEnv, getEngine) import Text.Pandoc.Version (pandocVersionText) +import HsLua.CLI (EnvBehavior (..), Settings (..), runStandalone) +#else +import Text.Pandoc.Lua (getEngine) +import System.IO (stderr, hPutStrLn) +import System.Exit (exitWith, ExitCode(..)) +#endif -- | Runs pandoc as a Lua interpreter that is (mostly) compatible with -- the default @lua@ program shipping with Lua. @@ -28,6 +35,7 @@ runLuaInterpreter :: String -- ^ Program name -> [String] -- ^ Command line arguments -> IO () +#ifdef REPL runLuaInterpreter progName args = do -- We need some kind of temp mbhistfile <- lookupEnv "PANDOC_REPL_HISTORY" @@ -54,3 +62,8 @@ IgnoreEnvVars -> runLuaNoEnv ConsultEnvVars -> runLua in handleError <=< runIOorExplode . runLua' +#else +runLuaInterpreter _ _ = do + hPutStrLn stderr "Pandoc not compiled with Lua interpreter support." + exitWith $ ExitFailure 4 +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-cli-3.8.3/man/pandoc-lua.1 new/pandoc-cli-3.10/man/pandoc-lua.1 --- old/pandoc-cli-3.8.3/man/pandoc-lua.1 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-cli-3.10/man/pandoc-lua.1 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,8 @@ -.\" Automatically generated by Pandoc 3.8.3 +.\" Automatically generated by Pandoc 3.10 .\" -.TH "pandoc-lua" "1" "September 22, 2022" "pandoc 3.8.3" "Pandoc User\[cq]s Guide" +.TH "pandoc-lua" "1" "September 22, 2022" "pandoc 3.10" "Pandoc User\[cq]s Guide" +.SH NAME +pandoc\-lua \- Lua interface to pandoc API .SH SYNOPSIS \f[CR]pandoc\-lua\f[R] [\f[I]options\f[R]] [\f[I]script\f[R] [\f[I]args\f[R]]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-cli-3.8.3/man/pandoc-server.1 new/pandoc-cli-3.10/man/pandoc-server.1 --- old/pandoc-cli-3.8.3/man/pandoc-server.1 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-cli-3.10/man/pandoc-server.1 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,8 @@ -.\" Automatically generated by Pandoc 3.8.3 +.\" Automatically generated by Pandoc 3.10 .\" -.TH "pandoc-server" "1" "August 15, 2022" "pandoc 3.8.3" "Pandoc User\[cq]s Guide" +.TH "pandoc-server" "1" "August 15, 2022" "pandoc 3.10" "Pandoc User\[cq]s Guide" +.SH NAME +pandoc\-server \- web server exposing pandoc API .SH SYNOPSIS \f[CR]pandoc\-server\f[R] [\f[I]options\f[R]] .SH DESCRIPTION @@ -132,6 +134,10 @@ List of strings to be regarded as abbreviations when parsing Markdown. See \f[CR]\-\-abbreviations\f[R] in \f[CR]pandoc(1)\f[R] for details. .TP +\f[CR]typst\-inputs\f[R] (JSON map) +Inputs to be provided to the typst evaluator. +See \f[CR]\-\-typst\-input\f[R] in \f[CR]pandoc(1)\f[R] for details. +.TP \f[CR]standalone\f[R] (boolean, default false) If true, causes a standalone document to be produced, using the default template or the custom template specified using \f[CR]template\f[R]. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-cli-3.8.3/man/pandoc.1 new/pandoc-cli-3.10/man/pandoc.1 --- old/pandoc-cli-3.8.3/man/pandoc.1 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-cli-3.10/man/pandoc.1 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ -.\" Automatically generated by Pandoc 3.8.3 +.\" Automatically generated by Pandoc 3.10 .\" -.TH "pandoc" "1" "2025\-12\-01" "pandoc 3.8.3" "Pandoc User\[cq]s Guide" +.TH "pandoc" "1" "2026\-06\-03" "pandoc 3.10" "Pandoc User\[cq]s Guide" .SH NAME pandoc - general markup converter .SH SYNOPSIS @@ -337,7 +337,7 @@ .IP \(bu 2 \f[CR]bbcode_phpbb\f[R] BBCode (phpBB) .IP \(bu 2 -\f[CR]bbcode_steam\f[R] BBCode (Hubzilla) +\f[CR]bbcode_steam\f[R] BBCode (Steam) .IP \(bu 2 \f[CR]bbcode_hubzilla\f[R] BBCode (Hubzilla) .IP \(bu 2 @@ -515,14 +515,15 @@ .TP \f[CR]\-d\f[R] \f[I]FILE\f[R], \f[CR]\-\-defaults=\f[R]\f[I]FILE\f[R] Specify a set of default option settings. -\f[I]FILE\f[R] is a YAML file whose fields correspond to command\-line -option settings. +\f[I]FILE\f[R] is a YAML or JSON file whose fields correspond to +command\-line option settings. All options for document conversion, including input and output files, can be set using a defaults file. The file will be searched for first in the working directory, and then in the \f[CR]defaults\f[R] subdirectory of the user data directory (see \f[CR]\-\-data\-dir\f[R]). -The \f[CR].yaml\f[R] extension may be omitted. +The \f[CR].yaml\f[R] extension will be added if \f[I]FILE\f[R] lacs an +extension. See the section Defaults files for more information on the file format. Settings from the defaults file may be overridden or extended by subsequent options on the command line. @@ -538,6 +539,26 @@ .EE .RE .TP +\f[CR]\-\-sandbox[=true|false]\f[R] +Run pandoc in a sandbox, limiting IO operations in readers and writers +to reading the files specified on the command line. +Note that this option does not limit IO operations by filters or in the +production of PDF documents. +But it does offer security against, for example, disclosure of files +through the use of \f[CR]include\f[R] directives. +Anyone using pandoc on untrusted user input should use this option. +.RS +.PP +Note: some readers and writers (e.g., \f[CR]docx\f[R]) need access to +data files. +If these are stored on the file system, then pandoc will not be able to +find them when run in \f[CR]\-\-sandbox\f[R] mode and will raise an +error. +For these applications, we recommend using a pandoc binary compiled with +the \f[CR]embed_data_files\f[R] option, which causes the data files to +be baked into the binary instead of being stored on the file system. +.RE +.TP \f[CR]\-\-verbose\f[R] Give verbose debugging output. .TP @@ -761,7 +782,7 @@ the affected paragraph break. This option only affects the docx reader. .TP -\f[CR]\-\-extract\-media=\f[R]\f[I]DIR\f[R] +\f[CR]\-\-extract\-media=\f[R]\f[I]DIR\f[R]|\f[I]FILE\f[R]\f[CR].zip\f[R] Extract images and other media contained in or linked from the source document to the path \f[I]DIR\f[R], creating it if necessary, and adjust the images references in the document so they point to the extracted @@ -771,6 +792,11 @@ The original file paths are used if they are relative paths not containing \f[CR]..\f[R]. Otherwise filenames are constructed from the SHA1 hash of the contents. +.RS +.PP +If the path given ends in \f[CR].zip\f[R], then instead of creating a +directory, pandoc will create a zip archive containing the media files. +.RE .TP \f[CR]\-\-abbreviations=\f[R]\f[I]FILE\f[R] Specifies a custom abbreviations file, with abbreviations one to a line. @@ -785,6 +811,14 @@ LaTeX. The strings may not contain spaces. .TP +\f[CR]\-\-typst\-input=\f[R]\f[I]KEY\f[R][\f[CR]=\f[R]\f[I]VAL\f[R]] +Set a parameter value that will be made available to the typst parser in +\f[CR]sys.inputs\f[R], like \f[CR]\-\-input\f[R] in the \f[CR]typst\f[R] +CLI. +Either \f[CR]:\f[R] or \f[CR]=\f[R] may be used to separate +\f[I]KEY\f[R] from \f[I]VAL\f[R]. +Values containing spaces must be quoted. +.TP \f[CR]\-\-trace[=true|false]\f[R] Print diagnostic output tracing parser progress to stderr. This option is intended for use by developers in diagnosing performance @@ -829,11 +863,11 @@ added to the list. If it already has another kind of value, it will be made into a list containing the previous and the new value. -For example, \f[CR]\-V keyword=Joe \-V author=Sue\f[R] makes +For example, \f[CR]\-V author=Joe \-V author=Sue\f[R] makes \f[CR]author\f[R] contain a list of strings: \f[CR]Joe\f[R] and \f[CR]Sue\f[R]. .TP -\f[CR]\-\-variable\-json=\f[R]\f[I]KEY\f[R][\f[CR]=\f[R]:\f[I]JSON\f[R]] +\f[CR]\-\-variable\-json=\f[R]\f[I]KEY\f[R][\f[CR]=\f[R]\f[I]JSON\f[R]] Set the template variable \f[I]KEY\f[R] to the value specified by a JSON string (this may be a boolean, a string, a list, or a mapping; a number will be treated as a string). @@ -845,26 +879,6 @@ \f[I]KEY\f[R] from \f[I]VAL\f[R]. If the variable already has a value, this value will be replaced. .TP -\f[CR]\-\-sandbox[=true|false]\f[R] -Run pandoc in a sandbox, limiting IO operations in readers and writers -to reading the files specified on the command line. -Note that this option does not limit IO operations by filters or in the -production of PDF documents. -But it does offer security against, for example, disclosure of files -through the use of \f[CR]include\f[R] directives. -Anyone using pandoc on untrusted user input should use this option. -.RS -.PP -Note: some readers and writers (e.g., \f[CR]docx\f[R]) need access to -data files. -If these are stored on the file system, then pandoc will not be able to -find them when run in \f[CR]\-\-sandbox\f[R] mode and will raise an -error. -For these applications, we recommend using a pandoc binary compiled with -the \f[CR]embed_data_files\f[R] option, which causes the data files to -be baked into the binary instead of being stored on the file system. -.RE -.TP \f[CR]\-D\f[R] \f[I]FORMAT\f[R], \f[CR]\-\-print\-default\-template=\f[R]\f[I]FORMAT\f[R] Print the system default template for an output \f[I]FORMAT\f[R]. (See \f[CR]\-t\f[R] for a list of possible \f[I]FORMAT\f[R]s.) @@ -934,13 +948,10 @@ .RS .PP Note that if you are producing a PDF via \f[CR]ms\f[R] and using (the -default) \f[CR]pdfroff\f[R] as a \f[CR]\-\-pdf\-engine\f[R], the table -of contents will appear at the beginning of the document, before the -title. -If you would prefer it to be at the end of the document, use the option -\f[CR]\-\-pdf\-engine\-opt=\-\-no\-toc\-relocation\f[R]. -If \f[CR]groff\f[R] is used as the \f[CR]\-\-pdf\-engine\f[R], the table -of contents will always appear at the end of the document. +default) \f[CR]groff\f[R] as a \f[CR]\-\-pdf\-engine\f[R], the table of +contents will appear at the end of the document. +If you would prefer it to be at the beginning of the document, before +the title, you can use \f[CR]\-\-pdf\-engine=pdfroff\f[R]. .RE .TP \f[CR]\-\-toc\-depth=\f[R]\f[I]NUMBER\f[R] @@ -969,28 +980,21 @@ This does not apply to HTML comments inside raw HTML blocks when the \f[CR]markdown_in_html_blocks\f[R] extension is not set. .TP -\f[CR]\-\-syntax\-highlighting=\(dqdefault\(dq|\(dqnone\(dq|\(dqidiomatic\(dq|\f[R]\f[I]STYLE\f[R]\f[CR]|\f[R]\f[I]FILE\f[R] +\f[CR]\-\-syntax\-highlighting=default|none|idiomatic|\f[R]\f[I]STYLE\f[R]\f[CR]|\f[R]\f[I]FILE\f[R] The method to use for code syntax highlighting. Setting a specific \f[I]STYLE\f[R] causes highlighting to be performed with the internal highlighting engine, using KDE syntax definitions and styles. -The \f[CR]\(dqidiomatic\(dq\f[R] method uses a format\-specific -highlighter if one is available, or the default style if the target -format has no idiomatic highlighting method. +The \f[CR]idiomatic\f[R] method uses a format\-specific highlighter if +one is available, or the default style if the target format has no +idiomatic highlighting method. Setting this option to \f[CR]none\f[R] disables all syntax highlighting. -The \f[CR]\(dqdefault\(dq\f[R] method uses a format\-specific default. +The \f[CR]default\f[R] method uses a format\-specific default. .RS .PP The default for HTML, EPUB, Docx, Ms, Man, and LaTeX output is to use -the internal highlighter with the default style; Typst output relies on -Typst\(cqs own syntax highlighting system by default. -.PP -The \f[CR]listings\f[R] LaTeX package is used for idiomatic highlighting -in LaTeX. -The package does not support multi\-byte encoding for source code. -To handle UTF\-8 you would need to use a custom template. -This issue is fully documented here: Encoding issue with the listings -package. +the internal highlighter with the default style; for Typst it is to use +Typst\(cqs own syntax highlighting system. .PP Style options are \f[CR]pygments\f[R] (the default), \f[CR]kate\f[R], \f[CR]monochrome\f[R], \f[CR]breezeDark\f[R], \f[CR]espresso\f[R], @@ -1349,8 +1353,8 @@ To produce a custom \f[CR]reference.docx\f[R], first get a copy of the default \f[CR]reference.docx\f[R]: \f[CR]pandoc \-o custom\-reference.docx \-\-print\-default\-data\-file reference.docx\f[R]. -Then open \f[CR]custom\-reference.docx\f[R] in Word, modify the styles -as you wish, and save the file. +Then open \f[CR]custom\-reference.docx\f[R] in Word or LibreOffice, +modify the styles as you wish, and save the file. For best results, do not make changes to this file other than modifying the styles used by pandoc: .PP @@ -1515,7 +1519,7 @@ (padded with leading 0s to 3 digits), \f[CR]%s\f[R] with the section number of the chunk, \f[CR]%h\f[R] with the heading text (with formatting removed), \f[CR]%i\f[R] with the section identifier. -For example, \f[CR]%section\-%s\-%i.html\f[R] might be resolved to +For example, \f[CR]section\-%s\-%i.html\f[R] might be resolved to \f[CR]section\-1.1\-introduction.html\f[R]. The characters \f[CR]/\f[R] and \f[CR]\(rs\f[R] are not allowed in chunk templates and will be ignored. @@ -1640,7 +1644,7 @@ print\-css.rocks for a good introduction to PDF generation from HTML/CSS) .IP \(bu 2 -\f[CR]\-t ms\f[R]: \f[CR]pdfroff\f[R] +\f[CR]\-t ms\f[R]: \f[CR]groff\f[R] .IP \(bu 2 \f[CR]\-t typst\f[R]: \f[CR]typst\f[R] .PP @@ -1867,7 +1871,9 @@ .RE .SH DEFAULTS FILES The \f[CR]\-\-defaults\f[R] option may be used to specify a package of -options, in the form of a YAML file. +options, in the form of a YAML or JSON file. +Examples in this section will be given in YAML, but the equivalent forms +in JSON will also work. .PP Fields that are omitted will just have their regular default values. So a defaults file can be as simple as one line: @@ -1876,6 +1882,12 @@ verbosity\f[B]:\f[R] INFO .EE .PP +or in JSON: +.IP +.EX +{ \(dqverbosity\(dq: \(dqINFO\(dq } +.EE +.PP In fields that expect a file path (or list of file paths), the following syntax may be used to interpolate environment variables: .IP @@ -2025,6 +2037,9 @@ \-\-abbreviations abbrevs.txt abbreviations: abbrevs.txt + \-\-typst\-input foo=bar typst\-inputs: + foo: bar + \-\-trace trace: true .EE @@ -2058,7 +2073,7 @@ \-\-dpi 300 dpi: 300 - \-\-wrap 60 wrap: 60 + \-\-wrap preserve wrap: \(dqpreserve\(dq \-\-columns 72 columns: 72 @@ -2907,6 +2922,12 @@ \f[CR]title\-slide\-attributes\f[R] additional attributes for the title slide of reveal.js slide shows. See background in reveal.js, beamer, and pptx for an example. +.TP +\f[CR]highlightjs\-theme\f[R] +highlight.js theme for code highlighting when using +\f[CR]\-\-syntax\-highlighting=idiomatic\f[R] with reveal.js (defaults +to \f[CR]monokai\f[R]). +See the highlight.js demo page for available themes. .PP All reveal.js configuration options are available as variables. To turn off boolean flags that default to true in reveal.js, use @@ -2929,6 +2950,9 @@ \f[CR]logo\f[R] logo image for slides .TP +\f[CR]logooptions\f[R] +options for logo image (e.g., \f[CR]width\f[R], \f[CR]height\f[R]) +.TP \f[CR]navigation\f[R] controls navigation symbols (default is \f[CR]empty\f[R] for no navigation symbols; other valid values are \f[CR]frame\f[R], @@ -2947,7 +2971,8 @@ image for title slide: can be a list .TP \f[CR]titlegraphicoptions\f[R] -options for title slide image +options for title slide image (e.g., \f[CR]width\f[R], +\f[CR]height\f[R]) .TP \f[CR]shorttitle\f[R], \f[CR]shortsubtitle\f[R], \f[CR]shortauthor\f[R], \f[CR]shortinstitute\f[R], \f[CR]shortdate\f[R] some beamer themes use short versions of the title, subtitle, author, @@ -3257,6 +3282,23 @@ .RS See the section on reproducible builds. .RE +.TP +\f[CR]pdfstandard\f[R] +PDF standard(s) for the document, e.g.\ \f[CR]ua\-2\f[R], +\f[CR]a\-4f\f[R]. +Supports PDF/A, PDF/X, and PDF/UA variants. +Requires LuaLaTeX and LaTeX 2023+. +Repeat for multiple standards: +.RS +.IP +.EX +\-\-\- +pdfstandard: +\- ua\-2 +\- a\-4f +\&... +.EE +.RE .SS Variables for ConTeXt Pandoc uses these variables when creating a PDF with ConTeXt. .TP @@ -3601,13 +3643,13 @@ .TP input formats \f[CR]markdown\f[R], \f[CR]latex\f[R], \f[CR]rst\f[R], -\f[CR]mediawiki\f[R], \f[CR]textile\f[R] +\f[CR]mediawiki\f[R], \f[CR]textile\f[R], \f[CR]man\f[R] .TP output formats \f[CR]markdown\f[R], \f[CR]muse\f[R] .TP enabled by default in -\f[CR]markdown\f[R], \f[CR]muse\f[R] +\f[CR]markdown\f[R], \f[CR]muse\f[R], \f[CR]man\f[R] .PP The default algorithm used to derive the identifier from the heading text is: @@ -4583,21 +4625,21 @@ two spaces. .PP A term may have multiple definitions, and each definition may consist of -one or more block elements (paragraph, code block, list, etc.), each -indented four spaces or one tab stop. -The body of the definition (not including the first line) should be -indented four spaces. -However, as with other Markdown lists, you can \(lqlazily\(rq omit -indentation except at the beginning of a paragraph or other block -element: +one or more indented block elements (paragraph, code block, list, etc.). +The blocks in the definition shoud be indented to the column of the +first non\-space content after the \f[CR]:\f[R] or \f[CR]\(ti\f[R] +marker, or (if the \f[CR]four_space_rule\f[R] extension is enabled) four +spaces or one tab stop. +As with other Markdown lists, you can \(lqlazily\(rq omit indentation in +paragraph continuation lines: .IP .EX Term 1 -: Definition +: Definition with lazy continuation. - Second paragraph of the definition. + Second paragraph of the definition. .EE .PP If you leave space before the definition (as in the example above), the @@ -5106,6 +5148,7 @@ The initial line \f[CR]\-\-\-\f[R] must not be followed by a blank line. A YAML metadata block may occur anywhere in the document, but if it is not at the beginning, it must be preceded by a blank line. +(Note that JSON may be used as well, because JSON is a subset of YAML.) .PP Note that, because of the way pandoc concatenates input files when several are provided, you may also keep the metadata in a separate YAML @@ -5235,10 +5278,11 @@ \(ga\(ga\(ga .EE .PP -Note: the \f[CR]yaml_metadata_block\f[R] extension works with -\f[CR]commonmark\f[R] as well as \f[CR]markdown\f[R] (and it is enabled -by default in \f[CR]gfm\f[R] and \f[CR]commonmark_x\f[R]). -However, in these formats the following restrictions apply: +Note: the \f[CR]yaml_metadata_block\f[R] extension works not just with +\f[CR]markdown\f[R] but with \f[CR]commonmark\f[R] (and it is enabled by +default in \f[CR]gfm\f[R] and \f[CR]commonmark_x\f[R]). +However, in \f[CR]commonmark\f[R], \f[CR]gfm\f[R], and +\f[CR]commonmark_x\f[R], the following restrictions apply: .IP \(bu 2 The YAML metadata block must occur at the beginning of the document (and there can be only one). @@ -5743,6 +5787,12 @@ in square brackets. (There cannot be space between the two unless the \f[CR]spaced_reference_links\f[R] extension is enabled.) +If the label is empty (\f[CR][]\f[R]), then it will be implicitly be +taken to be the same as the link text; thus \f[CR][foo][]\f[R] is +equivalent to \f[CR][foo][foo]\f[R]. +(If the \f[CR]shortcut_reference_links\f[R] extension is enabled, the +empty \f[CR][]\f[R] may be omitted.) +.PP The link definition consists of the bracketed label, followed by a colon and a space, followed by the URL, and optionally (after a space) a link title either in quotes or in parentheses. @@ -5750,16 +5800,22 @@ \f[CR]citations\f[R] extension is enabled): citations take precedence over link labels. .PP -Here are some examples: +Here are some examples of reference links and link definitions; .IP .EX -[my label 1]: /foo/bar.html \(dqMy title, optional\(dq -[my label 2]: /foo -[my label 3]: https://fsf.org (The Free Software Foundation) -[my label 4]: /bar#special \(aqA title in single quotes\(aq +See [the website *I* built][my website]. + +See [my website][] and [the bar page][1] and +the [home page of the FSF][fsf]. + +[my website]: http://foo.bar.baz +[1]: /foo/bar.html \(dqMy title, optional\(dq +[fsf]: https://fsf.org (The Free Software Foundation) +[special page]: /bar#special \(aqA title in single quotes\(aq .EE .PP -The URL may optionally be surrounded by angle brackets: +The URL in a link definition may optionally be surrounded by angle +brackets: .IP .EX [my label 5]: <http://foo.bar.baz> @@ -5781,21 +5837,13 @@ [Foo]: /bar/baz .EE .PP -In an \f[I]implicit\f[R] reference link, the second pair of brackets is -empty: -.IP -.EX -See [my website][]. - -[my website]: http://foo.bar.baz -.EE +The link definition may come either before or after a reference link +that uses the label. .PP -Note: In \f[CR]Markdown.pl\f[R] and most other Markdown implementations, -reference link definitions cannot occur in nested constructions such as -list items or block quotes. +Note: In some Markdown implementations, reference link definitions +cannot occur in nested constructions such as list items or block quotes. Pandoc lifts this arbitrary\-seeming restriction. -So the following is fine in pandoc, though not in most other -implementations: +So the following is fine in pandoc, though not in all implementations: .IP .EX > My block [quote]. @@ -6174,6 +6222,20 @@ citations will not. For this reason, it is sometimes preferable to use the author\-in\-text style inside notes when using a note style. +.PP +Many CSL styles will format citations differently when the same source +has been cited earlier. +In documents with chapters, it is usually desirable to reset this +position information at the beginning of every chapter. +To do this, add the class \f[CR]reset\-citation\-positions\f[R] to the +heading for each chapter: +.IP +.EX +# The Beginning {.reset\-citation\-positions} +.EE +.PP +Note that this class only has an effect when placed on top\-level +headings; it is ignored in nested blocks. .SS Non\-default extensions The following Markdown syntax extensions are not enabled by default in pandoc, but may be enabled by adding \f[CR]+EXTENSION\f[R] to the format @@ -6355,9 +6417,6 @@ > [!TIP] > Helpful advice for doing things better or more easily. .EE -.PP -Note: This extension currently only works with commonmark: -\f[CR]commonmark\f[R], \f[CR]gfm\f[R], \f[CR]commonmark_x\f[R]. .SS Extension: \f[CR]autolink_bare_uris\f[R] Makes all absolute URIs into links, even when not surrounded by pointy braces \f[CR]<...>\f[R]. @@ -7150,6 +7209,25 @@ .PP Notes are not yet supported for other slide formats, but the notes will not appear on the slides themselves. +.SS Speaker notes on the title slide (PowerPoint) +For PowerPoint output, the title slide is generated from the +document\(cqs YAML metadata block. +To add speaker notes to this slide, use a \f[CR]notes\f[R] field in the +metadata: +.IP +.EX +\-\-\- +title: My Presentation +author: Jane Doe +notes: | + Welcome everyone to this presentation. + + Remember to introduce yourself and mention the key topics. +\-\-\- +.EE +.PP +The \f[CR]notes\f[R] field can contain multiple paragraphs and Markdown +formatting. .SS Columns To put material in side by side columns, you can use a native div container with class \f[CR]columns\f[R], containing two or more div @@ -7353,8 +7431,11 @@ \f[CR]GTIN\-13\f[R], \f[CR]UPC\f[R], \f[CR]ISMN\-10\f[R], \f[CR]DOI\f[R], \f[CR]LCCN\f[R], \f[CR]GTIN\-14\f[R], \f[CR]ISBN\-13\f[R], \f[CR]Legal deposit number\f[R], \f[CR]URN\f[R], -\f[CR]OCLC\f[R], \f[CR]ISMN\-13\f[R], \f[CR]ISBN\-A\f[R], \f[CR]JP\f[R], -\f[CR]OLCC\f[R]. +\f[CR]OCLC number\f[R], \f[CR]Co\-publisher\(cqs ISBN\-13\f[R], +\f[CR]ISMN\-13\f[R], \f[CR]ISBN\-A\f[R], \f[CR]JP e\-code\f[R], +\f[CR]OLCC number\f[R], \f[CR]JP Magazine ID\f[R], \f[CR]UPC\-12+5\f[R], +\f[CR]BNF Control number\f[R], \f[CR]ISSN\-13\f[R], \f[CR]ARK\f[R], +\f[CR]Digital file internal version number\f[R]. .TP \f[CR]title\f[R] Either a string value, or an object with fields \f[CR]file\-as\f[R] and @@ -7858,6 +7939,29 @@ Byte\-Order Mark (BOM). .PP To disable highlighting, use \f[CR]\-\-syntax\-highlighting=none\f[R]. +.PP +To use a format\(cqs idiomatic syntax highlighting instead of +pandoc\(cqs built\-in highlighting, use +\f[CR]\-\-syntax\-highlighting=idiomatic\f[R]. +Currently, \f[CR]idiomatic\f[R] only affects the following formats: +.IP \(bu 2 +In reveal.js, it causes reveal.js\(cqs highlighting plugin to be used +for source code highlighting. +The style may be customized by setting the \f[CR]highlightjs\-theme\f[R] +variable. +.IP \(bu 2 +In Typst, it causes Typst\(cqs built\-in highlighting to be used. +(This is also the default for Typst.) +.IP \(bu 2 +In LaTeX, it causes the \f[CR]listings\f[R] package to be used. +Note that \f[CR]listings\f[R] does not support multi\-byte encoding for +source code. +To handle UTF\-8 you would need to use a custom template. +This issue is fully documented here: Encoding issue with the listings +package. +.IP \(bu 2 +In other formats, \f[CR]idiomatic\f[R] will have the same result as +\f[CR]default\f[R]. .SH CUSTOM STYLES Custom styles can be used in the docx, odt and ICML formats. .SS Output @@ -7913,6 +8017,16 @@ .PP For docx or odt output, you don\(cqt need to enable any extensions for custom styles to work. +.PP +For icml output, you can also set an \f[CR]object\-style\f[R] in images: +.IP +.EX +{object\-style=\(dqfixedSizeImage\(dq} +.EE +.PP +In InDesign you\(cqll see that object style given to the image, and +you\(cqll be able to customize it, or load its definition from a +template of yours. .SS Input The docx reader, by default, only reads those styles that it can convert into pandoc elements, either by direct conversion or interpreting the @@ -8036,10 +8150,10 @@ to add semantic information to the document. .PP Pandoc defaults to LaTeX to generate PDF. -Tagging support in LaTeX is in development and not readily available, so -PDFs generated in this way will always be untagged and not accessible. -This means that alternative engines must be used to generate accessible -PDFs. +LaTeX\(cqs \f[CR]\(rsDocumentMetadata\f[R] interface supports PDF +standards and tagging when using LuaLaTeX; set the +\f[CR]pdfstandard\f[R] variable to enable this (see below). +For older LaTeX installations, alternative engines must be used. .PP The PDF standards PDF/A and PDF/UA define further restrictions intended to optimize PDFs for archiving and accessibility. @@ -8050,6 +8164,28 @@ including the colorspace of embedded images. Pandoc cannot check this, and external programs must be used to ensure that generated PDFs are in compliance. +.SS LaTeX +Set the \f[CR]pdfstandard\f[R] variable to produce tagged PDFs +conforming to PDF/A, PDF/X, or PDF/UA standards. +For example: +.IP +.EX +pandoc \-V pdfstandard=ua\-2 \-\-pdf\-engine=lualatex doc.md \-o doc.pdf +.EE +.PP +Multiple standards can be combined: +.IP +.EX +\-\-\- +pdfstandard: + \- ua\-2 + \- a\-4f +\-\-\- +.EE +.PP +The required PDF version is inferred automatically. +This feature requires LuaLaTeX in TeX Live 2025 with LaTeX kernel +2025\-06\-01 or newer. .SS ConTeXt ConTeXt always produces tagged PDFs, but the quality depends on the input. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-cli-3.8.3/pandoc-cli.cabal new/pandoc-cli-3.10/pandoc-cli.cabal --- old/pandoc-cli-3.8.3/pandoc-cli.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-cli-3.10/pandoc-cli.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ cabal-version: 2.4 name: pandoc-cli -version: 3.8.3 +version: 3.10 build-type: Simple license: GPL-2.0-or-later license-file: COPYING.md @@ -14,7 +14,6 @@ synopsis: Conversion between documentation formats description: Pandoc-cli provides a command-line executable that uses the pandoc library to convert between markup formats. --- data-files: extra-source-files: man/pandoc.1 man/pandoc-lua.1 @@ -32,6 +31,10 @@ Description: Include support for running pandoc as an HTTP server. Default: True +flag repl + Description: Include support for running a pandoc Lua repl. + Default: True + flag nightly Description: Add '-nightly-COMPILEDATE' to the output of '--version'. Default: False @@ -39,7 +42,7 @@ common common-options default-language: Haskell2010 other-extensions: OverloadedStrings - build-depends: base >= 4.12 && < 5 + build-depends: base >= 4.18 && < 5 ghc-options: -Wall -fno-warn-unused-do-bind -Wincomplete-record-updates -Wnoncanonical-monad-instances @@ -49,31 +52,36 @@ -Wpartial-fields -Wmissing-signatures -fhide-source-paths - - if impl(ghc >= 8.10) - ghc-options: -Wunused-packages - - if impl(ghc >= 9.0) - ghc-options: -Winvalid-haddock + -Wunused-packages + -Winvalid-haddock if os(windows) cpp-options: -D_WINDOWS common common-executable import: common-options - ghc-options: -rtsopts -with-rtsopts=-A8m -threaded + ghc-options: -rtsopts -with-rtsopts=-A8m executable pandoc import: common-executable - hs-source-dirs: src main-is: pandoc.hs + hs-source-dirs: src buildable: True -- Note: we always link to an exact version of pandoc, with the -- same version as this package: - build-depends: pandoc == 3.8.3, - text + build-depends: pandoc == 3.10, text other-modules: PandocCLI.Lua , PandocCLI.Server + + if arch(wasm32) + hs-source-dirs: wasm + other-modules: PandocWasm + cpp-options: -DINCLUDE_WASM + build-depends: aeson, containers, bytestring, skylighting, filepath, pandoc-lua-engine + ghc-options: -optl-Wl,--export=__wasm_call_ctors,--export=hs_init_with_rtsopts,--export=malloc,--export=convert,--export=query + else + ghc-options: -threaded + if flag(nightly) cpp-options: -DNIGHTLY build-depends: template-haskell, @@ -88,9 +96,12 @@ hs-source-dirs: no-server if flag(lua) - build-depends: hslua-cli >= 1.4.1 && < 1.5, - pandoc-lua-engine >= 0.5 && < 0.6, - temporary >= 1.1 && < 1.4 + build-depends: pandoc-lua-engine >= 0.5.1 && < 0.6 hs-source-dirs: lua else hs-source-dirs: no-lua + + if flag(repl) + build-depends: hslua-cli >= 1.4.1 && < 1.5, + temporary >= 1.1 && < 1.4 + cpp-options: -DREPL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-cli-3.8.3/src/pandoc.hs new/pandoc-cli-3.10/src/pandoc.hs --- old/pandoc-cli-3.8.3/src/pandoc.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/pandoc-cli-3.10/src/pandoc.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,5 +1,7 @@ {-# LANGUAGE CPP #-} +{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} + {- | Module : Main Copyright : Copyright (C) 2006-2024 John MacFarlane @@ -23,11 +25,13 @@ import PandocCLI.Server import Text.Pandoc.Scripting (ScriptingEngine(..)) import qualified Data.Text as T - #ifdef NIGHTLY import qualified Language.Haskell.TH as TH import Data.Time #endif +#ifdef INCLUDE_WASM +import PandocWasm() +#endif #ifdef NIGHTLY versionSuffix :: String diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pandoc-cli-3.8.3/wasm/PandocWasm.hs new/pandoc-cli-3.10/wasm/PandocWasm.hs --- old/pandoc-cli-3.8.3/wasm/PandocWasm.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/pandoc-cli-3.10/wasm/PandocWasm.hs 2001-09-09 03:46:40.000000000 +0200 @@ -0,0 +1,171 @@ +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE OverloadedStrings #-} + +{- | + Module : Main + Copyright : Copyright (C) 2006-2024 John MacFarlane + License : GNU GPL, version 2 or above + + Maintainer : John MacFarlane <jgm@berkeley@edu> + Stability : alpha + Portability : portable + +Exposes wasm functions to convert documents and get information +from pandoc. +-} +module PandocWasm where +import qualified Data.Map as M +import qualified Control.Exception as E +import Data.List (sort) +import Data.Maybe (fromMaybe) +import Text.Pandoc.App ( convertWithOpts, Opt(..), defaultOpts ) +import Text.Pandoc (Verbosity(ERROR), pandocVersion, Reader, Writer, PandocIO, + readers, writers, runIO, setUserDataDir) +import Text.Pandoc.Highlighting (highlightingStyles) +import Text.Pandoc.Templates (getDefaultTemplate) +import Skylighting (defaultSyntaxMap, Syntax(..)) +import Text.Pandoc.Extensions (extensionsToList, extensionEnabled, getAllExtensions, + getDefaultExtensions) +import Text.Pandoc.Error +import Text.Pandoc.Scripting (ScriptingEngine(..), customTemplate) +import System.FilePath (splitExtension) +import PandocCLI.Lua +import Control.Exception +import Foreign +import Foreign.C +import Data.Aeson as Aeson +import qualified Text.Pandoc.UTF8 as UTF8 +import qualified Data.ByteString.Lazy as BL +import qualified Data.Text as T +import Data.Version (showVersion) + +foreign export ccall "convert" convert :: Ptr CChar -> Int -> IO () + +-- | Do a pandoc conversion. The parameters are a pointer and length +-- for a C string containing JSON-encoded pandoc options (isomorphic +-- to a defaults file). The calling program should set up a virtual +-- file system containing @/stdin@ (input), @/stdout@ (output), and +-- @/warnings@ (output). @/stdin@ can be used to pass input to pandoc. +convert :: Ptr CChar -> Int -> IO () +convert ptr len = + E.catch act (\(err :: SomeException) -> + writeFile "/stderr" ("ERROR: " <> displayException err)) + where + act = do + args <- getCString ptr len + engine <- getEngine + let aesonRes = Aeson.eitherDecode (UTF8.fromStringLazy args) + case aesonRes of + Left e -> error e + Right (f :: Opt -> Opt) -> do + let opts = f defaultOpts + let opts' = opts{ optInputFiles = + Just $ fromMaybe ["/stdin"] (optInputFiles opts) + , optOutputFile = + Just $ fromMaybe "/stdout" (optOutputFile opts) + , optLogFile = + Just $ fromMaybe "/warnings" (optLogFile opts) + , optVerbosity = ERROR -- only show errors to stderr + } + convertWithOpts engine opts' + +foreign export ccall "query" query :: Ptr CChar -> Int -> IO () + +-- | Retrieve information from pandoc. The parameters are a pointer +-- and length for a C string containing a JSON-encoded query. +-- The calling program should set up a virtual file system containing +-- @/stdout@, which will be used to hold the output, and @/stderr@, +-- which will be used to hold any error messages. +-- The following queries can be used: +-- * @{"query":"version"}@ returns the pandoc version as a JSON-encoded +-- string. +-- * @{"query:"input-formats"}@ returns a JSON list of supported input +-- formats. +-- * @{"query:"output-formats"}@ returns a JSON list of supported output +-- formats. +-- * @{"query:"highlight-languages"}@ returns a JSON list of languages +-- for which syntax highlighting is defined. +-- * @{"query:"highlight-styles"}@ returns a JSON list of defined syntax +-- highlighting styles. +-- * @{"query":"default-template","format": FORMAT}@ returns +-- the default template for the format as a JSON-encoded string. +-- * @{"query":"extensions-for-format","format": FORMAT}@ returns +-- an object mapping extension names to true or false for all the +-- extensions relevant for the format. +query :: Ptr CChar -> Int -> IO () +query ptr len = + E.catch act (\(err :: SomeException) -> + writeFile "/stderr" ("ERROR: " <> displayException err)) + where + jsonOut :: forall a . ToJSON a => a -> IO () + jsonOut = BL.writeFile "/stdout" . Aeson.encode + act = do + args <- getCString ptr len + case Aeson.eitherDecode (UTF8.fromStringLazy args) of + Left e -> error e + Right PandocVersion -> jsonOut $ showVersion pandocVersion + Right HighlightStyles -> jsonOut $ map fst highlightingStyles + Right HighlightLanguages -> jsonOut $ sort $ + [ T.toLower (sShortname s) + | s <- M.elems defaultSyntaxMap + , sShortname s `notElem` ["Alert", "Alert_indent"] + ] + Right (DefaultTemplate format) -> do + templ <- runIO $ + case splitExtension (T.unpack format) of + (_, "") -> do + -- built-in format + setUserDataDir Nothing + getDefaultTemplate format + _ -> do + -- format looks like a filepath => custom writer + engine <- getEngine + components <- engineLoadCustom engine (T.unpack format) + case customTemplate components of + Just t -> pure t + Nothing -> E.throw $ PandocNoTemplateError format + case templ of + Right t + | T.null t -> -- e.g. for docx, odt, json: + E.throwIO $ PandocCouldNotFindDataFileError $ T.pack + ("templates/default." ++ T.unpack format) + | otherwise -> jsonOut t + Left e -> E.throwIO e + Right InputFormats -> jsonOut readersNames + Right OutputFormats -> jsonOut writersNames + Right (ExtensionsForFormat format) -> do + let allExts = getAllExtensions format + let defExts = getDefaultExtensions format + let addExt x = M.insert (drop 4 (show x)) + (extensionEnabled x defExts) + jsonOut $ foldr addExt mempty (extensionsToList allExts) + readersNames = sort (map fst (readers :: [(T.Text, Reader PandocIO)])) + writersNames = sort + ("pdf" : map fst (writers :: [(T.Text, Writer PandocIO)])) + + +data Query = + PandocVersion + | InputFormats + | OutputFormats + | HighlightLanguages + | HighlightStyles + | ExtensionsForFormat T.Text + | DefaultTemplate T.Text + deriving (Show) + +instance FromJSON Query where + parseJSON = withObject "Query" $ \o -> do + queryType <- o .: "query" + case queryType of + "version" -> pure PandocVersion + "input-formats" -> pure InputFormats + "output-formats" -> pure OutputFormats + "highlight-languages" -> pure HighlightLanguages + "highlight-styles" -> pure HighlightStyles + "default-template" -> DefaultTemplate <$> o .: "format" + "extensions-for-format" -> ExtensionsForFormat <$> o .: "format" + _ -> fail $ "Unknown query type " <> queryType + +getCString :: Ptr CChar -> Int -> IO String +getCString ptr len = peekCStringLen (ptr, len) <* free ptr
