View Single Post
Old 12-05-2024, 01:40 PM   #1
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
Posts: 324
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
PDF complex header/footer design

Here is code for EPUB to PDF conversion to make a one-line footer with Left, Center, and Right. The Left and Right swap places for odd and even numbered pages. In this example there is a 'dummy' section that is blank, but anything such as _AUTHOR_ could be added.

Quote:
<footer>
<div class='odd-page' style='width:20%'>_PAGENUM_</div>
<div class='odd-page' style='text-align:center; width:60%'> <b>_SECTION_</b></div>
<div class='odd-page' style='width:20%'>*</div>
<div class='even-page' style='width:20%'>*</div>
<div class='even-page' style='text-align:center; width:60%;'> <b>_SECTION_</b></div>
<div class='even-page' style='width:20%'>_PAGENUM_</div>
</footer>
I tried making a snippet for this, but snippets don't work on this footer input line in the converter. You can store it as a non-functioning snippet which you use via copy and paste. You can store this code elsewhere, then copy and paste it into the footer input line. Alternately, you can use .XCompose which works everywhere. The .XCompose line for this is:

Quote:
<Multi_key> <f><f>:"<footer><div class='odd-page' style='width:20%'>_PAGENUM_</div><div class='odd-page' style='text-align:center; width:60%'> <b>_SECTION_</b></div><div class='odd-page' style='width:20%'></div><div class='even-page' style='width:20%'></div><div class='even-page' style='text-align:center; width:60%;'> <b>_SECTION_</b></div><div class='even-page' style='text-align:right; width:20%'>_PAGENUM_</div></footer>"
So, all you need to do is go to the footer input line, then Ctrl_r, f, f. Hope this is useful for someone. If anyone can simplify the code I would be happy to see it. I cannot offer food, but you would have my undining gratitude.
Best regards, Pop
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2024-12-05 12-13-36.png
Views:	102
Size:	193.8 KB
ID:	212361  
rjwse@aol.com is offline   Reply With Quote