%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


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

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



\paper {
  #(set-paper-size '(cons (* 597.508 pt) (* 845.047 pt)))
  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/slanted-parentheses-around-dynamics.ly"
\sourcefileline 0
%% DO NOT EDIT this file manually; it was automatically
%% generated from the LilyPond Wiki
%% (https://wiki.lilypond.community).
%%
%% Make any changes in the Wiki itself, or in
%% `Documentation/snippets/new/`, then run
%% `scripts/auxiliar/makelsr.pl`.
%%
%% This file is in the public domain.

\version "2.24.0"

\header {
%% Translation of GIT committish: 606ac3c3b22c41d84aa5fa938d42da5125ac572a
  texidocfr = "
Le moyen le plus simple pour ajouter des parenthèses à une indication de
nuance consiste à utiliser la commande @code{\\parenthesize} et et
d'ajuster la taille de la fonte, comme par exemple @code{@{ c'4\\tweak
Parentheses.font-size 2 \\parenthesize \\f @}}. Toutefois, ces
parenthèses se présentent droit alors que les indications de nuance
apparaissent normalement en italique. Le code ci-dessous offre une
solution pour présenter les parenthèses elles aussi en italique.
"

  doctitlefr = "Indications de nuance entre parenthèses en italique"

  categories = "Expressive marks, Scheme, Text, Workaround"

  texidoc = "
The easiest way to parenthesize dynamics is to use the normal
@code{\\parenthesize} command and adjust the font size, e.g.,
@code{@{ c'4\\tweak Parentheses.font-size 2 \\parenthesize \\f @}}.
However, this results in upright parentheses, while dynamic marks are
normally slanted. This snippet gives a method to make the parentheses
slanted as well.
"

  doctitle = "Slanted parentheses around dynamics"
} % begin verbatim


paren =
#(define-event-function (dyn) (ly:event?)
   (make-dynamic-script
    #{ \markup \concat {
         \normal-text \italic \fontsize #2 (
         \pad-x #0.2 #(ly:music-property dyn 'text)
         \normal-text \italic \fontsize #2 )
       }
    #}))

\relative c'' {
  c4\paren\f c c \dynamicUp c\paren\p
}



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