How come the following doesn’t parse, and is there an elegant way to work around it?
#let v = [fancy]
Let's introduce the word _#v_ so I can write super-#v anti-#v things all around.
(I mean better-looking than #text(v, style: "italic").)
How come the following doesn’t parse, and is there an elegant way to work around it?
#let v = [fancy]
Let's introduce the word _#v_ so I can write super-#v anti-#v things all around.
(I mean better-looking than #text(v, style: "italic").)
The second underscore _ is attached to #v so the first _ is never closed as the error message says:
Error: Unclosed delimiter
To demonstrate, a new variable can be created:
#let w_ = [fancy2]
Let's introduce the word #w_ so I can write super-#v anti-#v things all around.\
This works fine but also doesn’t emphasize “fancy2”.
To use the shortcut for emph (italics) we need to tell the compiler that we are done entering the variable name. There are a few options for this:
#let v = [fancy]
//Enclose the variable name in {}
Let's introduce the word _#{v}_ so I can write super-#v anti-#v things all around.
//Use a ; which tells the compiler to parse everything
// in front of the ; before continuing to parse things
Let's introduce the word _#v;_ so I can write super-#v anti-#v things all around.