lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image width issue


From: Jean Abou Samra
Subject: Re: Image width issue
Date: Tue, 10 Jan 2023 22:58:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0

Le 10/01/2023 à 22:33, Rajesh Baskar a écrit :

Hi,

I have 2 staffs, one with the 3rd note hidden and another replacing the 3rd note with a red dot. But the 2 staffs are not having the same width. What do I need to do make the 2nd staff the same width as the 1st staff. Please see the image for details and thank you all so much for the help.



On the first staff, you use \hideNotes, which prints a hidden note
head. On the second staff, you change the way the note head is drawn,
which makes it less wide than a normal head, hence the difference.
Try using the same markup in the first case, but transparent.

\version "2.24.0"

\language english

RedDotMarkup = \markup \with-color "#FF0000" \vcenter \fontsize #-1 \musicglyph "dots.dot"
RedDot =
  \tweak text \RedDotMarkup
  \tweak stencil #ly:text-interface::print
  \tweak staff-position #0
  \etc

\header {
  tagline = ##f
}

\score {
  \new Staff \with { \omit TimeSignature }
  {
    \set Staff.midiInstrument = #"acoustic grand"
    \key c \major
    \time 5/1
    \clef bass
    g,1 a,
    \tweak transparent ##t %% Comment or uncomment this line
    \RedDot b,
    c d
    \bar "||"
  }
  \layout {
    \context {
      \Score proportionalNotationDuration = #(ly:make-moment 1/2)
    }
  }
}


Best,
Jean


Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]