pandoc / lua-filters

A collection of lua filters for pandoc
MIT License
600 stars 165 forks source link

lilypond notation isn't cropped, uses full page of white space under the line of music #279

Open tilleule opened 3 months ago

tilleule commented 3 months ago

Lately, compiling pandoc markdown files with lilypond filter produces correctly compiled notation, but even single lines of music are followed by blank space in the image that fills the rest of the page.

GNU LilyPond 2.24.3 (running Guile 2.2) pandoc 3.1.13 Features: +server +lua Scripting engine: Lua 5.4

pandoc -s --lua-filter=./lilypond2.lua --pdf-engine=tectonic test.md -o test.pdf

less test.md: Wie heißen diese Noten? Schreibe die Namen auf die Linien:

\relative c' {
    \override Staff.TimeSignature #'stencil = ##f
    \cadenzaOn
    b4 c4 d4 e4 f4 g4 a4 b4 c4 d4 e4 f4 g4 a4 b4 c4 d4 e4 f4 \bar "|."
    \cadenzaOff
}

This results in a single line of text on page 1 and the music appearing on page 2 because the image is too big to fit under the line of text in one page.