public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* MathML to LaTeX producing extremely lossy output, especially with quotients
@ 2016-11-01 20:38 Kevin Vilbig
       [not found] ` <48401935-a82d-44e6-afa5-810c580f9edf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Vilbig @ 2016-11-01 20:38 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 11678 bytes --]

I am attempting to translate some MathML snipped from .docx files in 
Microsoft Word to LaTeX in order to make accessible materials for some 
visually impaired students. I was hoping to do it this way so that we could 
provide them with both a screen-readable HTML file AND a Nemeth Braille 
Transcription so as to give them multiple forms of presentation to avoid 
any issues with inaccurate translation or our mistakes.

I'm going to give up on this route and try something else, maybe trying to 
translate the whole docx file directly, or copying the MathType output 
straight to LaTeX.

$ pandoc --mathjax -f html -t latex exam2.htm
Powers of X Rule\\
if f( x )= x n then f ′ ( x )=n ( x ) n−1\\
Constant Rule\\
if f( x )=C then f ′ ( x )=0\\
Coefficient Rules\\
if f(x)=c•u(x) then f ′ ( x )=c• u ′ ( x )\\
if f(x)=k x n then f ′ (x)=kn x n−1\\
if f(x)=kx then f ′ (x)=k\\
Sum Rule\\
if f( x )=u( x )+v( x ) then f ′ ( x )= u ′ ( x )+ v ′ ( x )\\
Difference Rule\\
if f( x )=u( x )−v( x ) then f ′ ( x )= u ′ ( x )− v ′ ( x )\\
Product Rule\\
if f( x )=u( x )•v( x ) then f ′ ( x )=u( x )• v ′ ( x )+v( x )• u ′ ( x
)\\
Quotient Rule\\
if f( x )= u( x ) v( x ) then f ′ ( x )= v( x )• u ′ ( x )−u( x )• v ′ (
x ) ( v( x ) ) 2\\
Chain Rule or Power Rule\\
if f( x )= ( u( x ) ) n then f ′ ( x )=n ( u( x ) ) n−1 • u ′ ( x )\\
Logarithms\\
ln(MN)=lnM+lnN\\
ln( M N )=lnM−lnN\\
ln( M N )=NlnM\\
Derivative of Natural Log\\
if y = ln(x) then y ′ = 1 x\\
if y = ln u(x) then y ′ = 1 u(x) • u ′ (x)\\
Derivative of Exponential Function\\
if y= e x then y ′ = e x\\
if y= e u(x) then y ′ = e u(x) • u ′ (x)\\[2\baselineskip]


Here is the contents of exam2.htm

<html>Powers of X Rule<br>
if <math display='inline'>
 <mrow>
  <mi>f</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><msup>
   <mi>x</mi>
   <mi>n</mi>
  </msup>
  
 </mrow>
</math> then <math display='inline'>
 <mrow>
  <msup>
   <mi>f</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><mi>n</mi><msup>
   <mrow>
    <mrow><mo>(</mo>
     <mi>x</mi>
    <mo>)</mo></mrow>
   </mrow>
   <mrow>
    <mi>n</mi><mo>&#x2212;</mo><mn>1</mn>
   </mrow>
  </msup>
  
 </mrow>
</math>
<br>
Constant Rule<br>
if <math display='inline'>
 <mrow>
  <mi>f</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><mi>C</mi>
 </mrow>
</math> then <math display='inline'>
 <mrow>
  <msup>
   <mi>f</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><mn>0</mn>
 </mrow>
</math>
<br>
Coefficient Rules<br>
if <math display='inline'>
 <mrow>
  <mi>f</mi><mo stretchy='false'>(</mo><mi>x</mi><mo 
stretchy='false'>)</mo><mo>=</mo><mi>c</mi><mo>&#x2022;</mo><mi>u</mi><mo 
stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo>
 </mrow>
</math> then <math display='inline'>
 <mrow>
  <msup>
   <mi>f</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><mi>c</mi><mo>&#x2022;</mo><msup>
   <mi>u</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow>
 </mrow>
</math>
<br>if<math display='inline'>
 <mrow>
  <mi>f</mi><mo stretchy='false'>(</mo><mi>x</mi><mo 
stretchy='false'>)</mo><mo>=</mo><mi>k</mi><msup>
   <mi>x</mi>
   <mi>n</mi>
  </msup>
  
 </mrow>
</math>
then<math display='inline'>
 <mrow>
  <msup>
   <mi>f</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mo stretchy='false'>(</mo><mi>x</mi><mo 
stretchy='false'>)</mo><mo>=</mo><mi>k</mi><mi>n</mi><msup>
   <mi>x</mi>
   <mrow>
    <mi>n</mi><mo>&#x2212;</mo><mn>1</mn>
   </mrow>
  </msup>
  
 </mrow>
</math>
<br>if<math display='inline'>
 <mrow>
  <mi>f</mi><mo stretchy='false'>(</mo><mi>x</mi><mo 
stretchy='false'>)</mo><mo>=</mo><mi>k</mi><mi>x</mi>
 </mrow>
</math> then <math display='inline'>
 <mrow>
  <msup>
   <mi>f</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mo stretchy='false'>(</mo><mi>x</mi><mo 
stretchy='false'>)</mo><mo>=</mo><mi>k</mi>
 </mrow>
</math><br>



Sum Rule<br>
if<math display='inline'>
 <mrow>
  <mi>f</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>+</mo><mi>v</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow>
 </mrow>
</math>
then<math display='inline'>
 <mrow>
  <msup>
   <mi>f</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><msup>
   <mi>u</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>+</mo><msup>
   <mi>v</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow>
 </mrow>
</math>
<br>


Difference Rule<br>
if<math display='inline'>
 <mrow>
  <mi>f</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>&#x2212;</mo><mi>v</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow>
 </mrow>
</math>
then<math display='inline'>
 <mrow>
  <msup>
   <mi>f</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><msup>
   <mi>u</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>&#x2212;</mo><msup>
   <mi>v</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow>
 </mrow>
</math>
<br>
Product Rule<br>
if<math display='inline'>
 <mrow>
  <mi>f</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>&#x2022;</mo><mi>v</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow>
 </mrow>
</math>
then<math display='inline'>
 <mrow>
  <msup>
   <mi>f</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
   <mi>v</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>+</mo><mi>v</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
   <mi>u</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow>
 </mrow>
</math>
<br>
Quotient Rule<br>
if<math display='inline'>
 <mrow>
  <mi>f</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><mfrac>
   <mrow>
    <mi>u</mi><mrow><mo>(</mo>
     <mi>x</mi>
    <mo>)</mo></mrow>
   </mrow>
   <mrow>
    <mi>v</mi><mrow><mo>(</mo>
     <mi>x</mi>
    <mo>)</mo></mrow>
   </mrow>
  </mfrac>
  
 </mrow>
</math>
then<math display='inline'>
 <mrow>
  <msup>
   <mi>f</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><mfrac>
   <mrow>
    <mi>v</mi><mrow><mo>(</mo>
     <mi>x</mi>
    <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
     <mi>u</mi>
     <mo>&#x2032;</mo>
    </msup>
    <mrow><mo>(</mo>
     <mi>x</mi>
    <mo>)</mo></mrow><mo>&#x2212;</mo><mi>u</mi><mrow><mo>(</mo>
     <mi>x</mi>
    <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
     <mi>v</mi>
     <mo>&#x2032;</mo>
    </msup>
    <mrow><mo>(</mo>
     <mi>x</mi>
    <mo>)</mo></mrow>
   </mrow>
   <mrow>
    <msup>
     <mrow>
      <mrow><mo>(</mo>
       <mrow>
        <mi>v</mi><mrow><mo>(</mo>
         <mi>x</mi>
        <mo>)</mo></mrow>
       </mrow>
      <mo>)</mo></mrow>
     </mrow>
     <mn>2</mn>
    </msup>
    
   </mrow>
  </mfrac>
  
 </mrow>
</math>
<br>
Chain Rule or Power Rule<br>
if<math display='inline'>
 <mrow>
  <mi>f</mi><mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><msup>
   <mrow>
    <mrow><mo>(</mo>
     <mrow>
      <mi>u</mi><mrow><mo>(</mo>
       <mi>x</mi>
      <mo>)</mo></mrow>
     </mrow>
    <mo>)</mo></mrow>
   </mrow>
   <mi>n</mi>
  </msup>
  
 </mrow>
</math>
then<math display='inline'>
 <mrow>
  <msup>
   <mi>f</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow><mo>=</mo><mi>n</mi><msup>
   <mrow>
    <mrow><mo>(</mo>
     <mrow>
      <mi>u</mi><mrow><mo>(</mo>
       <mi>x</mi>
      <mo>)</mo></mrow>
     </mrow>
    <mo>)</mo></mrow>
   </mrow>
   <mrow>
    <mi>n</mi><mo>&#x2212;</mo><mn>1</mn>
   </mrow>
  </msup>
  <mo>&#x2022;</mo><msup>
   <mi>u</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mrow><mo>(</mo>
   <mi>x</mi>
  <mo>)</mo></mrow>
 </mrow>
</math>
<br>
Logarithms<br>
<math display='inline'>
 <mi>ln</mi><mo stretchy='false'>(</mo><mi>M</mi><mi>N</mi><mo 
stretchy='false'>)</mo><mo>=</mo><mi>ln</mi><mi>M</mi><mo>+</mo><mi>ln</mi><mi>N</mi>
</math>
<br>
<math display='inline'>
 <mi>ln</mi><mrow><mo>(</mo>
  <mrow>
   <mfrac>
    <mi>M</mi>
    <mi>N</mi>
   </mfrac>
   
  </mrow>
 <mo>)</mo></mrow><mo>=</mo><mi>ln</mi><mi>M</mi><mo>&#x2212;</mo><mi>ln</mi><mi>N</mi>
</math>
<br>
<math display='inline'>
 <mi>ln</mi><mrow><mo>(</mo>
  <mrow>
   <msup>
    <mi>M</mi>
    <mi>N</mi>
   </msup>
   
  </mrow>
 <mo>)</mo></mrow><mo>=</mo><mi>N</mi><mi>ln</mi><mi>M</mi>
</math>

<br>
Derivative of Natural Log<br>
if y = ln(x) then <math display='inline'>
 <mrow>
  <msup>
   <mi>y</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mo>=</mo><mfrac>
   <mn>1</mn>
   <mi>x</mi>
  </mfrac>
  
 </mrow>
</math>
<br>
if y = ln u(x) then<math display='inline'>
 <mrow>
  <msup>
   <mi>y</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mo>=</mo><mfrac>
   <mn>1</mn>
   <mrow>
    <mi>u</mi><mo stretchy='false'>(</mo><mi>x</mi><mo 
stretchy='false'>)</mo>
   </mrow>
  </mfrac>
  <mo>&#x2022;</mo><msup>
   <mi>u</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo>
 </mrow>
</math>
<br>

Derivative of Exponential Function<br>
if <math display='inline'>
 <mrow>
  <mi>y</mi><mo>=</mo><msup>
   <mi>e</mi>
   <mi>x</mi>
  </msup>
  
 </mrow>
</math>
then <math display='inline'>
 <mrow>
  <msup>
   <mi>y</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mo>=</mo><msup>
   <mi>e</mi>
   <mi>x</mi>
  </msup>
  
 </mrow>
</math>
<br>
if <math display='inline'>
 <mrow>
  <mi>y</mi><mo>=</mo><msup>
   <mi>e</mi>
   <mrow>
    <mi>u</mi><mo stretchy='false'>(</mo><mi>x</mi><mo 
stretchy='false'>)</mo>
   </mrow>
  </msup>
  
 </mrow>
</math>
then <math display='inline'>
 <mrow>
  <msup>
   <mi>y</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mo>=</mo><msup>
   <mi>e</mi>
   <mrow>
    <mi>u</mi><mo stretchy='false'>(</mo><mi>x</mi><mo 
stretchy='false'>)</mo>
   </mrow>
  </msup>
  <mo>&#x2022;</mo><msup>
   <mi>u</mi>
   <mo>&#x2032;</mo>
  </msup>
  <mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo>
 </mrow>
</math>
<br>
<br>
</html>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/48401935-a82d-44e6-afa5-810c580f9edf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 20766 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MathML to LaTeX producing extremely lossy output, especially with quotients
       [not found] ` <48401935-a82d-44e6-afa5-810c580f9edf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2016-11-01 22:15   ` John MacFarlane
  2016-11-02 13:36   ` John MacFarlane
  1 sibling, 0 replies; 4+ messages in thread
From: John MacFarlane @ 2016-11-01 22:15 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Rather than giving us the entire input and the entire
output, it would be far more helpful if you'd highlight
specific formulas that didn't get translated correctly,
giving for each the mathml input, the tex pandoc produces,
and the tex that you think would be better.

Also please give the output fo pandoc --version.

+++ Kevin Vilbig [Nov 01 16 13:38 ]:
>   I am attempting to translate some MathML snipped from .docx files in
>   Microsoft Word to LaTeX in order to make accessible materials for some
>   visually impaired students. I was hoping to do it this way so that we
>   could provide them with both a screen-readable HTML file AND a Nemeth
>   Braille Transcription so as to give them multiple forms of presentation
>   to avoid any issues with inaccurate translation or our mistakes.
>   I'm going to give up on this route and try something else, maybe trying
>   to translate the whole docx file directly, or copying the MathType
>   output straight to LaTeX.
>   $ pandoc --mathjax -f html -t latex exam2.htm
>   Powers of X Rule\\
>   if f( x )= x n then f ′ ( x )=n ( x ) n−1\\
>   Constant Rule\\
>   if f( x )=C then f ′ ( x )=0\\
>   Coefficient Rules\\
>   if f(x)=c•u(x) then f ′ ( x )=c• u ′ ( x )\\
>   if f(x)=k x n then f ′ (x)=kn x n−1\\
>   if f(x)=kx then f ′ (x)=k\\
>   Sum Rule\\
>   if f( x )=u( x )+v( x ) then f ′ ( x )= u ′ ( x )+ v ′ ( x )\\
>   Difference Rule\\
>   if f( x )=u( x )−v( x ) then f ′ ( x )= u ′ ( x )− v ′ ( x )\\
>   Product Rule\\
>   if f( x )=u( x )•v( x ) then f ′ ( x )=u( x )• v ′ ( x )+v( x )• u ′ (
>   x
>   )\\
>   Quotient Rule\\
>   if f( x )= u( x ) v( x ) then f ′ ( x )= v( x )• u ′ ( x )−u( x )• v ′
>   (
>   x ) ( v( x ) ) 2\\
>   Chain Rule or Power Rule\\
>   if f( x )= ( u( x ) ) n then f ′ ( x )=n ( u( x ) ) n−1 • u ′ ( x )\\
>   Logarithms\\
>   ln(MN)=lnM+lnN\\
>   ln( M N )=lnM−lnN\\
>   ln( M N )=NlnM\\
>   Derivative of Natural Log\\
>   if y = ln(x) then y ′ = 1 x\\
>   if y = ln u(x) then y ′ = 1 u(x) • u ′ (x)\\
>   Derivative of Exponential Function\\
>   if y= e x then y ′ = e x\\
>   if y= e u(x) then y ′ = e u(x) • u ′ (x)\\[2\baselineskip]
>   Here is the contents of exam2.htm
>   <html>Powers of X Rule<br>
>   if <math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><msup>
>      <mi>x</mi>
>      <mi>n</mi>
>     </msup>
>
>    </mrow>
>   </math> then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>n</mi><msup>
>      <mrow>
>       <mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow>
>      </mrow>
>      <mrow>
>       <mi>n</mi><mo>&#x2212;</mo><mn>1</mn>
>      </mrow>
>     </msup>
>
>    </mrow>
>   </math>
>   <br>
>   Constant Rule<br>
>   if <math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>C</mi>
>    </mrow>
>   </math> then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mn>0</mn>
>    </mrow>
>   </math>
>   <br>
>   Coefficient Rules<br>
>   if <math display='inline'>
>    <mrow>
>     <mi>f</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo><mo>=</mo><mi>c</mi><mo>&#x2022;</mo><mi>u</mi><
>   mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo>
>    </mrow>
>   </math> then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>c</mi><mo>&#x2022;</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   <br>if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo><mo>=</mo><mi>k</mi><msup>
>      <mi>x</mi>
>      <mi>n</mi>
>     </msup>
>
>    </mrow>
>   </math>
>   then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo><mo>=</mo><mi>k</mi><mi>n</mi><msup>
>      <mi>x</mi>
>      <mrow>
>       <mi>n</mi><mo>&#x2212;</mo><mn>1</mn>
>      </mrow>
>     </msup>
>
>    </mrow>
>   </math>
>   <br>if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo><mo>=</mo><mi>k</mi><mi>x</mi>
>    </mrow>
>   </math> then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo><mo>=</mo><mi>k</mi>
>    </mrow>
>   </math><br>
>   Sum Rule<br>
>   if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>+</mo><mi>v</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>+</mo><msup>
>      <mi>v</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   <br>
>   Difference Rule<br>
>   if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>&#x2212;</mo><mi>v</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>&#x2212;</mo><msup>
>      <mi>v</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   <br>
>   Product Rule<br>
>   if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>&#x2022;</mo><mi>v</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
>      <mi>v</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>+</mo><mi>v</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   <br>
>   Quotient Rule<br>
>   if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mfrac>
>      <mrow>
>       <mi>u</mi><mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow>
>      </mrow>
>      <mrow>
>       <mi>v</mi><mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow>
>      </mrow>
>     </mfrac>
>
>    </mrow>
>   </math>
>   then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mfrac>
>      <mrow>
>       <mi>v</mi><mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
>        <mi>u</mi>
>        <mo>&#x2032;</mo>
>       </msup>
>       <mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow><mo>&#x2212;</mo><mi>u</mi><mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
>        <mi>v</mi>
>        <mo>&#x2032;</mo>
>       </msup>
>       <mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow>
>      </mrow>
>      <mrow>
>       <msup>
>        <mrow>
>         <mrow><mo>(</mo>
>          <mrow>
>           <mi>v</mi><mrow><mo>(</mo>
>            <mi>x</mi>
>           <mo>)</mo></mrow>
>          </mrow>
>         <mo>)</mo></mrow>
>        </mrow>
>        <mn>2</mn>
>       </msup>
>
>      </mrow>
>     </mfrac>
>
>    </mrow>
>   </math>
>   <br>
>   Chain Rule or Power Rule<br>
>   if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><msup>
>      <mrow>
>       <mrow><mo>(</mo>
>        <mrow>
>         <mi>u</mi><mrow><mo>(</mo>
>          <mi>x</mi>
>         <mo>)</mo></mrow>
>        </mrow>
>       <mo>)</mo></mrow>
>      </mrow>
>      <mi>n</mi>
>     </msup>
>
>    </mrow>
>   </math>
>   then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>n</mi><msup>
>      <mrow>
>       <mrow><mo>(</mo>
>        <mrow>
>         <mi>u</mi><mrow><mo>(</mo>
>          <mi>x</mi>
>         <mo>)</mo></mrow>
>        </mrow>
>       <mo>)</mo></mrow>
>      </mrow>
>      <mrow>
>       <mi>n</mi><mo>&#x2212;</mo><mn>1</mn>
>      </mrow>
>     </msup>
>     <mo>&#x2022;</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   <br>
>   Logarithms<br>
>   <math display='inline'>
>    <mi>ln</mi><mo stretchy='false'>(</mo><mi>M</mi><mi>N</mi><mo
>   stretchy='false'>)</mo><mo>=</mo><mi>ln</mi><mi>M</mi><mo>+</mo><mi>ln<
>   /mi><mi>N</mi>
>   </math>
>   <br>
>   <math display='inline'>
>    <mi>ln</mi><mrow><mo>(</mo>
>     <mrow>
>      <mfrac>
>       <mi>M</mi>
>       <mi>N</mi>
>      </mfrac>
>
>     </mrow>
>    <mo>)</mo></mrow><mo>=</mo><mi>ln</mi><mi>M</mi><mo>&#x2212;</mo><mi>l
>   n</mi><mi>N</mi>
>   </math>
>   <br>
>   <math display='inline'>
>    <mi>ln</mi><mrow><mo>(</mo>
>     <mrow>
>      <msup>
>       <mi>M</mi>
>       <mi>N</mi>
>      </msup>
>
>     </mrow>
>    <mo>)</mo></mrow><mo>=</mo><mi>N</mi><mi>ln</mi><mi>M</mi>
>   </math>
>   <br>
>   Derivative of Natural Log<br>
>   if y = ln(x) then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>y</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo>=</mo><mfrac>
>      <mn>1</mn>
>      <mi>x</mi>
>     </mfrac>
>
>    </mrow>
>   </math>
>   <br>
>   if y = ln u(x) then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>y</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo>=</mo><mfrac>
>      <mn>1</mn>
>      <mrow>
>       <mi>u</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo>
>      </mrow>
>     </mfrac>
>     <mo>&#x2022;</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo>
>    </mrow>
>   </math>
>   <br>
>   Derivative of Exponential Function<br>
>   if <math display='inline'>
>    <mrow>
>     <mi>y</mi><mo>=</mo><msup>
>      <mi>e</mi>
>      <mi>x</mi>
>     </msup>
>
>    </mrow>
>   </math>
>   then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>y</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo>=</mo><msup>
>      <mi>e</mi>
>      <mi>x</mi>
>     </msup>
>
>    </mrow>
>   </math>
>   <br>
>   if <math display='inline'>
>    <mrow>
>     <mi>y</mi><mo>=</mo><msup>
>      <mi>e</mi>
>      <mrow>
>       <mi>u</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo>
>      </mrow>
>     </msup>
>
>    </mrow>
>   </math>
>   then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>y</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo>=</mo><msup>
>      <mi>e</mi>
>      <mrow>
>       <mi>u</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo>
>      </mrow>
>     </msup>
>     <mo>&#x2022;</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo>
>    </mrow>
>   </math>
>   <br>
>   <br>
>   </html>
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/48401935-a82d-44e6-
>   afa5-810c580f9edf%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/48401935-a82d-44e6-afa5-810c580f9edf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20161101221503.GC44081%40Johns-MBP.home.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MathML to LaTeX producing extremely lossy output, especially with quotients
       [not found] ` <48401935-a82d-44e6-afa5-810c580f9edf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2016-11-01 22:15   ` John MacFarlane
@ 2016-11-02 13:36   ` John MacFarlane
       [not found]     ` <20161102133632.GA5983-BKjuZOBx5Kn2N3qrpRCZGbhGAdq7xJNKhPhL2mjWHbk@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2016-11-02 13:36 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

I see what's happening here.

First, --mathml is only relevant to HTML output, so you
can omit that.

Second, pandoc will only interpret <math> tags as mathml if they're
marked with the MathML namespace, as they are supposed to be.

If you add xmlns="http://www.w3.org/1998/Math/MathML"  to
your math tags, you'll get real tex math in the output:

Powers of X Rule\\
if \(f\left( x \right) = x^{n}\) then
\(f^{\prime}\left( x \right) = n\left( x \right)^{n - 1}\)\\
Constant Rule\\
if \(f\left( x \right) = C\) then \(f^{\prime}\left( x \right) = 0\)\\
Coefficient Rules\\
if \(f(x) = c u(x)\) then
\(f^{\prime}\left( x \right) = c u^{\prime}\left( x \right)\)\\
if\(f(x) = kx^{n}\) then\(f^{\prime}(x) = knx^{n - 1}\)\\
if\(f(x) = kx\) then \(f^{\prime}(x) = k\)\\
Sum Rule\\
if\(f\left( x \right) = u\left( x \right) + v\left( x \right)\)
then\(f^{\prime}\left( x \right) = u^{\prime}\left( x \right) + v^{\prime}\left( x \right)\)\\
Difference Rule\\
if\(f\left( x \right) = u\left( x \right) - v\left( x \right)\)
then\(f^{\prime}\left( x \right) = u^{\prime}\left( x \right) - v^{\prime}\left( x \right)\)\\
Product Rule\\
if\(f\left( x \right) = u\left( x \right) v\left( x \right)\)
then\(f^{\prime}\left( x \right) = u\left( x \right) v^{\prime}\left( x \right) + v\left( x \right) u^{\prime}\left( x \right)\)\\
Quotient Rule\\
if\(f\left( x \right) = \frac{u\left( x \right)}{v\left( x \right)}\)
then\(f^{\prime}\left( x \right) = \frac{v\left( x \right) u^{\prime}\left( x \right) - u\left( x \right) v^{\prime}\left( x \right)}{\left( {v\left( x \right)} \right)^{2}}\)\\
Chain Rule or Power Rule\\
if\(f\left( x \right) = \left( {u\left( x \right)} \right)^{n}\)
then\(f^{\prime}\left( x \right) = n\left( {u\left( x \right)} \right)^{n - 1} u^{\prime}\left( x \right)\)\\
Logarithms\\
\(\ln(MN) = \ln M + \ln N\)\\
\(\ln\left( \frac{M}{N} \right) = \ln M - \ln N\)\\
\(\ln\left( M^{N} \right) = N\ln M\)\\
Derivative of Natural Log\\
if y = ln(x) then \(y^{\prime} = \frac{1}{x}\)\\
if y = ln u(x) then\(y^{\prime} = \frac{1}{u(x)} u^{\prime}(x)\)\\
Derivative of Exponential Function\\
if \(y = e^{x}\) then \(y^{\prime} = e^{x}\)\\
if \(y = e^{u(x)}\) then
\(y^{\prime} = e^{u(x)} u^{\prime}(x)\)\\[2\baselineskip]

Better, right?  If something is still wrong, please let us know
(preferably by submitting a bug report to jgm/texmath on github).

Perhaps we should be more relaxed about the math tags, and assume
that they are MathML by default, even if not marked.  Officially
it is required, but apparently MathJax doesn't generate it...

+++ Kevin Vilbig [Nov 01 16 13:38 ]:
>   I am attempting to translate some MathML snipped from .docx files in
>   Microsoft Word to LaTeX in order to make accessible materials for some
>   visually impaired students. I was hoping to do it this way so that we
>   could provide them with both a screen-readable HTML file AND a Nemeth
>   Braille Transcription so as to give them multiple forms of presentation
>   to avoid any issues with inaccurate translation or our mistakes.
>   I'm going to give up on this route and try something else, maybe trying
>   to translate the whole docx file directly, or copying the MathType
>   output straight to LaTeX.
>   $ pandoc --mathjax -f html -t latex exam2.htm
>   Powers of X Rule\\
>   if f( x )= x n then f ′ ( x )=n ( x ) n−1\\
>   Constant Rule\\
>   if f( x )=C then f ′ ( x )=0\\
>   Coefficient Rules\\
>   if f(x)=c•u(x) then f ′ ( x )=c• u ′ ( x )\\
>   if f(x)=k x n then f ′ (x)=kn x n−1\\
>   if f(x)=kx then f ′ (x)=k\\
>   Sum Rule\\
>   if f( x )=u( x )+v( x ) then f ′ ( x )= u ′ ( x )+ v ′ ( x )\\
>   Difference Rule\\
>   if f( x )=u( x )−v( x ) then f ′ ( x )= u ′ ( x )− v ′ ( x )\\
>   Product Rule\\
>   if f( x )=u( x )•v( x ) then f ′ ( x )=u( x )• v ′ ( x )+v( x )• u ′ (
>   x
>   )\\
>   Quotient Rule\\
>   if f( x )= u( x ) v( x ) then f ′ ( x )= v( x )• u ′ ( x )−u( x )• v ′
>   (
>   x ) ( v( x ) ) 2\\
>   Chain Rule or Power Rule\\
>   if f( x )= ( u( x ) ) n then f ′ ( x )=n ( u( x ) ) n−1 • u ′ ( x )\\
>   Logarithms\\
>   ln(MN)=lnM+lnN\\
>   ln( M N )=lnM−lnN\\
>   ln( M N )=NlnM\\
>   Derivative of Natural Log\\
>   if y = ln(x) then y ′ = 1 x\\
>   if y = ln u(x) then y ′ = 1 u(x) • u ′ (x)\\
>   Derivative of Exponential Function\\
>   if y= e x then y ′ = e x\\
>   if y= e u(x) then y ′ = e u(x) • u ′ (x)\\[2\baselineskip]
>   Here is the contents of exam2.htm
>   <html>Powers of X Rule<br>
>   if <math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><msup>
>      <mi>x</mi>
>      <mi>n</mi>
>     </msup>
>
>    </mrow>
>   </math> then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>n</mi><msup>
>      <mrow>
>       <mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow>
>      </mrow>
>      <mrow>
>       <mi>n</mi><mo>&#x2212;</mo><mn>1</mn>
>      </mrow>
>     </msup>
>
>    </mrow>
>   </math>
>   <br>
>   Constant Rule<br>
>   if <math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>C</mi>
>    </mrow>
>   </math> then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mn>0</mn>
>    </mrow>
>   </math>
>   <br>
>   Coefficient Rules<br>
>   if <math display='inline'>
>    <mrow>
>     <mi>f</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo><mo>=</mo><mi>c</mi><mo>&#x2022;</mo><mi>u</mi><
>   mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo>
>    </mrow>
>   </math> then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>c</mi><mo>&#x2022;</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   <br>if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo><mo>=</mo><mi>k</mi><msup>
>      <mi>x</mi>
>      <mi>n</mi>
>     </msup>
>
>    </mrow>
>   </math>
>   then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo><mo>=</mo><mi>k</mi><mi>n</mi><msup>
>      <mi>x</mi>
>      <mrow>
>       <mi>n</mi><mo>&#x2212;</mo><mn>1</mn>
>      </mrow>
>     </msup>
>
>    </mrow>
>   </math>
>   <br>if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo><mo>=</mo><mi>k</mi><mi>x</mi>
>    </mrow>
>   </math> then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo><mo>=</mo><mi>k</mi>
>    </mrow>
>   </math><br>
>   Sum Rule<br>
>   if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>+</mo><mi>v</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>+</mo><msup>
>      <mi>v</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   <br>
>   Difference Rule<br>
>   if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>&#x2212;</mo><mi>v</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>&#x2212;</mo><msup>
>      <mi>v</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   <br>
>   Product Rule<br>
>   if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>&#x2022;</mo><mi>v</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
>      <mi>v</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>+</mo><mi>v</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   <br>
>   Quotient Rule<br>
>   if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mfrac>
>      <mrow>
>       <mi>u</mi><mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow>
>      </mrow>
>      <mrow>
>       <mi>v</mi><mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow>
>      </mrow>
>     </mfrac>
>
>    </mrow>
>   </math>
>   then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mfrac>
>      <mrow>
>       <mi>v</mi><mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
>        <mi>u</mi>
>        <mo>&#x2032;</mo>
>       </msup>
>       <mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow><mo>&#x2212;</mo><mi>u</mi><mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
>        <mi>v</mi>
>        <mo>&#x2032;</mo>
>       </msup>
>       <mrow><mo>(</mo>
>        <mi>x</mi>
>       <mo>)</mo></mrow>
>      </mrow>
>      <mrow>
>       <msup>
>        <mrow>
>         <mrow><mo>(</mo>
>          <mrow>
>           <mi>v</mi><mrow><mo>(</mo>
>            <mi>x</mi>
>           <mo>)</mo></mrow>
>          </mrow>
>         <mo>)</mo></mrow>
>        </mrow>
>        <mn>2</mn>
>       </msup>
>
>      </mrow>
>     </mfrac>
>
>    </mrow>
>   </math>
>   <br>
>   Chain Rule or Power Rule<br>
>   if<math display='inline'>
>    <mrow>
>     <mi>f</mi><mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><msup>
>      <mrow>
>       <mrow><mo>(</mo>
>        <mrow>
>         <mi>u</mi><mrow><mo>(</mo>
>          <mi>x</mi>
>         <mo>)</mo></mrow>
>        </mrow>
>       <mo>)</mo></mrow>
>      </mrow>
>      <mi>n</mi>
>     </msup>
>
>    </mrow>
>   </math>
>   then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>f</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow><mo>=</mo><mi>n</mi><msup>
>      <mrow>
>       <mrow><mo>(</mo>
>        <mrow>
>         <mi>u</mi><mrow><mo>(</mo>
>          <mi>x</mi>
>         <mo>)</mo></mrow>
>        </mrow>
>       <mo>)</mo></mrow>
>      </mrow>
>      <mrow>
>       <mi>n</mi><mo>&#x2212;</mo><mn>1</mn>
>      </mrow>
>     </msup>
>     <mo>&#x2022;</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mrow><mo>(</mo>
>      <mi>x</mi>
>     <mo>)</mo></mrow>
>    </mrow>
>   </math>
>   <br>
>   Logarithms<br>
>   <math display='inline'>
>    <mi>ln</mi><mo stretchy='false'>(</mo><mi>M</mi><mi>N</mi><mo
>   stretchy='false'>)</mo><mo>=</mo><mi>ln</mi><mi>M</mi><mo>+</mo><mi>ln<
>   /mi><mi>N</mi>
>   </math>
>   <br>
>   <math display='inline'>
>    <mi>ln</mi><mrow><mo>(</mo>
>     <mrow>
>      <mfrac>
>       <mi>M</mi>
>       <mi>N</mi>
>      </mfrac>
>
>     </mrow>
>    <mo>)</mo></mrow><mo>=</mo><mi>ln</mi><mi>M</mi><mo>&#x2212;</mo><mi>l
>   n</mi><mi>N</mi>
>   </math>
>   <br>
>   <math display='inline'>
>    <mi>ln</mi><mrow><mo>(</mo>
>     <mrow>
>      <msup>
>       <mi>M</mi>
>       <mi>N</mi>
>      </msup>
>
>     </mrow>
>    <mo>)</mo></mrow><mo>=</mo><mi>N</mi><mi>ln</mi><mi>M</mi>
>   </math>
>   <br>
>   Derivative of Natural Log<br>
>   if y = ln(x) then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>y</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo>=</mo><mfrac>
>      <mn>1</mn>
>      <mi>x</mi>
>     </mfrac>
>
>    </mrow>
>   </math>
>   <br>
>   if y = ln u(x) then<math display='inline'>
>    <mrow>
>     <msup>
>      <mi>y</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo>=</mo><mfrac>
>      <mn>1</mn>
>      <mrow>
>       <mi>u</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo>
>      </mrow>
>     </mfrac>
>     <mo>&#x2022;</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo>
>    </mrow>
>   </math>
>   <br>
>   Derivative of Exponential Function<br>
>   if <math display='inline'>
>    <mrow>
>     <mi>y</mi><mo>=</mo><msup>
>      <mi>e</mi>
>      <mi>x</mi>
>     </msup>
>
>    </mrow>
>   </math>
>   then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>y</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo>=</mo><msup>
>      <mi>e</mi>
>      <mi>x</mi>
>     </msup>
>
>    </mrow>
>   </math>
>   <br>
>   if <math display='inline'>
>    <mrow>
>     <mi>y</mi><mo>=</mo><msup>
>      <mi>e</mi>
>      <mrow>
>       <mi>u</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo>
>      </mrow>
>     </msup>
>
>    </mrow>
>   </math>
>   then <math display='inline'>
>    <mrow>
>     <msup>
>      <mi>y</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo>=</mo><msup>
>      <mi>e</mi>
>      <mrow>
>       <mi>u</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>   stretchy='false'>)</mo>
>      </mrow>
>     </msup>
>     <mo>&#x2022;</mo><msup>
>      <mi>u</mi>
>      <mo>&#x2032;</mo>
>     </msup>
>     <mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo>
>    </mrow>
>   </math>
>   <br>
>   <br>
>   </html>
>
>   --
>   You received this message because you are subscribed to the Google
>   Groups "pandoc-discuss" group.
>   To unsubscribe from this group and stop receiving emails from it, send
>   an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To post to this group, send email to
>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>   To view this discussion on the web visit
>   [3]https://groups.google.com/d/msgid/pandoc-discuss/48401935-a82d-44e6-
>   afa5-810c580f9edf%40googlegroups.com.
>   For more options, visit [4]https://groups.google.com/d/optout.
>
>References
>
>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>   3. https://groups.google.com/d/msgid/pandoc-discuss/48401935-a82d-44e6-afa5-810c580f9edf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer
>   4. https://groups.google.com/d/optout

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/20161102133632.GA5983%40Administrateurs-iMac-3.local.
For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: MathML to LaTeX producing extremely lossy output, especially with quotients
       [not found]     ` <20161102133632.GA5983-BKjuZOBx5Kn2N3qrpRCZGbhGAdq7xJNKhPhL2mjWHbk@public.gmane.org>
@ 2016-11-16 19:47       ` Kevin Vilbig
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Vilbig @ 2016-11-16 19:47 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 18928 bytes --]

Thanks for taking a look. I haven't had time to come back around to this
yet.

On Wed, Nov 2, 2016 at 8:36 AM, John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:

> I see what's happening here.
>
> First, --mathml is only relevant to HTML output, so you
> can omit that.
>
> Second, pandoc will only interpret <math> tags as mathml if they're
> marked with the MathML namespace, as they are supposed to be.
>
> If you add xmlns="http://www.w3.org/1998/Math/MathML"  to
> your math tags, you'll get real tex math in the output:
>
> Powers of X Rule\\
> if \(f\left( x \right) = x^{n}\) then
> \(f^{\prime}\left( x \right) = n\left( x \right)^{n - 1}\)\\
> Constant Rule\\
> if \(f\left( x \right) = C\) then \(f^{\prime}\left( x \right) = 0\)\\
> Coefficient Rules\\
> if \(f(x) = c u(x)\) then
> \(f^{\prime}\left( x \right) = c u^{\prime}\left( x \right)\)\\
> if\(f(x) = kx^{n}\) then\(f^{\prime}(x) = knx^{n - 1}\)\\
> if\(f(x) = kx\) then \(f^{\prime}(x) = k\)\\
> Sum Rule\\
> if\(f\left( x \right) = u\left( x \right) + v\left( x \right)\)
> then\(f^{\prime}\left( x \right) = u^{\prime}\left( x \right) +
> v^{\prime}\left( x \right)\)\\
> Difference Rule\\
> if\(f\left( x \right) = u\left( x \right) - v\left( x \right)\)
> then\(f^{\prime}\left( x \right) = u^{\prime}\left( x \right) -
> v^{\prime}\left( x \right)\)\\
> Product Rule\\
> if\(f\left( x \right) = u\left( x \right) v\left( x \right)\)
> then\(f^{\prime}\left( x \right) = u\left( x \right) v^{\prime}\left( x
> \right) + v\left( x \right) u^{\prime}\left( x \right)\)\\
> Quotient Rule\\
> if\(f\left( x \right) = \frac{u\left( x \right)}{v\left( x \right)}\)
> then\(f^{\prime}\left( x \right) = \frac{v\left( x \right)
> u^{\prime}\left( x \right) - u\left( x \right) v^{\prime}\left( x
> \right)}{\left( {v\left( x \right)} \right)^{2}}\)\\
> Chain Rule or Power Rule\\
> if\(f\left( x \right) = \left( {u\left( x \right)} \right)^{n}\)
> then\(f^{\prime}\left( x \right) = n\left( {u\left( x \right)} \right)^{n
> - 1} u^{\prime}\left( x \right)\)\\
> Logarithms\\
> \(\ln(MN) = \ln M + \ln N\)\\
> \(\ln\left( \frac{M}{N} \right) = \ln M - \ln N\)\\
> \(\ln\left( M^{N} \right) = N\ln M\)\\
> Derivative of Natural Log\\
> if y = ln(x) then \(y^{\prime} = \frac{1}{x}\)\\
> if y = ln u(x) then\(y^{\prime} = \frac{1}{u(x)} u^{\prime}(x)\)\\
> Derivative of Exponential Function\\
> if \(y = e^{x}\) then \(y^{\prime} = e^{x}\)\\
> if \(y = e^{u(x)}\) then
> \(y^{\prime} = e^{u(x)} u^{\prime}(x)\)\\[2\baselineskip]
>
> Better, right?  If something is still wrong, please let us know
> (preferably by submitting a bug report to jgm/texmath on github).
>
> Perhaps we should be more relaxed about the math tags, and assume
> that they are MathML by default, even if not marked.  Officially
> it is required, but apparently MathJax doesn't generate it...
>
> +++ Kevin Vilbig [Nov 01 16 13:38 ]:
>
>>   I am attempting to translate some MathML snipped from .docx files in
>>
>>   Microsoft Word to LaTeX in order to make accessible materials for some
>>   visually impaired students. I was hoping to do it this way so that we
>>   could provide them with both a screen-readable HTML file AND a Nemeth
>>   Braille Transcription so as to give them multiple forms of presentation
>>   to avoid any issues with inaccurate translation or our mistakes.
>>   I'm going to give up on this route and try something else, maybe trying
>>   to translate the whole docx file directly, or copying the MathType
>>   output straight to LaTeX.
>>   $ pandoc --mathjax -f html -t latex exam2.htm
>>   Powers of X Rule\\
>>   if f( x )= x n then f ′ ( x )=n ( x ) n−1\\
>>   Constant Rule\\
>>   if f( x )=C then f ′ ( x )=0\\
>>   Coefficient Rules\\
>>   if f(x)=c•u(x) then f ′ ( x )=c• u ′ ( x )\\
>>   if f(x)=k x n then f ′ (x)=kn x n−1\\
>>   if f(x)=kx then f ′ (x)=k\\
>>   Sum Rule\\
>>   if f( x )=u( x )+v( x ) then f ′ ( x )= u ′ ( x )+ v ′ ( x )\\
>>   Difference Rule\\
>>   if f( x )=u( x )−v( x ) then f ′ ( x )= u ′ ( x )− v ′ ( x )\\
>>   Product Rule\\
>>   if f( x )=u( x )•v( x ) then f ′ ( x )=u( x )• v ′ ( x )+v( x )• u ′ (
>>   x
>>   )\\
>>   Quotient Rule\\
>>   if f( x )= u( x ) v( x ) then f ′ ( x )= v( x )• u ′ ( x )−u( x )• v ′
>>   (
>>   x ) ( v( x ) ) 2\\
>>   Chain Rule or Power Rule\\
>>   if f( x )= ( u( x ) ) n then f ′ ( x )=n ( u( x ) ) n−1 • u ′ ( x )\\
>>   Logarithms\\
>>   ln(MN)=lnM+lnN\\
>>   ln( M N )=lnM−lnN\\
>>   ln( M N )=NlnM\\
>>   Derivative of Natural Log\\
>>   if y = ln(x) then y ′ = 1 x\\
>>   if y = ln u(x) then y ′ = 1 u(x) • u ′ (x)\\
>>   Derivative of Exponential Function\\
>>   if y= e x then y ′ = e x\\
>>   if y= e u(x) then y ′ = e u(x) • u ′ (x)\\[2\baselineskip]
>>   Here is the contents of exam2.htm
>>   <html>Powers of X Rule<br>
>>   if <math display='inline'>
>>    <mrow>
>>     <mi>f</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><msup>
>>      <mi>x</mi>
>>      <mi>n</mi>
>>     </msup>
>>
>>    </mrow>
>>   </math> then <math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>f</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><mi>n</mi><msup>
>>      <mrow>
>>       <mrow><mo>(</mo>
>>        <mi>x</mi>
>>       <mo>)</mo></mrow>
>>      </mrow>
>>      <mrow>
>>       <mi>n</mi><mo>&#x2212;</mo><mn>1</mn>
>>      </mrow>
>>     </msup>
>>
>>    </mrow>
>>   </math>
>>   <br>
>>   Constant Rule<br>
>>   if <math display='inline'>
>>    <mrow>
>>     <mi>f</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><mi>C</mi>
>>    </mrow>
>>   </math> then <math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>f</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><mn>0</mn>
>>    </mrow>
>>   </math>
>>   <br>
>>   Coefficient Rules<br>
>>   if <math display='inline'>
>>    <mrow>
>>     <mi>f</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>>   stretchy='false'>)</mo><mo>=</mo><mi>c</mi><mo>&#x2022;</mo><mi>u</mi><
>>   mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo>
>>    </mrow>
>>   </math> then <math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>f</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><mi>c</mi><mo>&#x2022;</mo><msup>
>>      <mi>u</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow>
>>    </mrow>
>>   </math>
>>   <br>if<math display='inline'>
>>    <mrow>
>>     <mi>f</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>>   stretchy='false'>)</mo><mo>=</mo><mi>k</mi><msup>
>>      <mi>x</mi>
>>      <mi>n</mi>
>>     </msup>
>>
>>    </mrow>
>>   </math>
>>   then<math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>f</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mo stretchy='false'>(</mo><mi>x</mi><mo
>>   stretchy='false'>)</mo><mo>=</mo><mi>k</mi><mi>n</mi><msup>
>>      <mi>x</mi>
>>      <mrow>
>>       <mi>n</mi><mo>&#x2212;</mo><mn>1</mn>
>>      </mrow>
>>     </msup>
>>
>>    </mrow>
>>   </math>
>>   <br>if<math display='inline'>
>>    <mrow>
>>     <mi>f</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>>   stretchy='false'>)</mo><mo>=</mo><mi>k</mi><mi>x</mi>
>>    </mrow>
>>   </math> then <math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>f</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mo stretchy='false'>(</mo><mi>x</mi><mo
>>   stretchy='false'>)</mo><mo>=</mo><mi>k</mi>
>>    </mrow>
>>   </math><br>
>>   Sum Rule<br>
>>   if<math display='inline'>
>>    <mrow>
>>     <mi>f</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>+</mo><mi>v</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow>
>>    </mrow>
>>   </math>
>>   then<math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>f</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><msup>
>>      <mi>u</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>+</mo><msup>
>>      <mi>v</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow>
>>    </mrow>
>>   </math>
>>   <br>
>>   Difference Rule<br>
>>   if<math display='inline'>
>>    <mrow>
>>     <mi>f</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>&#x2212;</mo><mi>v</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow>
>>    </mrow>
>>   </math>
>>   then<math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>f</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><msup>
>>      <mi>u</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>&#x2212;</mo><msup>
>>      <mi>v</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow>
>>    </mrow>
>>   </math>
>>   <br>
>>   Product Rule<br>
>>   if<math display='inline'>
>>    <mrow>
>>     <mi>f</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>&#x2022;</mo><mi>v</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow>
>>    </mrow>
>>   </math>
>>   then<math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>f</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><mi>u</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
>>      <mi>v</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>+</mo><mi>v</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
>>      <mi>u</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow>
>>    </mrow>
>>   </math>
>>   <br>
>>   Quotient Rule<br>
>>   if<math display='inline'>
>>    <mrow>
>>     <mi>f</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><mfrac>
>>      <mrow>
>>       <mi>u</mi><mrow><mo>(</mo>
>>        <mi>x</mi>
>>       <mo>)</mo></mrow>
>>      </mrow>
>>      <mrow>
>>       <mi>v</mi><mrow><mo>(</mo>
>>        <mi>x</mi>
>>       <mo>)</mo></mrow>
>>      </mrow>
>>     </mfrac>
>>
>>    </mrow>
>>   </math>
>>   then<math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>f</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><mfrac>
>>      <mrow>
>>       <mi>v</mi><mrow><mo>(</mo>
>>        <mi>x</mi>
>>       <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
>>        <mi>u</mi>
>>        <mo>&#x2032;</mo>
>>       </msup>
>>       <mrow><mo>(</mo>
>>        <mi>x</mi>
>>       <mo>)</mo></mrow><mo>&#x2212;</mo><mi>u</mi><mrow><mo>(</mo>
>>        <mi>x</mi>
>>       <mo>)</mo></mrow><mo>&#x2022;</mo><msup>
>>        <mi>v</mi>
>>        <mo>&#x2032;</mo>
>>       </msup>
>>       <mrow><mo>(</mo>
>>        <mi>x</mi>
>>       <mo>)</mo></mrow>
>>      </mrow>
>>      <mrow>
>>       <msup>
>>        <mrow>
>>         <mrow><mo>(</mo>
>>          <mrow>
>>           <mi>v</mi><mrow><mo>(</mo>
>>            <mi>x</mi>
>>           <mo>)</mo></mrow>
>>          </mrow>
>>         <mo>)</mo></mrow>
>>        </mrow>
>>        <mn>2</mn>
>>       </msup>
>>
>>      </mrow>
>>     </mfrac>
>>
>>    </mrow>
>>   </math>
>>   <br>
>>   Chain Rule or Power Rule<br>
>>   if<math display='inline'>
>>    <mrow>
>>     <mi>f</mi><mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><msup>
>>      <mrow>
>>       <mrow><mo>(</mo>
>>        <mrow>
>>         <mi>u</mi><mrow><mo>(</mo>
>>          <mi>x</mi>
>>         <mo>)</mo></mrow>
>>        </mrow>
>>       <mo>)</mo></mrow>
>>      </mrow>
>>      <mi>n</mi>
>>     </msup>
>>
>>    </mrow>
>>   </math>
>>   then<math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>f</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow><mo>=</mo><mi>n</mi><msup>
>>      <mrow>
>>       <mrow><mo>(</mo>
>>        <mrow>
>>         <mi>u</mi><mrow><mo>(</mo>
>>          <mi>x</mi>
>>         <mo>)</mo></mrow>
>>        </mrow>
>>       <mo>)</mo></mrow>
>>      </mrow>
>>      <mrow>
>>       <mi>n</mi><mo>&#x2212;</mo><mn>1</mn>
>>      </mrow>
>>     </msup>
>>     <mo>&#x2022;</mo><msup>
>>      <mi>u</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mrow><mo>(</mo>
>>      <mi>x</mi>
>>     <mo>)</mo></mrow>
>>    </mrow>
>>   </math>
>>   <br>
>>   Logarithms<br>
>>   <math display='inline'>
>>    <mi>ln</mi><mo stretchy='false'>(</mo><mi>M</mi><mi>N</mi><mo
>>   stretchy='false'>)</mo><mo>=</mo><mi>ln</mi><mi>M</mi><mo>+</mo><mi>ln<
>>   /mi><mi>N</mi>
>>   </math>
>>   <br>
>>   <math display='inline'>
>>    <mi>ln</mi><mrow><mo>(</mo>
>>     <mrow>
>>      <mfrac>
>>       <mi>M</mi>
>>       <mi>N</mi>
>>      </mfrac>
>>
>>     </mrow>
>>    <mo>)</mo></mrow><mo>=</mo><mi>ln</mi><mi>M</mi><mo>&#x2212;</mo><mi>l
>>   n</mi><mi>N</mi>
>>   </math>
>>   <br>
>>   <math display='inline'>
>>    <mi>ln</mi><mrow><mo>(</mo>
>>     <mrow>
>>      <msup>
>>       <mi>M</mi>
>>       <mi>N</mi>
>>      </msup>
>>
>>     </mrow>
>>    <mo>)</mo></mrow><mo>=</mo><mi>N</mi><mi>ln</mi><mi>M</mi>
>>   </math>
>>   <br>
>>   Derivative of Natural Log<br>
>>   if y = ln(x) then <math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>y</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mo>=</mo><mfrac>
>>      <mn>1</mn>
>>      <mi>x</mi>
>>     </mfrac>
>>
>>    </mrow>
>>   </math>
>>   <br>
>>   if y = ln u(x) then<math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>y</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mo>=</mo><mfrac>
>>      <mn>1</mn>
>>      <mrow>
>>       <mi>u</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>>   stretchy='false'>)</mo>
>>      </mrow>
>>     </mfrac>
>>     <mo>&#x2022;</mo><msup>
>>      <mi>u</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo>
>>    </mrow>
>>   </math>
>>   <br>
>>   Derivative of Exponential Function<br>
>>   if <math display='inline'>
>>    <mrow>
>>     <mi>y</mi><mo>=</mo><msup>
>>      <mi>e</mi>
>>      <mi>x</mi>
>>     </msup>
>>
>>    </mrow>
>>   </math>
>>   then <math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>y</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mo>=</mo><msup>
>>      <mi>e</mi>
>>      <mi>x</mi>
>>     </msup>
>>
>>    </mrow>
>>   </math>
>>   <br>
>>   if <math display='inline'>
>>    <mrow>
>>     <mi>y</mi><mo>=</mo><msup>
>>      <mi>e</mi>
>>      <mrow>
>>       <mi>u</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>>   stretchy='false'>)</mo>
>>      </mrow>
>>     </msup>
>>
>>    </mrow>
>>   </math>
>>   then <math display='inline'>
>>    <mrow>
>>     <msup>
>>      <mi>y</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mo>=</mo><msup>
>>      <mi>e</mi>
>>      <mrow>
>>       <mi>u</mi><mo stretchy='false'>(</mo><mi>x</mi><mo
>>   stretchy='false'>)</mo>
>>      </mrow>
>>     </msup>
>>     <mo>&#x2022;</mo><msup>
>>      <mi>u</mi>
>>      <mo>&#x2032;</mo>
>>     </msup>
>>     <mo stretchy='false'>(</mo><mi>x</mi><mo stretchy='false'>)</mo>
>>    </mrow>
>>   </math>
>>   <br>
>>   <br>
>>   </html>
>>
>>   --
>>   You received this message because you are subscribed to the Google
>>   Groups "pandoc-discuss" group.
>>   To unsubscribe from this group and stop receiving emails from it, send
>>   an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>   To post to this group, send email to
>>   [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>>   To view this discussion on the web visit
>>   [3]https://groups.google.com/d/msgid/pandoc-discuss/48401935-a82d-44e6-
>>   afa5-810c580f9edf%40googlegroups.com.
>>   For more options, visit [4]https://groups.google.com/d/optout.
>>
>> References
>>
>>   1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>>   2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
>>   3. https://groups.google.com/d/msgid/pandoc-discuss/48401935-a8
>> 2d-44e6-afa5-810c580f9edf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&
>> utm_source=footer
>>   4. https://groups.google.com/d/optout
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "pandoc-discuss" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/pandoc-discuss/FZH0NrZcXh8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/pandoc-discuss/20161102133632.GA5983%40Administrateurs-iMac-3.local.
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAOAY2rLddv16cyGceCaT5hKRiUrK2VmJy5F0Jr%3Dx%3DX%2BVC8AKiA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 30534 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-16 19:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-01 20:38 MathML to LaTeX producing extremely lossy output, especially with quotients Kevin Vilbig
     [not found] ` <48401935-a82d-44e6-afa5-810c580f9edf-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2016-11-01 22:15   ` John MacFarlane
2016-11-02 13:36   ` John MacFarlane
     [not found]     ` <20161102133632.GA5983-BKjuZOBx5Kn2N3qrpRCZGbhGAdq7xJNKhPhL2mjWHbk@public.gmane.org>
2016-11-16 19:47       ` Kevin Vilbig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).