[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Defining a new markup command (e.g. \lower by a specified amount)
From: |
Philip Thomas |
Subject: |
Defining a new markup command (e.g. \lower by a specified amount) |
Date: |
Tue, 15 May 2012 19:45:33 +0000 (GMT+00:00) |
I am having great difficulty getting the hang of defining new markup commands.
The examples given in the Extending
manual in section 2.2.3 "New markup command definition" are comprehensible to
me in their own right, but they aren't
exactly simple examples, and I have so far failed to adapt definitions found in
the scm/define-markup-commands.scm file
to make my own new commands.
The particular problem that I'm trying to get to grips with at the moment is
this:
I
want to use the \lower command at about 15 places in text in a \markup block
(i.e. outside the \score block). The
\lower command works just fine to get the spacing I want between sections of
text (whereas both \override #'(baseline-
skip . xx) and \vspace #xx have proved quirky). The problem is that I don't at
this stage know exactly how much I want
to lower the text by (\lower #xx). When the overall layout of the score is
settled, I would like to experiment with
different values of N, without having to change each \lower command separately.
The solution seemed to me to be to
define a new markup command (e.g. \dropNextline) which specifies the amount to
which the line should be lowered. Then
my 15 entries could all read \dropNextLine { text text text }, and the
experiment would only involve changing the value
of xx in the define-markup-command code until the overall spacing is correct
when judged by the eye. But I'm bu**ered
if I can get it to work. Sorry if I'm ignorant of something I should have found
in the documentation.
I guess I have
two questions:
(1) How to define a suitable \dropNextLine command?
(2) Is there an explanation anywhere from which I
can learn in a graded, structured, way how to define my own markup commands so
I don't have to presume repeatedly upon
the kindness of other users on the forum? Are there some examples which would
lead me by the hand a bit more gently,
starting from the commands scm/define-markup-commands.scm and working them up
into a useable result?
By the way, I
have found define-music-function code much easier to handle, although I readily
admit to being rather a beginner.
Cheers, Philip
- Defining a new markup command (e.g. \lower by a specified amount),
Philip Thomas <=