Thread: Hebrew letter
View Single Post
Old 08-31-2017, 10:23 PM   #8
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,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Sargont View Post
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:

Click image for larger version

Name:	ADEAlef.png
Views:	271
Size:	37.7 KB
ID:	158778

Quote:
Originally Posted by Sargont View Post
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?

Last edited by Tex2002ans; 08-31-2017 at 10:28 PM.
Tex2002ans is offline   Reply With Quote