Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 08-30-2017, 10:03 AM   #1
Sargont
Junior Member
Sargont began at the beginning.
 
Sargont's Avatar
 
Posts: 5
Karma: 10
Join Date: Aug 2017
Location: Argentina
Device: Kindle
Hebrew letter

When preparing a math book in Word, on infinites, I must use the Hebrew letter aleph and with subscripts 0, 1, 2, etc. And occasionally in parentheses.
When opening the final ebook in Sigil to give definitive format (and also in other readers), the equation appears "broken": the subscript to the left instead of to the right, the closing parenthesis also to the left ...
Then I noticed that, being the Hebrew writing from right to left, reverses the position of the characters.
Is there any way to prevent this?
I have provisionally replaced the character with an image.
Sargont is offline   Reply With Quote
Advert
Old 08-30-2017, 10:32 PM   #2
Tex2002ans
Guru
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: 913
Karma: 5521337
Join Date: Jul 2012
Device: Nook
Do you happen to have sample code or EPUB to show this off?
Tex2002ans is offline   Reply With Quote
Old 08-31-2017, 12:04 PM   #3
Sargont
Junior Member
Sargont began at the beginning.
 
Sargont's Avatar
 
Posts: 5
Karma: 10
Join Date: Aug 2017
Location: Argentina
Device: Kindle
Thanks, but I have minutely checked the Times New Roman character / symbol table in Word, and found that the letter aleph has "common" version with Unicode 2135, and the Hebrew alphabet is Unicode 05D0.

In the screenshot, the line highlighted in blue has the aleph in Hebrew alphabet.
Thank you as well.
regards
Sargont is offline   Reply With Quote
Old 08-31-2017, 12:11 PM   #4
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 51,588
Karma: 185850154
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage, Yotaphone 2
Use the U+2135 aleph, as that one is the correct one for use in mathematics.
pdurrant is offline   Reply With Quote
Old 08-31-2017, 01:00 PM   #5
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 4,003
Karma: 12185612
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by pdurrant View Post
Use the U+2135 aleph, as that one is the correct one for use in mathematics.
That's indeed the correct character, however, most standard fonts don't contain it.
Sargont
will also have to embed a suitable font, e.g. DejaVu Sans or Linux Libertine.
Doitsu is offline   Reply With Quote
Advert
Old 08-31-2017, 03:55 PM   #6
Tex2002ans
Guru
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: 913
Karma: 5521337
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by Sargont View Post
Thanks, but I have minutely checked the Times New Roman character / symbol table in Word, and found that the letter aleph has "common" version with Unicode 2135, and the Hebrew alphabet is Unicode 05D0.

[...]

In the screenshot, the line highlighted in blue has the aleph in Hebrew alphabet.
Thank you as well.
regards
Sorry if I wasn't specific enough. I meant pasting the code into the forums using [CODE][/CODE] (when you are writing your post in the Advanced Reply, the button looks like a #):

Code:
<p class="equation">Example e = mc<sup>2</sup></p>
Or just creating a little EPUB to show off the problem and attaching it to a post so others can test the problem much easier.

There are a whole lot of things that could have been the problem here:

It could be you used the wrong character (which seems to be the case, as pdurrant and Doitsu pointed out).

It could actually be a bug in Sigil.

It could be you had the EPUB's or HTML's lang marked improperly. Or you accidentally had CSS "direction: rtl;" somewhere.

Could have been invisible Unicode characters lurking in your code.

[...]

Quote:
Originally Posted by Doitsu View Post
That's indeed the correct character, however, most standard fonts don't contain it. Sargont will also have to embed a suitable font, e.g. DejaVu Sans or Linux Libertine.
Or the STIX Fonts:

http://www.stixfonts.org/

That font probably includes every single maths character you would ever need. (It is one of the few that also handles actual OpenType Math.)

Last edited by Tex2002ans; 08-31-2017 at 04:02 PM.
Tex2002ans is offline   Reply With Quote
Old 08-31-2017, 10:12 PM   #7
Sargont
Junior Member
Sargont began at the beginning.
 
Sargont's Avatar
 
Posts: 5
Karma: 10
Join Date: Aug 2017
Location: Argentina
Device: Kindle
Prepare a small ePub with the two versions of Alef, to distinguish the behavior of both.
Thanks for your advice.

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?
Attached Files
File Type: epub Alef.epub (3.0 KB, 15 views)
Sargont is offline   Reply With Quote
Old 08-31-2017, 11:23 PM   #8
Tex2002ans
Guru
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: 913
Karma: 5521337
Join Date: Jul 2012
Device: 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:	32
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 11:28 PM.
Tex2002ans is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura Hebrew dictionary and keyboard elazarcoh Kobo Reader 3 06-14-2016 01:03 PM
PW2 Hebrew keyboard? user743 Kindle Developer's Corner 1 04-09-2014 04:50 AM
Calibre in Hebrew doto Development 5 06-06-2013 06:08 AM
Free (Kindle) English-Hebrew Hebrew-English arcadata Deals, Freebies, and Resources (No Self-Promotion) 0 12-01-2010 06:46 AM
Classic Hebrew fonts udiko Barnes & Noble NOOK 0 07-26-2010 03:20 PM


All times are GMT -4. The time now is 10:48 PM.


MobileRead.com is a privately owned, operated and funded community.