Git Product home page Git Product logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
[deleted comment]

from thinkstats.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
[deleted comment]

from thinkstats.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Ok, I've got a lead on this.  The problem is actually in plasTeX.  Tralics 
generates <mfenced> tags with appropriate attributes.  I had to modify 
tree_cleaner to make sure the attributes survived my post-processing of the 
output from tralics.  

I'm pretty sure that is working now, but the attributes are still not appearing 
in the DocBook output.

Here's what the plasTeX representation looks like after the tree_cleaner:

<informalequation id="a0000000057">
<mmlmath id="a0000000058">
    <plastex:arg name="mode">display</plastex:arg>
<mmlmfenced id="a0000000059">
    <plastex:arg name="close">]</plastex:arg>
    <plastex:arg name="open">[</plastex:arg>
    <plastex:arg name="separators"></plastex:arg>
<mmlmo id="a0000000060">
-</mmlmo><mmlmfrac id="a0000000061">
<mmlmn id="a0000000062">
1</mmlmn><mmlmn id="a0000000063">
2</mmlmn></mmlmfrac><mmlmsup id="a0000000064">
<mmlmfenced id="a0000000065">
    <plastex:arg name="close">)</plastex:arg>
    <plastex:arg name="open">(</plastex:arg>
    <plastex:arg name="separators"></plastex:arg>
<mmlmfrac id="a0000000066">
<mmlmrow id="a0000000067">
<mmlmi id="a0000000068">
x</mmlmi><mmlmo id="a0000000069">
-</mmlmo><mmlmi id="a0000000070">
μ</mmlmi></mmlmrow><mmlmi id="a0000000071">
σ</mmlmi></mmlmfrac></mmlmfenced><mmlmn id="a0000000072">
2</mmlmn></mmlmsup></mmlmfenced></mmlmath></informalequation>

So at this point the tags have the appropriate attributes.  But here's the 
DocBook:

<informalequation><mml:math overflow="scroll" xmln
s:mml="http://www.w3.org/1998/Math/MathML"><mml:mfenced><mml:mo>-</mml:mo><mml:m
frac><mml:mn>1</mml:mn><mml:mn>2</mml:mn></mml:mfrac><mml:msup><mml:mfenced><mml
:mfrac><mml:mrow><mml:mi>x</mml:mi><mml:mo>-</mml:mo><mml:mi>μ</mml:mi></mml:mr
o
w><mml:mi>σ</mml:mi></mml:mfrac></mml:mfenced><mml:mn>2</mml:mn></mml:msup></mm
l
:mfenced></mml:math></informalequation>

No attributes.

I am looking at Renderers/DocBook/Math.zpts, which contains this:

name: mmlmfenced
<mml:mfenced tal:content="self"></mml:mfenced>

So I wonder if I am confused about this template.  Tim, can you shed any light 
on this?

Original comment by [email protected] on 3 Jul 2013 at 8:51

from thinkstats.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
So the element should look like this, right?
<mml: mfenced open="[" close="]">

I think the template should be:
<mml:mfenced tal:attributes="open self/attributes/open 
close;self/attributes/close" tal:content="self"></mml:mfenced>

Original comment by [email protected] on 3 Jul 2013 at 9:38

from thinkstats.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
oops. <mml:mfenced tal:attributes="open self/attributes/open; close 
self/attributes/close" tal:content="self"></mml:mfenced>

Original comment by [email protected] on 3 Jul 2013 at 9:39

from thinkstats.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Yes, that worked.  Thanks again, Tim!

I found a few more attributes that were not getting rendered in the MathML, and 
updated the templates.  I also added code that detects other attributes that 
are not yet rendered and issues a warning if they get used.





Original comment by [email protected] on 5 Jul 2013 at 6:21

from thinkstats.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024

Original comment by [email protected] on 5 Jul 2013 at 6:21

  • Changed state: Fixed

from thinkstats.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.