lilypond-user
[Top][All Lists]
Advanced

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

Re: Footnote


From: William Rehwinkel
Subject: Re: Footnote
Date: Wed, 21 Aug 2024 23:27:34 -0400
User-agent: Mozilla Thunderbird

Dear Werner,

Oh, because it's all in a `\markup` block...my bad. Probably because we can do

% -----------
\version "2.25.18"
\relative c' {
  \footnote #'(1 . 1) \markup {hello} c4
  \footnote #'(1 . 1) "hello" c4
  %\footnote #'(1 . 1) {hello} c4 % error
  %\footnote #'(1 . 1) \wordwrap {hello} c4 % error
}
% -----------

meanwhile, with `\auto-footnote` we can do

% -----------
\version "2.25.18"

\markup { A \auto-footnote "B" \line {footnote text here } C }
\markup { A \auto-footnote "B" "footnote text here"  C }
% error:
%\markup { A \auto-footnote "B" \markup{footnote text here}  C }
% weird behavior:
\markup { A \auto-footnote "B" {footnote text here} C }
% -----------

is why I got confused.

-William


On 8/21/24 23:09, Werner LEMBERG wrote:

Actually, the \auto-footnote function operates a little weirdly (at
least it didn't seem intuitive to me). The `text` and `footnote` in

`\auto-footnote text footnote`

are just the contents of the markup, so you write what you would
write inside the brackets of \markup{}.

It's not weird at all.  You simply can't use `\markup` within
`\markup`.  Similarly, you can't use `\lyricmode` within `\lyricmode`,
etc., etc.

If you look at the documentation you can see the following

   ‘\auto-footnote’ MKUP (markup) NOTE (markup)

which means that both arguments are markups.  I think we have an XY
problem here: It seems to me that the OP believes that the arguments
have to be strings enclosed in double quotes.  This is not correct.
In most cases you can omit the double quotes while being in a
`\markup` block.

On the other hand, there are subtle differences between saying

   \markup { foo bar }

and

   \markup { "foo bar" }

The former uses LilyPond's idea of a space between words as set up by
`\markup` (i.e., it uses the value given by the markup's `word-space`
property, which can be modified using `\override` within `\markup`).
The latter, however, uses the space character as defined in the used
font, which is usually a different value.

In case it is absolutely necessary to use the font's space character
combined with other text markup, you have to use `\concat` like in the
following example.

```
\markup \concat {
   "This is a "
   \with-color #red "red "
   "word in a sentence." }
```


     Werner

--
William Rehwinkel (any pronouns)
Juilliard School '26 - Oberlin Conservatory '24
william@williamrehwinkel.net - https://williamrehwinkel.net
PGP Public Key: https://ftp.williamrehwinkel.net/pubkey.txt

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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