In a Quarto book project, I'm trying to either create an additional title block element or, alternatively, modify an existing one.
For example, suppose I want to replace the "Author" label with "Prepared for", and this would have to work for both html and pdf output. I read about css solutions and partial templates here, but I was not successful at either.
The relevant YAML element I'm using is:
author:
- name: "Donald Duck"
When I try the css solution:
div.quarto-title-meta-heading {
visibility: hidden;
}
div.quarto-title-meta-heading:before {
content: "Prepared for";
visibility: visible;
}
The date label is also replaced by "Prepared for":
When I try the partial templates solution:
<header id="title-block-header">
$if(title)$<h1 class="title">$title$</h1>$endif$
$if(subtitle)$
<p class="subtitle">$subtitle$</p>
$endif$
$for(author)$
<p class="author">Prepared for</p>
$endfor$
$if(date)$
<p class="date">$date$</p>
$endif$
$if(abstract)$
<div class="abstract">
<div class="abstract-title">$abstract-title$</div>
$abstract$
</div>
$endif$
</header>
I get this: