Le 04/04/2013 15:25, Urs Liska a écrit :
If you don't find a lilypond-wise solution (which I'm afraid) yo'll probably 
have to define a 1/16th paper size with suitably small margins and use an 
external tool (suggestions depending on your OS and output format) to arrange 
them on the full paper.

HTH
Urs



Hanns Holger Rutz <[email protected]> schrieb:

hello,

how can I set up lilypond to use a multiple column page layout. I have
very short independent scores, and I would like to arrange them in four
example four columns next to each other. It doesn't matter whether the
grid goes left-to-right then top-to-bottom or the other way round.

thanks, ..h.h..

Hi,
I don't know if it helps but I have found the ly file attached in my archives. Don't know the author.
Phil.


\version "2.14.0"
%\version "2.15.1"

\pointAndClickOff

#(set-global-staff-size 24)

% This creates a simple grid of single measure/two staff scores (mini scores). The 'mini scores' are used within a
% \markup construct. Then by creating an 'invisible system' as a 'frame' and attaching these 'mini scores' as
% \markups to notes within the 'invisible system' it is possible to create the grid effect.
% The single 'mini score' on its own in the first line is just to show one on its own.
% By adjusting the global-staff-size and the X offset of the mini-score contruction (below) it is possible to create more or less mini-scores per line.

\paper {
  % Indent of 0\mm required to make first markup align with the measure below as without it
  % the first measure of the invisible score is indented and throws off the alignment of the first
  % mini score
  indent = 0\mm
  % This just spaces out the 'grid' evenly, top-to-bottom
  ragged-last-bottom = ##f
  % uncomment this line to remove the default LilyPond tag at the bottom of the page
  % tagline = #ff
}

  % 'musicall' is the name of the 'invisible score + \markups of the 'mini scores'' used in the final \score
  % construct at the end of the file
musicall = {

  % \textlengthOn is required to keep the horizontal spacing consistent else the 'mini scores' will collide
  % or touch each other.
  \textLengthOn

  % Each measure in the invisible score that the \markup is attached to is a semi-breve
  % the tweak moves the mini score, to the left - adjust as necessary. #-10 seems about right
  % for this page and staffsize.
  c1-\tweak #'X-offset #-10 ^\markup {

  % This is the construct of the 'mini score'. In this specific case the time-signature was not needed
  % so the \override in the mini score removes the timesignature.
    \score {
    <<
      \new Staff \relative c' {  \override Staff.TimeSignature #'stencil = ##f \clef "treble" c4 d e f }
      \new Staff \relative c' {  \override Staff.TimeSignature #'stencil = ##f \clef "bass" c4 d e f }
    >>

  % The \layout { } is required. Do not remove it.
    \layout { }
  }
}

% The manual \break just forces the number of mini scores that are horizontally spaced
% This can be placed as required and with a combination of the \tweak above, the staffsize you can create
% different sized grids of mini scores.
  \break

% The following are just a repeat of the above but with a \repeat unfold 4 + break to just show how to quickly
% create a number of mini scores...

\repeat unfold 4 { 
  c1-\tweak #'X-offset #-10 ^\markup {
    \score {
      <<
        \new Staff \relative c' { \override Staff.TimeSignature #'stencil = ##f \clef "treble" c4 d e f }
        \new Staff \relative c' { \override Staff.TimeSignature #'stencil = ##f \clef "bass" c4 d e f }
      >>
    \layout { }
    }
  }
} \break

\repeat unfold 4 { 
  c1-\tweak #'X-offset #-10 ^\markup {
    \score {
      <<
        \new Staff \relative c' { \override Staff.TimeSignature #'stencil = ##f \clef "treble" c4 d e f }
        \new Staff \relative c' { \override Staff.TimeSignature #'stencil = ##f \clef "bass" c4 d e f }
      >>
    \layout { }
    }
  }
} \break

\repeat unfold 4 { 
  c1-\tweak #'X-offset #-10 ^\markup {
    \score {
      <<
        \new Staff \relative c' { \override Staff.TimeSignature #'stencil = ##f \clef "treble" c4 d e f }
        \new Staff \relative c' { \override Staff.TimeSignature #'stencil = ##f \clef "bass" c4 d e f }
      >>
    \layout { }
    }
  }
} \break

\repeat unfold 4 { 
  c1-\tweak #'X-offset #-10 ^\markup {
    \score {
      <<
        \new Staff \relative c' { \override Staff.TimeSignature #'stencil = ##f \clef "treble" c4 d e f }
        \new Staff \relative c' { \override Staff.TimeSignature #'stencil = ##f \clef "bass" c4 d e f }
      >>
    \layout { }
    }
  }
} \break


\repeat unfold 4 { 
  c1-\tweak #'X-offset #-10 ^\markup {
    \score {
      <<
        \new Staff \relative c' { \override Staff.TimeSignature #'stencil = ##f \clef "treble" c4 d e f }
        \new Staff \relative c' { \override Staff.TimeSignature #'stencil = ##f \clef "bass" c4 d e f }
      >>
    \layout { }
    }
  }
} \break

\repeat unfold 4 { 
  c1-\tweak #'X-offset #-10 ^\markup {
    \score {
      <<
        \new Staff \relative c' { \override Staff.TimeSignature #'stencil = ##f \clef "treble" c4 d e f }
        \new Staff \relative c' { \override Staff.TimeSignature #'stencil = ##f \clef "bass" c4 d e f }
      >>
    \layout { }
    }
  }
} \break

}

% This is where the grid is printed

\score {
  % include everything in the variable 'musicall' above
  \musicall

  % we now need to start to remove the components to create the 'invisible score'
  \layout {
   \context {
     \Staff

     % If you remove the clef completely then the alignment of the first mini-score is off and this puts the
     % whole grid off. So we are just going to make the clef's transparent
     \override Clef #'transparent = ##t

     % Remove the Time signature from the invisible score
     \remove "Time_signature_engraver"

     % Remove the staff lines and bar lines from the invisible score
     \remove "Staff_symbol_engraver"
    }
    \context {
      \Voice

     % Remove the semi-breve notes from the invisible score (the notes the mini scores are attached to)
      \remove "Note_heads_engraver" 
    }

    \context {
      \Score
     % Remove the bar numbers from the invisible score
      \remove "Bar_number_engraver"
    }
  }
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to