View Single Post
Old 02-13-2016, 04:50 PM   #23
DLSieving
Enthusiast
DLSieving began at the beginning.
 
Posts: 26
Karma: 10
Join Date: Nov 2015
Device: iPad/KindleApp
Embedding Fonts; Outmaneuvering Unwanted Indents

Quote:
Originally Posted by Hitch View Post
Yes--I admit I don't understand what you mean. The Section and Chapter numbers--these are headings and subheadings, is that right?--should render exactly how you styled them, I'd assume. For you and for anyone else that comes along: if you didn't style them as headings, but instead as PARAGRAPHS, and used styling to make them look like headings, then...yes, the KP or KG conversion would assume that you wanted the typical cascading style. That paragraph style has a base style that has a first-line indent. It's not hard to get rid of, but you'd need to either a) style it in Word as an HTML heading or b) you'd have to regex them in HTML, in Sigil or the Calibre editor.
I did use paragraph styles instead of headings. Knowing how intrusive some conversions tend to be, I was trying to hide my numbered headings so that they would be left alone. When I saw that they weren't, I just removed the numbers. I like the result for a few reasons.
  • The headings look cleaner without numbers.
  • The numbers can be seen just by clicking the heading, which takes the user back to the TOC.
  • No conversion process can possibly figure out that they're headings and so will have no excuse to make assumptions and change them.

Quote:
You didn't answer my earlier question, about whether you used only the Stylesheet, or if you used his templates As you used something that you got from Kawasaki. I may know the source of the issue, now that I cogitate on it a bit. Did you use his APE template? And you used his styles? Like the ChapterNumber style? And "Chapter Title?" This APE template is one of my grievances with that book and his templates--they used paragraph classes (styles) for what should be HEADINGS. And thus...your file is inheriting the default, first-line indent for paragraph styles. This problem in rendering can be fixed in 5 minutes or so. You can skip the next paragraph if you don't want to fix them now, which I can certainly understand, but for anyone who comes along later:
I'm importing directly from DOCX into Calibre without any intermediate steps. Whatever stylesheets Calibre gets were created by Word without my direct participation, except by defining and using styles as much as possible to reduce the complexity of the document.
Quote:
Regex the paragraph class and replace it with an H class, e.g., (p class = "section" to h2 class="section") give the H class a suitable name (same name, for that matter, as shown above) and then make sure you use the correct class in the CSS. The styling may even already be available, if it outputs as .section. You may only have to add the heading class to the CSS. Bada-Bing, it ought to be fixed. I'm guessing, of course, because I don't have your book in front of me, but...I've seen this before. With folks that use named PARAGRAPH classes for what should be structural heading classes. They confuse what something looks like--a chapter head--with what it is--a chapter head.
Given that there could potentially be a large number of cycles in the polishing phase, I prefer to assert my wishes in the Word source document. The only manual remedial steps I'm willing to consider at this point are ones that I can't achieve any other way.
  • One of these exceptions is that I post-process the ePub using BBEdit to lock in my font-family definitions using the !important qualifier.
  • Based on something you said about guarding against font stripping, I'm anticipating perhaps one more such exception but don't yet know what that might be.

Quote:
Did you use a foundry font? I'm merely curious; I'm not the font police. Although, of course, I do indeed like to see IP licensed properly. Did you subset your font?
Right now I'm using the fonts included in Word.
  • Do I need to license those separately if I'm going to use them in an eBook? Monotype Corsiva, for example.
I will use foundry fonts where needed by law. Yes, I subset my embedded fonts using Calibre.
Quote:
The font retention/rendering is one of my curiosities, indeed--if your upload retains the fonts. There have been murmurings that Amazon fixed the issue, but we're not taking any chances at my shop, we're still using our secret sauce workaround.
Due in part to tax season, I’ve had to push this project down a few frames on my stack lately but will be happy to let you know the upload results when I have them.
Quote:
I look forward to hearing back on your upload results. Was I clear enough about the indentation thing?
Yes, I understand now about the indents that I never asked for. Besides taking the numbers out altogether as I did in one of my 2 books, another way to outmaneuver automated structuring is to use words in place of numbers - One, Two, Three, etc. - which I was already doing in the other of my 2 books, again because it looks better in that book. I know it sounds extreme but as I said, I do like the result and there's no way the automated format-bots in the conversion code can figure out what I'm doing and change it.
Quote:
Hitch
DLSieving is offline   Reply With Quote