View Single Post
Old 09-29-2021, 01:20 PM   #24
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by gryzor2327 View Post
Hi,
Hey. Welcome to MR.

Quote:
Originally Posted by gryzor2327 View Post
I am quite new into the business of producing ebooks, so I apologize in advance if my questions are going to be obvious or naive.
In the future, you may want to post these technical questions in the Workshop forum instead.

I stumbled upon this topic by complete chance.

Quote:
Originally Posted by gryzor2327 View Post
I have a history of producing PDF books, from latex. [...]


Quote:
Originally Posted by gryzor2327 View Post
I don't undertand why the rendering is so different between calibre and the device itself. I don't know where to start in order to enhance the rendering on mobile device.
Calibre's reader is extremely forgiving with bad code...

It's like a browser. It's able to take piles of garbage (no matter how bad) and turn it into reasonable stuff.

It DOES NOT match actual ereaders (Kobo, Nook, Kindle, [...]) though.

* * *

Similar situation with pandoc's EPUB output.

Yes, it may generate "valid EPUBs", but not something that will play nice across many devices.

You'd have to do lots of massaging if you wanted an EPUB that's more compatible across a wide variety of actual devices out there.

Examples (Usability)

1. Like you could see with your backlinks:

↩︎

many devices/fonts will not have that character. Maybe substitute with a "[^]" instead?

2. Or your footnotes are right next to each other:

Code:
<a href="#fn7" class="footnote-ref" id="fnref7" epub:type="noteref">7</a><a href="#fn8" class="footnote-ref" id="fnref8" epub:type="noteref">8</a>
this will be impossible to click. (And it looks like a superscript "78".)

What I highly recommended is changing footnotes into non-superscript + brackets:

[7][8]

This will allow users on touch devices to actually press the tiny links with their fat fingers!

So you'd want to adjust your HTML + CSS:

Code:
<a href="#fn7" class="footnote-ref" id="fnref7" epub:type="noteref">[7]</a>
Code:
a.footnote-ref {
  vertical-align: super; <--- Remove this line
}
LaTeX Side Note: How does it look in the Print PDF? Typically, there's a comma between the superscript numbers:

- <sup>7,8</sup>

with some LaTeX classes (scrbook), this type of footnote-next-to-footnote is taken care of automatically. Others, you'd have to manually adjust.

How is this type of situation handled in French typography?

Quote:
Originally Posted by gryzor2327 View Post
I should have mentionned I'm only distributing ebooks from a website. I am not using the Amazon/kindle marketplaces.
What you'll want to do is offer 2+ files:
  • EPUB
    • Works on all non-Amazon devices.
    • Kobo, Nook, [...]
  • MOBI
    • Works on Amazon devices.
    • Kindle
  • PDF (Optional)
    • If they want to match the Print book

Users will then be able to download whatever format they prefer.

Side Note: You can convert your EPUB->MOBI using Kindle Previewer.

This creates a special "Dual MOBI". (This is a KF7 + KF8 version mixed in one file.)

Really old Kindles will load the KF7 portion. Newer Kindles will load the KF8.

(Don't get this confused with Calibre's MOBI. Calibre uses slightly different names. More details can be found in 2020: "Uploading a dual mobi format")

Quote:
Originally Posted by Doitsu View Post
FYI: Your book violates some French typography conventions.

[...]

(Since many fonts don't have glyphs for narrow no-break spaces, most book designers use non-breaking spaces or regular spaces.)
Yep. Another issue is the spaced punctuation like:

Code:
le criminel international ; assoiffée

Vansittart et du style qu’il employait :

« guerre de l’opium »
could break across lines like this in the ebook:

Code:
le criminel international
; assoiffée

Vansittart et du style qu’il employait
:

«
guerre de l’opium »
I've written about French spacing in ebooks extensively over the years:

In EPUB + HTML

Technically, the most correct space before/after French punctuation would be a:
  • NARROW NO-BREAK SPACE (U+202F)

but in real life, most people settle for:
  • THIN SPACE (U+2009)

and cross their fingers, hoping the program renders correctly. (LaTeX/InDesign makes that non-breaking too.)

But in French ebooks, for max compatibility, you'd have to settle on the:
  • NO-BREAK SPACE (U+00A0)
    • &nbsp; (EPUB2) or &160; (EPUB3)

EPUB3:

Code:
le criminel international&160;; assoiffée

Vansittart et du style qu’il employait&160;:

«&160;guerre de l’opium&160;»
You can see the difference here:
  • « guerre de l’opium » <--- Normal Spaces
  • « guerre de l’opium » <--- Thin Spaces
    • This is what typographers use + French typography demands.
  • « guerre de l’opium » <--- Narrow No-Break Spaces
    • The "most correct" Unicode character for French, but barely anybody does this. Plus it's broken/missing in many fonts/programs.

Way more technical details and thorough testing can be found in the above threads.

In LaTeX

French spacing is already taken care of automatically by packages (like polyglossia, babel, microtype, etc.) + setting the proper language.

If you wanted to manually add a thin space, you use the:
  • \,
    • Thin Space (it's already non-breaking in LaTeX)

Code:
le criminel international\,; assoiffée

Vansittart et du style qu’il employait\,:

«\,guerre de l’opium\,»
I'm unsure how pandoc interacts with all of this stuff though (or if it does French non-breaking spaces).

Maybe there's a French-specific option to feed into pandoc. (I haven't done much LaTeX->EPUB, and haven't thoroughly tested exactly what pandoc's output looks like.)

Quote:
Originally Posted by gryzor2327 View Post
To be concrete, I am attaching an ebook from my production, which produces such effects.
A few random notes as I skimmed through:

1. Caught one typo:

expirpated -> extirpated
- The twin roots of all our evils, Nazi tyranny and Prussian militarism, must be expirpated.

2. You'll want to use EN DASHES between number ranges. Like this:
  • ✗ 1914-1918
  • ✓ 1914–1918

One way you type EN DASHES in your original LaTeX document is by using "--":
  • 1914--1918 (LaTeX)

If you're using LaTeX... you should pay special attention to creating typographically superior documents.

Last edited by Tex2002ans; 09-29-2021 at 01:34 PM.
Tex2002ans is offline   Reply With Quote