The problem.
The following markdown with YAML header
---
author:
- Albert Krewinkel
- John MacFarlane
date: 'January 10, 2020'
title: |
A New Approach:
Pandoc Lua Filters
---
# Introduction
Pandoc has long supported filters, which allow the pandoc
abstract syntax tree (AST) to be manipulated between the parsing and the writing phase.
should ideally yield a multi-line title, or else at least a single-line title, as it does (for example) in LaTeX PDF output and reStructuredText output.
However, when the output format is ms, pandoc generates the following (some preamble omitted):
[...]
.\" ***************************************************************
.\" PDF metadata
.pdfinfo /Title "A New Approach: Pandoc Lua Filters"
.pdfinfo /Author "Albert Krewinkel; John MacFarlane"
.hy
.TL
.LP
A New Approach: Pandoc Lua Filters
.AU
Albert Krewinkel
.AU
John MacFarlane
.AU
.sp 0.5
.ft R
January 10, 2020
.\" 1 column (use .2C for two column)
.1C
.SH 1
Introduction
.pdfhref O 1 "Introduction"
.pdfhref M "introduction"
.LP
Pandoc has long supported filters, which allow the pandoc abstract
syntax tree (AST) to be manipulated between the parsing and the writing
phase.
.pdfsync
The inclusion of a .LP command here "within" the title breaks the output when the code is compiled to a pdf using pdfroff (called from within pandoc or separately).
Instead, there should be a .bp command between each of the title YAML elements.
Pandoc commandpandoc --from markdown --to ms --standalone
Pandoc version?
I encountered this behavior on pandoc 2.19.2 on macOS 13.3.1 22E261 arm64. It reproduces at https://pandoc.org/try/.
The problem. The following markdown with YAML header
should ideally yield a multi-line title, or else at least a single-line title, as it does (for example) in LaTeX PDF output and reStructuredText output.
However, when the output format is
ms
, pandoc generates the following (some preamble omitted):The inclusion of a
.LP
command here "within" the title breaks the output when the code is compiled to a pdf using pdfroff (called from within pandoc or separately).Instead, there should be a
.bp
command between each of the title YAML elements.Pandoc command
pandoc --from markdown --to ms --standalone
Pandoc version? I encountered this behavior on pandoc 2.19.2 on macOS 13.3.1 22E261 arm64. It reproduces at https://pandoc.org/try/.