%% 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
% ****************************************************************



\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 is automatically
%% generated from LSR http://lsr.di.unimi.it
%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
%% and then run scripts/auxiliar/makelsr.py
%%
%% This file is in the public domain.
\version "2.21.2"

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

%% Translation of GIT committish: 207d558daf542af3b09157662deb8a68731d4f41
  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"

  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
% ****************************************************************
