[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: again: funktionsbezeichnung
From: |
Mats Bengtsson |
Subject: |
Re: again: funktionsbezeichnung |
Date: |
Thu, 28 Feb 2008 12:55:18 +0100 |
User-agent: |
Thunderbird 2.0.0.5 (X11/20070716) |
Here's an alternative solution that defines a markup command to add the
slash
to any character.
\version "2.10.0"
% Inspired by slashed-digit from scm/define-markup.scm:
#(define-markup-command (slashed-char layout props ch) (char?)
"A character, with slash."
(let*
((mag (magstep (chain-assoc-get 'font-size props 0)))
(thickness
(* mag
(ly:output-def-lookup layout 'line-thickness)
(chain-assoc-get 'thickness props 1.6)))
(char-stencil (interpret-markup layout props ch))
(num-x (interval-widen (ly:stencil-extent char-stencil X)
(* mag 0.1)))
(num-y (ly:stencil-extent char-stencil Y))
(is-sane (and (interval-sane? num-x) (interval-sane? num-y)))
(slash-stencil
(if is-sane
(ly:make-stencil
`(draw-line
,thickness
,(car num-x) ,(car num-y)
,(cdr num-x) ,(cdr num-y))
num-x num-y)
#f)))
(ly:stencil-add char-stencil slash-stencil)))
\relative c'{ < b d f >1^\markup { \slashed-char #"D" \super 7 } }
/Mats
Marc Hohl wrote:
On Thursday 28 February 2008 10:20:30 Stefan Thomas wrote:
Dear lilypond-users,
is it possible, to build the "funktionsbezeichnung"? I mean the slashed
letter D7. It is the (bit strange but common ) symbol for the diminished
chord in germany's harmony classes.
Thanks for any advice.
Stefan
Hi Stefan,
I tried
< h d f >1^\markup { D \hspace #-2.5 / \super 7 }
You can adapt the negative horizontal space between the letter D and the
slash.
Marc
--
=============================================
Mats Bengtsson
Signal Processing
School of Electrical Engineering
Royal Institute of Technology (KTH)
SE-100 44 STOCKHOLM
Sweden
Phone: (+46) 8 790 8463
Fax: (+46) 8 790 7260
Email: address@hidden
WWW: http://www.s3.kth.se/~mabe
=============================================