|
|
#1 |
|
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Oct 2021
Device: iPhone
|
Setting a header on conversion to PDF
I use h1, h2, and h3 tags. I have been setting the page header to _SECTION_ my h3 text, but it's not the right level for me. I would like to set _SECTION_ to my h2 content.
I would like to right justify that content and left justify a constant if possible. I'm not sure if the htnl title property on the h2 or h3 would work for me. I tried the _TOP_LEVEL_SECTION_ but that only picks up h1 and this is too high a level. Thanks in advance |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,681
Karma: 28549304
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You control what section titles are via the Table of Contents tab in the conversion settings.
|
|
|
|
|
|
#3 | |
|
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Oct 2021
Device: iPhone
|
Setting variables to use in a PDF header
Quote:
Is there documentation on how to set the value of the header variable _SECTION_ that you reference on the bottom of the PDF conversion page. Right now the _SECTION_ is being set by my usage of the h3 html tag. Is this the only way to do it? Is there a variable _CHAPTER_? set by the h2 tag? |
|
|
|
|
|
|
#4 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,681
Karma: 28549304
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Once again, you control what becomes sections via the Table of Contents. Each entry in the table of contents corresponds to a section and thus sets the SECTION variable.
|
|
|
|
|
|
#5 |
|
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Oct 2021
Device: iPhone
|
Thanks -- I can now set the section when I regen the TOC. Can I use <div> in the header and footer to out-justify two things, like series name on the left and chapter on the right of a single line? I tried this -- there must be a better way to count spaces!
<header><div style="width: 100%; margin:auto;">Series Name _SECTION_ </div></header> |
|
|
|
|
|
#6 |
|
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Oct 2021
Device: iPhone
|
<header><div style="text-align: center; width: 100%; margin: auto;"><div>Music of the Bible</div><div style="text-align: right;">_SECTION_</div></div></header>
I woke up for a minute... This works fine. |
|
|
|
![]() |
| Tags |
| conversion to pdf, header |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mobi conversion header issues | gabryyl | Conversion | 3 | 12-26-2020 09:17 PM |
| Setting margins in conversion to PDF | HarryT | Conversion | 2 | 06-22-2016 05:35 AM |
| Easy PDF ebook conversion. Eliminates header/footers | wtw1936 | Conversion | 0 | 08-09-2011 11:44 PM |
| PDF Conversion - Removing Header / Footer Text | heb | Sony Reader | 9 | 07-12-2010 12:02 AM |
| Header/Footer Problems with conversion | Sydney's Mom | Calibre | 4 | 01-05-2010 12:04 PM |