Closed vr8hub closed 2 years ago
Our nth-of-type or not dramatis-personae CSS might be foiled by the essays inserted into some introductions, which each get their own sections. (See Meno, "On the Ideas of Plato")
How do you feel about pattern matching on ids? All the textual sections are labeled "
section [id~="book"],
section [id$="text"]{
page-break-before: always;
}
No, that's great with me. Alex has a tendency to adjust CSS to his own liking, anyway, but that works and doesn't require extra markup, so I think it works.
I thought this would be simple, but I can't get the page break to show up in either Foliate or Calibre with
section [id*="book"],
section [id$="text"]{
break-before: page;
}
(I was using this commit as a reference: f88567b5e0c2ff5d16869ddd4bbcee242f64b3e8)
Any thoughts? (I pushed my attempt to fix it in the css-review
branch.)
I believe you have to get rid of the space, i.e.
section[id*="book"],
section[id$="text"]
Same as on the blockquote[xml|lang]
for blockquotes that have language attributes on them. See here.
Seems to work on Calibre at least. (Foliate still doesn't show the page breaks, oddly.)
Per Alex's response on his issue, let's use first-of-type instead of nth-of-type(1). I don't think there are any nth-of-type(x) where x is the last one, but if by chance there is, it should be last-of-type instead.
Also, as you also saw, on the numbers with overbars, you can either use MathML, or just use regular numbers and CSS (text-decoration-*) to put the overbars on. I tested the latter and it seemed to work fine, but feel free to use MathML if you'd prefer.
#apology
,.thesis
, and.fractions
can have their CSS combined, since it is the same.section
, but having the dramatis personae in their own sections complicates that slightly. It could be done with nth-of-type, or maybe looking for an epub:type other than dramatis-personae. This works even for Republic, where in the scans each book starts on a page break.