On 2017-05-09 at 14:15, Ivanov Dmitry wrote:
Hi Ivanov!
I understand that you want a function which puts your text exact at
the midpoint between the notes, but...
Else is the simplest to just displace your text some distance. But of
course, then you have to calculate the midpoint yourself.
\version "2.18.2"
\relative f'{
f8_\markup { \translate #'(0.8 . 0) F} <a c f>
}
Kaj
Hello. Can you explain the meaning of this:
f8_\markup - start the markup below the note f8
{
\translate -- call "translate" function
#' - what's this?
(0.8 . 0) - parameter passing. But what is the syntax?
F - text "F"
}
Hello Ivanov
As you see, compared to your own code I just added a call for a
function, which moves the text some distance from its original place,
which is just under the first note f. The displacement is the two
numbers in the parenthesis 0.8 in the X direction (horizontally) and 0
(zero) in the Y direction (vertically). This a special data type, a pair
of numbers, and must be separated by a dot, which in turn has to be
surrounded by spaces ( to not be mistaken for a decimal point). The hash
mark (#) is the syntax for entering values to almost any function, for
the programming language Scheme to recognize it as a value. The
apostrophe says it is not a string (which is surrounded by double
quotes) but another kind of value. The unit for the displacement is the
space between the staff lines.
Myself I am far from an expert, so someone might come back and correct
what I have written. In the Notation Reference you have examples and a
better explanation:
http://lilypond.org/doc/v2.18/Documentation/notation/formatting-text#text-alignment
If you have not yet read the Learning Manual I recommend you to do so.
You will discover some of the structure in programming LilyPond.
/Kaj
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user