Am 16.09.2016 um 11:53 schrieb Pierre Perol-Schneider:
Hi Malte,

Here is an old thread regarding a similar demand:


Thanks Pierre for the hint and Marc for the solution I found in this thread. This approach also works for other things like baseline-skip overrides, probably I’ll make some other similar commands. It would be nice though to have an easier method to make whole markups “absolute-sized”, maybe something like

\markup \absolute {
  [everything inside behaves as if global staff size
   was the default 20pt]


\markup \absolute #16 {
  [everything inside behaves as if global staff size
   was 16pt]

with an optional argument or \default for #20.

Here my pt-based (instead of mm-based) abs-epsfile and abs-baseline-skip commands, maybe they are of interest for someone.


\version "2.19.47"

% based on epsfile-mm by Marc Hohl
  (abs-epsfile layout props axis size file-name)
  (number? number? string?)
  (let* ((output-scale (ly:output-def-lookup layout 'output-scale))
         (scaled-size-mm (/ size output-scale))
         (scaled-size (* scaled-size-mm (/ 25.4 72.27))))
    (if (ly:get-option 'safe)
        (interpret-markup layout props "not allowed in safe")
        (eps-file->stencil axis scaled-size file-name))))

  (abs-baseline-skip layout props skip m)
  (number? markup?)
  (let* ((output-scale (ly:output-def-lookup layout 'output-scale))
         (scaled-skip-mm (/ skip output-scale))
         (scaled-skip (* scaled-skip-mm (/ 25.4 72.27))))
        (interpret-markup layout props
          (markup #:override (cons 'baseline-skip scaled-skip) m))))

lilypond-user mailing list

Reply via email to