Embedding native PostScript in a \markup block

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

In general it is recommended to use LilyPond’s native graphical markup commands like \polygon instead, which can be used with all LilyPond backends.

\relative c'' {
  a2-\markup \postscript "0 3 moveto
                          5 2 rlineto
                          stroke"
    -\markup \postscript "[1 1] 0 setdash
                          0 0 moveto
                          5 2 rlineto
                          stroke"
  b2-\markup \postscript "1 1 moveto
                          0 0 1 2 8 4 10 2 rcurveto
                          stroke"
  a'1
}
[image of music]

LilyPond snippets v2.25.32 (development-branch).