Hello,
I’ve this template “code” that just print defined text. If the user want to add an author, the author is shown surrounded with parenthesis.
However, since the text added has a line break at the end, the text and the author does not show on the same line. How to prevent this ?
Thanks in advance for answers
#let header_tune(body, author: "") = [
#set text(size: 7pt, font : "Molengo")
"Air : "
#body
#if (author != "") { "("+ author +")"} else {""}
]
#show: style.header_tune.with(author : "Author")
Musique très connue
here’s the result :
I want it rendered as :
“Air : Musique très connue (Author)”
I know that i can use something like :
#style.header_tune("Musique très connue", author : "Alex")
But i think that it force the end user to either declare a valiable of type text() or set the parameter directly making it “less intuitive” and “less customisable”.