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

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 06-18-2015, 02:41 PM   #1
user2178319
Junior Member
user2178319 began at the beginning.
 
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>&#x2212;</mo>
                            <mspace width="1pt"/>
                            <msup>
                                <mrow>
                                    <mrow>
                                        <mo>(</mo>
                                        <mrow>
                                            <mn>1</mn>
                                            <mo>&#x2212;</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>
And here is my current CSS:

Code:
math{
    font-family:'Asana-Math','Cambria Math', Cambria, MathJax_Main, 
	             STIXGeneral, OpenSymbol, serif !important;
    font-size: 100% !important;
    width:80% !important;
}
Any help on this matter would be enormously appreciated, I would like to keep the MathML without re-sizing each equation and without forcing linebreaks.
Attached Thumbnails
Click image for larger version

Name:	photo.PNG
Views:	343
Size:	82.1 KB
ID:	139414  
user2178319 is offline   Reply With Quote
Old 07-01-2015, 08:04 AM   #2
jwlewis
Junior Member
jwlewis began at the beginning.
 
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.
jwlewis is offline   Reply With Quote
Advert
Reply

Tags
mathml

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 05:50 AM.


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