Part V. Agent-based models <span>vs</span> ODE models
I do this to be able to control the format of the word “vs”:
/* This is a trick so you can force anything you put into
to be lower case. It is done for the "vs" in
"PART V. AGENT-BASED MODELS vs ODE MODELS" */
.part-title span {
text-transform:lowercase;
}
This dirty trick (constructive criticism and suggestions are most welcome) works like a charm except for the table of contents in the EPUB export. There, the part title appears as:
Part V. Agent-based models <span>vs</span> ODE models
The reason, presumably, is how the above line is coded in the file “table-of-contents.xhtml” inside the EPUB:
<span class="toc-chapter-title">Part V. Agent-based models <span>vs</span> ODE models</span>
As you can see, < has been transformed into < and > into >
Any ideas on how to fix this?
(Either the general problem I pose here, or my specific problem, by modifying my dirty trick)
Thanks!
Thanks again, Thomas. The issue is that I actually like how it is done in my (McLuhan) theme. You write the part title (once) in lower case (and it appears like that in most cases), but Pressbooks capitalize it in certain places, such as in the part-title in each chapter (see “PART V. AGENT-BASED MODELS vs ODE MODELS” below):
Well then… I do not think tags are „officially“ supported in post titles. The fact that they work online and in the PDF export might be „luck“. You could file a feature request for tag support also in EPUB export.
WordPress does specifically allow HTML tags in post titles, which is why it likely works in most places. I’ve used <em> tags in titles to italicize words, for example. It gets stored in the database as entered.
It looks like this is specific to the way Pressbooks generates the EPUB table of contents. I can see a couple of places in the Pressbooks code where it is intentionally stripping out tags.