lilypond-user
[Top][All Lists]
Advanced

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

Re: tocItem as \mark


From: David Sumbler
Subject: Re: tocItem as \mark
Date: Fri, 03 Feb 2017 18:21:41 +0000

Thanks, that's brilliant, and it will be a very useful template for me
for creating functions in the future.

Since my original post, I had experimented some more and thought I had
succeeded in getting the result I wanted, basically doing what your
function does, but as 2 separate calls.  My solution, of course, was
not nearly so neat as wrapping it all together.

Unfortunately, there is a problem with a couple of the TOC items.
 There is already a fermata Mark over the preceding barline, so I get a
"Two simultaneous mark events, junking this one" warning.  The same
problem, of course, arises with your function which combines the Mark
and the tocItem.  I tried using

allowSimultaneousMarks = { \cadenzaOn \once \omit Score.TimeSignature
\time 1/16 s16 \bar "" \cadenzaOff \once \omit Score.TimeSignature }

which I have found useful in the past, but for some reason it messed up
the vertical alignment of notes in the following bar.

I ended up by doing a rather make-shift thing of putting the titles in
the score as markups using

s1*0^\tweak X-offset #-9 \tweak Y-offset #10 -\markup {                
  \fontsize #2 \bold "Title" }

before the first note of the top line of the score, and also in other
parts with a tag so that it only prints in the parts, not the score.

This is rather unsatisfactory, because the offsets need adjusting for
each song and probably also for each part.  Fortunately in this
particular case there is only one other instrument that needs a
separate part.

Can you see a way of combining the titles as a RehearsalMark with a
fermata over the barline?

David

On Fri, 2017-02-03 at 11:32 +0100, Jan-Peter Voigt wrote:
> Hi David,
> 
> to combine those two commands, you should wrap them in one music-
> function:
> 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> tocMark =
> #(define-music-function (mup)(markup?)
>     #{
>       \tocItem $mup
>       \once \override Score.RehearsalMark.self-alignment-X = #LEFT
>       \mark $mup
>     #})
> 
> %%% test
> 
> \markup \left-column \table-of-contents
> 
> \relative {
>    bes'4 a c b \tocMark "Part 1"
>    bes4 a c b \tocMark "Part 2"
>    bes4 a c b \tocMark "Part 3"
>    bes4 a c b \tocMark "Part 4"
>    bes4 a c b
> }
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> 
> That way you can change the appearance of the toc-items and the 
> rehearsalmarks in one place.
> 
> HTH
> Jan-Peter
> 
> 
> Am 01.02.2017 um 22:03 schrieb David Sumbler:
> > 
> > I want to have a table of contents with the titles of sections of a
> > piece and the relevant page numbers.
> > 
> > In pieces I have set previously, the title of each movement was
> > placed
> > centrally over the first line of the score/part for that
> > movement.  I
> > set the variable "piece" in the header for each movement, and
> > defined
> > scoreTitleMarkup to get the result I wanted.
> > 
> > The piece I am currently working on is a single score, but with 6
> > songs
> > which follow each other more or less continuously.  I want the
> > title of
> > each song to appear above the top line of the score at the start of
> > each song; in most cases this will probably not be at the start of
> > a
> > line.
> > 
> > I thought that I could do this by inserting the title as a text
> > mark,
> > e.g. \mark \markup { \fontsize #2 \bold "Title of song" }, with an
> > override to left-align the title.
> > 
> > This works as intended, but if I then put \tocItem before \mark
> > Lilypond complains that \tocItem has to be followed by markup; if I
> > put
> > \tocItem after \mark Lilypond complains that \mark has to be
> > followed
> > by markup.
> > 
> > Is there a way this can be made to work?  Or how else might I get
> > the
> > desired result?
> > 
> > David
> > 
> > 
> > _______________________________________________
> > lilypond-user mailing list
> > address@hidden
> > https://lists.gnu.org/mailman/listinfo/lilypond-user
> > 
> 
> 



reply via email to

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