%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "snippets/using-postscript-to-generate-special-note-head-shapes.ly"
\sourcefileline 0
%% DO NOT EDIT this file manually; it was automatically
%% generated from the LilyPond Snippet Repository
%% (http://lsr.di.unimi.it).
%%
%% Make any changes in the LSR itself, or in
%% `Documentation/snippets/new/`, then run
%% `scripts/auxiliar/makelsr.pl`.
%%
%% This file is in the public domain.

\version "2.23.13"

\header {
%% Translation of GIT committish: a8a85e19654e46d725563e6deba44083ef137a2c
  texidocja = "
特殊な符頭をグラフィック マークアップで作成するのが困難な場合、PostScript
コードを用いて形をつくることが出来ます。この例は、平行四辺形の符頭を@c
作成する方法を示しています。
"
  doctitleja = "特殊な符頭を作成するために PostScript を使用する"

%% Translation of GIT committish: a3fd5364fc4f247579da0ed2bfea887ab37285c6
  texidocfr = "
Lorsqu'il est impossible d'obtenir facilement une allure particulière
pour les têtes de note en recourant à la technique du @code{\\markup},
un code PostScript peut vous tirer d'embarras. Voici comment générer
des têtes ressemblant à des parallélogrammes.
"

  doctitlefr = "Utilisation de PostScript pour générer des têtes de note à l'allure particulière"

%% Translation of GIT committish: 8ffecf6be17c6ec2ff87cf31873121a8cce29b09
  texidoces = "
Cuando la cabeza de una nota con una forma especial no se puede
generar fácilmente mediante elementos de marcado gráfico, puede
emplearse código de PostScript para generar la forma.  Este ejemplo
muestra cómo se genera una cabeza en forma de paralelogramo.

"
  doctitlees = "Uso del lenguaje PostScript para generar cabezas de nota de formas especiales"

%% Translation of GIT committish: 8ffecf6be17c6ec2ff87cf31873121a8cce29b09
  texidocca = "
Quan el cap d'una nota amb una forma especial no es pot generar
fàcilment mitjançant elements de marcatge gràfic, es pot usar codi
de Postscript per generar la forma.  Aquest exemple mostra com es
genera un cap en forma de paral·lelogram.

"
  doctitleca = "Ús del llenguatge PostSript per generar caps de nota de formes especials"

  lsrtags = "editorial-annotations, really-cool, scheme-language, tweaks-and-overrides"

  texidoc = "
When a note head with a special shape cannot easily be generated with
graphic markup, PostScript code can be used to generate the
shape.  This example shows how a parallelogram-shaped note head is
generated.
"

  doctitle = "Using PostScript to generate special note head shapes"
} % begin verbatim


parallelogram =
  #(ly:make-stencil (list 'embedded-ps
    "gsave
      currentpoint translate
      newpath
      0 0.25 moveto
      1.3125 0.75 lineto
      1.3125 -0.25 lineto
      0 -0.75 lineto
      closepath
      fill
      grestore" )
    (cons 0 1.3125)
    (cons -.75 .75))

myNoteHeads = \override NoteHead.stencil = \parallelogram
normalNoteHeads = \revert NoteHead.stencil

\relative c'' {
  \myNoteHeads
  g4 d'
  \normalNoteHeads
  <f, \tweak stencil \parallelogram b e>4 d
}



% ****************************************************************
% end ly snippet
% ****************************************************************
