XML technologies / Other markup languages / Markdown in publishing / Tools
An editor, a parser and a publishing system fulfil different tasks. Visual Studio Code is suitable for source-code-oriented editing and preview. Obsidian combines Markdown files with functions for networked knowledge, but has its own conventions. A link that works there should not be considered portable without verification. S19, S20
Pandoc is particularly suitable here as the main tool because readers, the abstract document model, filters and multiple writers can be examined individually. Quarto is a useful additional layer for scientific publications with numbered cross-references and project-wide outputs. MyST extends CommonMark with roles and directives, among other things. It would therefore be wrong to reduce all Markdown publishing requirements exclusively to Pandoc. For this comparison, however, Pandoc is helpful because the individual processing stages remain visible and reproducible. S04, S18, S21
The concrete test run of this package uses Pandoc 3.1.11.1 from the provided environment. The release notes viewed online already mention newer versions. S22
Example 50: Commands with explicit input profile
Shell / Python
The first two commands make the processor version and available extensions visible. The third command specifies with --from=gfm explicitly specifies the input profile and generates an HTML file for the pipe table. Relative paths here refer to the root directory of the unpacked package.
SOURCE
pandoc --version
pandoc --list-extensions=markdown
pandoc examples/fixtures/31.md \
--from=gfm --to=html5 \
--output=output/table.html
python scripts/build.pyACTUAL PROCESSOR OUTPUT
The Python script rebuilds the reference outputs and tests. The backslashes serve as line continuations in a POSIXshell; in PowerShell, the single Pandoc command can instead be placed on one line. The Python call remains the same. The adjacent output is a saved excerpt of the actual tool run, not a simulated console.
The reference file is additionally converted to HTML, DOCX, EPUB and DocBook written. In this package, the PDF output is generated from the DOCX output using LibreOffice. It is therefore not an independent test of a LaTeX PDF writer. The following basic commands are executed from the root directory; for complete processing, the build script still uses the required profiles, filters, and resource paths.
pandoc examples/reference.md -f markdown -t html5 \
--standalone --mathml -o output/reference.html
pandoc examples/reference.md -f markdown -t docx \
-o output/reference.docx
pandoc examples/reference.md -f markdown -t epub3 \
-o output/reference.epub
pandoc examples/reference.md -f markdown -t docbook5 \
--standalone -o output/reference.dbkFor the actual package files, the full path is python scripts/build.py the complete path. A direct invocation of the basic commands without accompanying options is not equivalent: it would, for example, handle citations, filters, or image paths incompletely. The report stores the arguments actually executed.
Pandoc can also generate PDF using suitable external engines. Which engine is appropriate depends on layout, mathematical content, font requirements, and accessibility. An HTML writer and a browser screenshot alone do not confirm print-quality output. Opening an EPUB ZIP is likewise not a complete EPUB conformance check.
For the common DOCX reference, normalized docx-tables.lua additionally the relative table widths. Without this explicit layout step, the inner table was too narrow in the local Word/PDF run. The filter does not change any cell contents or spans; the text nodes before and after its application are compared. The isolated structural tests remain separately traceable.
