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

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
m Mark some text for not being included in official documentation
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
PostScript code can be directly inserted inside a <code>\markup</code> block.
PostScript code can be directly inserted inside a <code>\markup</code> block.
<div class="nodoc">
For technical reasons, this doesn't show up in the Wiki because <code>\postscript</code> only works with LilyPond's PS backend and is neither supported in the SVG (used in this Wiki) nor in the Cairo backend.
</div>
In general it is recommended to use LilyPond's native graphical markup commands like <code>\polygon</code> instead, which can be used with all LilyPond backends.


<lilypond version="2.24">
<lilypond version="2.24">
% PostScript is a registered trademark of Adobe Systems Inc.
\relative c'' {
\relative c'' {
   a4-\markup { \postscript "3 4 moveto 5 3 rlineto stroke" }
   a2-\markup \postscript "0 3 moveto
  -\markup { \postscript "[ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke " }
                          5 2 rlineto
 
                          stroke"
   b4-\markup { \postscript "3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke" }
    -\markup \postscript "[1 1] 0 setdash
  s2
                          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
   a'1
}
}
</lilypond>
</lilypond>


[[Category:Text]]
[[Category:Editorial annotations]]
[[Category:Editorial annotations]]
[[Category:Specific notation]]
[[Category:Text]]
[[Category:Text]]
[[Category:Specific notation]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Really cool]]
[[Category:Snippet]]