View Single Post
Old 08-03-2017, 04:43 AM   #82
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,563
Karma: 20150435
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
You should learn about CSS, the "string-set" property, and other features specific to prince.

Without more information or testing, you could try:

Code:
h3 {
  string-set: chaptertitle content();
}
This means: every time an <h3> tag is found, define a string called "chaptertitle" (this is only the name I chose) with the content of the tag.

Then, the default page style in the plugin has:

Code:
  @top-center {
    font-size: 50%;
    font-style: italic;
    border-bottom: solid thin black;
    margin-bottom: 1mm;
    content: string(chaptertitle);
  }
which puts the value of "chaptertitle" (i.e., the content of the latest <h3> tag) on the center part of the header.
Jellby is offline   Reply With Quote