![]() |
#1 |
Banned
![]() Posts: 23
Karma: 10
Join Date: Apr 2020
Device: none
|
Formulas alignment
I am creating an epub3 of mathematical argument, using mathml for formulas.
How do you write a block of formulas one below the other all aligned on the left and not centered? |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,124
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Is your eBook possibly going to be read on ePub readers that do not understand MathML, you'd be better off using SVG for the math.
|
![]() |
![]() |
![]() |
#3 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,312
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Unfortunately a lot of readers have issues with SVG in the body of the book. Fairly soon you should have someone on here familiar with ePub3 and MathML that can answer your question...sorry it isn't me!
|
![]() |
![]() |
![]() |
#4 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,124
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If you plan on this eBook being read on ePub 2 software that won't understand MathML, then SVG is the best solution. SVG will work in more situations where MathML won't.
|
![]() |
![]() |
![]() |
#5 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
There is a converter at https://sourceforge.net/projects/svgmath/ that will make SVG from MathML
Dale |
![]() |
![]() |
![]() |
#6 |
Banned
![]() Posts: 23
Karma: 10
Join Date: Apr 2020
Device: none
|
it seems to me that if i use an image to "draw" the formulas (svg or any other type) the Image remains the same size even if the user changes the font size, or am i wrong?
How can you keep the size of the image proportional to that of the font? |
![]() |
![]() |
![]() |
#7 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,312
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Images can be resized if you define them relative to font-size:
Code:
img {width:2em}
<img alt="" src="test.png" />
Instead, I would define the image based on how much screen real-estate I wanted it to take up - in percent: Code:
img {width:95%} <img alt="" src="test.jpg" /> Code:
img {width:95%; max-width:400px}
<img alt="" src="test.png" />
I would also add in other styling to make the image look good...of course, all that is strictly to what YOU think looks good. Here is an example: Code:
div.image {margin:2em auto; font-size:.6em; text-indent:0; text-align:center} div.image img {display:block; margin:0 0 .25em; width:95%; max-width:400px} <div class="image"><img alt="" src="test.png" />Caption for this image</div> |
![]() |
![]() |
![]() |
#8 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,124
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
img [ max-width: 100%; } |
|
![]() |
![]() |
![]() |
#9 | ||
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,312
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Try actually reading what was posted.... Quote:
In other words..... I don't CARE what resolution your screen is. If you have a 400 pixel wide image and you try to expand it to 1710 pixels (95% of an 1800 pixel wide screen) then it will get over-blown and pixelated and fuzzy...unless it's an SVG. (yes, I know you would say 'just use a higher resolution image'...but that's not the point if they don't have said higher resolution image!) To protect against that...put a max-width....jeeze...i feel like I've said all this somewhere before... Last edited by Turtle91; 06-22-2020 at 12:29 PM. |
||
![]() |
![]() |
![]() |
#10 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
As explained elsewhere, "px" is an absolute unit, independent of the actual resolution. 400px is approximately 4.2 in or 10.5 cm. Whether or not is small depends on the distance you view it at, not on the resolution of the device... unless the device is defective/broken/non-compliant, then it could be whatever[*]
[*] I remember my first Cybook, it used to display PDFs as if the screen were A4 size (which it wasn't). I created a PDF set for its screen size (the usual 9x12 cm), and when displayed at "100%" magnification it was tiny. This was a defective device. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tutorial: Formulas to PNG | Tex2002ans | ePub | 19 | 08-29-2014 07:10 PM |
eBook with formulas | aodor | Workshop | 13 | 11-18-2011 05:29 AM |
Math formulas conversion help | Sciamano | Conversion | 10 | 06-22-2011 06:33 AM |
conversion of formulas | paola | Writer2ePub | 5 | 01-03-2011 03:07 PM |
What were the formulas for determining TOC | lunixer | Calibre | 2 | 08-16-2010 11:14 AM |