lilypond-user
[Top][All Lists]
Advanced

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

Re: Tuplets, one-line staves etc. in lilypond-book


From: Karl Hammar
Subject: Re: Tuplets, one-line staves etc. in lilypond-book
Date: Fri, 26 Mar 2010 17:59:25 +0100 (CET)

Siska Ádám:
...
> However, I still don't know about the tuplets. Is there really no
> way to have tuplets in a lilypond-book excerpt? That sounds weird to
> me. Anyway, if it can't be solved in a standard way, does anybody have
> an idea for a workaround?
...

You can make an eps/pdf/png/svg and include it into the latex side.
Something like:

$ cat file.ly
% this seems to give me cropped (without extra whitespace) output
(define default-toplevel-book-handler print-book-with-defaults-as-systems)
% replace the note head with "to"
#(define (nh-to grob grob-origin context)
  (let*
   ((ifs (ly:grob-interfaces grob)))
   (if (memq 'note-head-interface ifs)
    (begin
     (ly:grob-set-property! grob 'stencil
      (grob-interpret-markup grob (make-whiteout-markup (make-lower-markup 0.5 
"to")))
    )))))
Ma = \relative e' {
  \time 3/1
  f1
  \applyOutput #'Voice #nh-to f
  fis
  \bar "|."
}
\score {
  \new Staff \context Voice = Va { \Ma }
  \layout {
    \context {
      \Staff
      \remove "Time_signature_engraver"
    }
  }
}
$ lilypond --ps -dbackend=eps file.ly
...
$ cat txt.lytex
...
upper limit is
\raisebox{-0.8ex}{\includegraphics[height=3ex]{file.eps}},
...
$

A fuller example is available at: git-clone git://turkos.aspodata.se/musik.git

Regards,
/Karl






reply via email to

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