![]() |
#1 |
Connoisseur
![]() Posts: 72
Karma: 10
Join Date: Mar 2017
Location: Central NC
Device: Various
|
Possible header content?
While there are no "standards" for what page headers should contain in printed books, there are some common practices. One is that, particularly in books of a technical nature, left-hand pages display the Chapter Title (left-aligned) and the Chapter Number (right-aligned). Right-hand pages then similarly display the Section Number (left-alighed) and the Section Title (right-aligned).
What would be required to accomplish this in converting an Epub to PDF in Calibre? Last edited by ghmerrill; 12-05-2020 at 04:46 PM. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,242
Karma: 23446430
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The variables to do it are all there, you would need to write the javascript function that outputs the appropriate markup based on whether the page number is even or odd.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Connoisseur
![]() Posts: 72
Karma: 10
Join Date: Mar 2017
Location: Central NC
Device: Various
|
At this point I'm afraid I'm going to bail on the Calibre-conversion approach.
Even if I write the JS necessary for it, it will be painful to achieve the level and granularity of control over the outcome that I believe I need. And your previous comments that "All available variables are documented" leaves me uneasy about achieving the level of quality and control I can exert even via JS. The converter goes a long way towards providing an acceptable finished result, but not quite far enough to have confidence in extra effort being rewarded with the desired results and absent quality compromises I don't want to make. Another sign of this is the lack of other forum members leaping into the discussion with testimonials of success and any suggestions of how to proceed. So while I regard the attempt as a noble effort, I don't want to devote any more time and effort to it. I think the converter is a great tool for producing PDFs for certain purposes, but not for fully polished results for publishing. This isn't a knock on what Calibre does in this respect -- just a recognition of limitations and ease of use. So with reluctance I've decided to move my Epub version into Word and produce the PDF from that environment -- navigating the minefield that is Word with care, but with a feeling of better control. It's taken me about five minutes to have Sigil merge all the XHTML files, suck that single file into (yikes!) Internet Explorer, and save the result as a .docx. It looks surprisingly good and without obvious distortions or errors (though who knows what trash Word has created under the covers). Now it's a matter of creating the appropriate styles and templates, but even under the worst case that shouldn't take me more than a week and I'll be able to fine-tune the result. A major added advantage is that I'll be able to generate and edit an index within that environment -- which, even with a successful Epub conversion would be challenging and painful (or expensive). I do appreciate your rapid responses to questions and all your efforts to help. But at this point I think discretion is the better part of valor. |
![]() |
![]() |
![]() |
#4 | |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 413
Karma: 2289864
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
|
Quote:
One interesting thing I found. If you have a nice tightly styled epub, with named styles you know and understand, Jutoh (a not free but cheap epub editor) can take the epub and compile an excellent odt (or docx) that is completely faithful to the original styling, including the style names. I've found that a great leg-up in getting from the epub to a publishable pdf. |
|
![]() |
![]() |
![]() |
#5 |
Connoisseur
![]() Posts: 72
Karma: 10
Join Date: Mar 2017
Location: Central NC
Device: Various
|
Yeah, this is not going badly at all -- partly because all the formatting in my book is very vanilla. And partly because it's so easy in the WYSIWYG to accomplish things with cut and paste instead of bothering to take all the time defining templates, styles, and so on. Not cool or sophisticated, but it gets to the result in a way suitable for a one-off approach. Really, for my book the most complicated thing is doing the headings, text boxes, and page numbering.
I'm also being aided by my wife who (as a technical writer for years, and then a UI designer) has vast experience wrestling with various versions of WORD. Over the past 25 years, I've maybe done two or three publications with Word (the last in 2010), and all the rest were in LaTeX->PDF. Word, and its clones, suck; but for some applications it's the most rational choice. But I definitely don't regret using Sigil/Epub for the primary work. |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
In epub converting calibre auto split file in header. Why not create toc from header. | The_book | Conversion | 7 | 11-06-2020 09:09 AM |
Best device for accessing Calibre as a content server only / Best way to add content | yelt | Calibre | 1 | 10-01-2020 09:53 PM |
Aura HD How to modify the header? | PeterOnne | Kobo Developer's Corner | 15 | 11-29-2018 11:17 PM |
Getting Full Content from Partial Content Feeds | thread314 | Calibre | 5 | 05-05-2012 10:49 AM |