Jump to content

Embedding native PostScript in a \markup block: Difference between revisions

From LilyPond wiki
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
No edit summary
Line 19: Line 19:
[[Category:Specific notation]]
[[Category:Specific notation]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Really cool]]
[[Category:Really cool]][[Category:Snippet]]

Revision as of 22:52, 21 November 2025

PostScript code can be directly inserted inside a \markup block.

\version "2.24"

% PostScript is a registered trademark of Adobe Systems Inc.

\relative c'' {
  a4-\markup { \postscript "3 4 moveto 5 3 rlineto stroke" }
  -\markup { \postscript "[ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke " }

  b4-\markup { \postscript "3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke" }
  s2
  a'1
}