![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: May 2015
Device: Kobo
|
dynamically scale MathML equations
Hello,
I have an EPUB3 that includes a lot of MathML. I would prefer to not use flat figure because we already have the MathML. it's showing up in iBooks, which is good, but the longer equations are breaking onto new lines and gernerally rendering poorly. Is there a way I can manipulate the CSS to have it scale proportionally? Here is my current code for one of the example equations: Code:
<p class="TxtC">Or, more simply:</p> <div class="equation-grp"><div class="equation"><p class="Eqn"><epub:switch> <epub:case required-namespace="http://www.w3.org/1998/Math/MathML"> <math xmlns='http://www.w3.org/1998/Math/MathML' overflow="scroll" xref="c003.e008-mml" id="c003.e008-mml"> <mrow> <msub> <mrow> <mtext>Cumulative Incidence</mtext> </mrow> <mrow> <mn>2</mn> <mspace width="1pt"/> <mtext>years</mtext> </mrow> </msub> <mo>=</mo> <mn>1</mn> <mo>−</mo> <mspace width="1pt"/> <msup> <mrow> <mrow> <mo>(</mo> <mrow> <mn>1</mn> <mo>−</mo> <mtext>Annual Incidence Proportion</mtext> </mrow> <mo>)</mo> </mrow> </mrow> <mn>2</mn> </msup> </mrow> </math> </epub:case> <epub:default> <img id="test_equation-c003.e008" alt="c003.e008" src="../Images/9781550595734.c003.e008.jpg"/> </epub:default> </epub:switch></p></div></div> <p class="TxtC">And this leads to a more general way of anticipating cumulative incidence over a set of risk intervals:</p> Code:
math{ font-family:'Asana-Math','Cambria Math', Cambria, MathJax_Main, STIXGeneral, OpenSymbol, serif !important; font-size: 100% !important; width:80% !important; } |
![]() |
![]() |
![]() |
#2 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: May 2015
Device: iPad
|
I looked at your long equation in FireFox, iBooks, Kobo for iPad/iPhone, and Gitden Readers. I think the problem is that the equation is just too long. It renders OK in FireFox, but not in the other readers. I suggest abbreviating "Cumulative Incidence" to "CI" and "Annual Incidence Proportion" to "AIP". That would shorten the equation and maybe keep it on one line.
|
![]() |
![]() |
Advert | |
|
![]() |
Tags |
mathml |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ADE 4 - MathML expressions | RbnJrg | ePub | 8 | 05-23-2015 06:40 PM |
Metadata(_('Unknown')) : How To Dynamically Add Custom Columns To Definition | DaltonST | Development | 11 | 08-27-2014 01:29 AM |
Aura HD MathML and some other question | lilheliottin | Kobo Reader | 5 | 05-30-2013 07:37 AM |
MathML TO SVG | saravanan.p | ePub | 2 | 08-11-2011 11:38 AM |
MathML | saravanan.p | ePub | 10 | 08-09-2011 01:13 PM |