View Single Post
Old 02-10-2024, 05:15 AM   #1
TTY15
Junior Member
TTY15 began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2024
Device: none
TOC level 2 from span class = span2

I've imported from LO Writer where I had styling for H1 and H2. But in Calibre editor I see only H1 in TOC. How can I add H2 level?

My H2 in Calibre editor is seen as:

Code:
<span class="span2">
and has css:
Code:
.span2 {color: #1f3864; font-family: 'Liberation Sans1'; font-size: 20.0000pt; font-weight: bold; }
I read about XPath but when I use these options:

https://i.imgur.com/gRyqHBU.png

Code:
//h:h2[re:test(@class, "span2", "i")]
it doesn't find any elements that could be included in TOC.

By the way, is it possible to do find and replace in Calibre editor for all xhtml files at once? Or somehow unpack epub, edit and pack to epub again?
TTY15 is offline   Reply With Quote