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