Quote:
Originally Posted by Sargont
Prepare a small ePub with the two versions of Alef, to distinguish the behavior of both.
Thanks for your advice.
|
Thanks for the sample EPUB! Very helpful.
If you tested your EPUB in Adobe Digital Editions (ADE), you would also see that the hebrew alef completely confused it:
Quote:
Originally Posted by Sargont
Regarding the use of specific typography for mathematics, I think that implies that it must be embedded in the epub, so that everyone can read the text correctly. Is it so?
|
Yes. When you work with rarer characters (obscure maths, polytonic greek, [...]), many of the devices probably won't have a font that includes them. They could appear as a blank box or ? or �.
I would recommend wrapping your formulas in a class like this:
Code:
<p class="p5">En la cual <span class="t8">n</span> representa un número finito cualquiera.</p>
<p class="p0">Asimismo.</p>
<p class="formula">(ℵ<span class="t3">0</span>)<sup>2</sup> = ℵ<span class="t3">0</span> <span class="t7">x</span> ℵ<span class="t3">0</span> = ℵ<span class="t3">0</span></p>
<p class="p2">y, por lo tanto.</p>
<p class="formula">(ℵ<span class="t3">0</span>)<span class="t10">n</span> = ℵ<span class="t3">0</span></p>
<p class="p2">donde <span class="t8">n</span> es un número natural finito.</p>
and this in your CSS:
Code:
p.formula {
font-family: "STIX Two Math",serif; // This is the important line where you set your font
text-indent: 0;
text-align: center;
margin-top: .25em;
margin-bottom: .25em;
}
That would allow the font to change only for formulas.
Then what you would want to do, is "Embed the Font" into the EPUB + optionally do "Font Subsetting".
If you aren't comfortable with CSS, Calibre's Editor makes embedding+subsetting fonts pretty easy:
https://manual.calibre-ebook.com/edi...ferenced-fonts
or there are many other topics discussing how to do it manually, like this one:
https://www.mobileread.com/forums/sh...d.php?t=175609
You have to add the font into your EPUB and add a "src: url("../Fonts/Example.otf");" line into your CSS classes + @font-face.
Side Note: You may want to take the above steps even further. To make all the variables/math match, you could include them ALL as a different font:
Spoiler:
Code:
<p class="p5">En la cual <span class="ivar">n</span> representa un número finito cualquiera.</p>
<p class="p0">Asimismo.</p>
<p class="formula">(ℵ<sub>0</sub>)<sup>2</sup> = ℵ<sub>0</sub> <span class="ivar">x</span> ℵ<sub>0</sub> = ℵ<sub>0</sub></p>
<p class="p2">y, por lo tanto.</p>
<p class="formula">(ℵ<sub>0</sub>)<sup><span class="ivar">n</span></sup> = ℵ<sub>0</sub></p>
<p class="p2">donde <span class="ivar">n</span> es un número natural finito.</p>
and this CSS:
Code:
p.formula {
font-family: "STIX Two Math",serif;
text-indent: 0;
text-align: center;
margin-top: .25em;
margin-bottom: .25em;
}
span.ivar { // This would be used when you need italic variables in the text
font-family: "STIX Two Math",serif;
font-style: italic;
}
span.var { // This would be used when you need non-italic variables in the text
font-family: "STIX Two Math",serif;
}
Depending on how familiar you are with Word, and how clean your document is, this may be something easier to adjust there.
Side Note #2: You seem to be working with some very heavy maths... did you ever hear of LaTeX?