Why doesn't adding SVG work? Or suggest a way to use TEX equation in my sketch.

edited January 2017 in Programming Questions

I had to add a equation to my code. So, I typed out the equation in tex. And rendered the file using xelatex and then used pdfcrop to remove the extra spacing and the converted it into a SVG file using pdf2svg. I put the SVG file in the data directory of my sketch. Now when I loadShape() the SVG into a PShape and run the sketch I get nothing. I am sure that there is nothing wrong with the SVG file because Firefox and Inkscape can open them correctly.

So, some please tell me how can I get the SVG to display or better yet, tell me how to add a TEX equation into Processing and save me from a xelatex eqn.tex && pdfcrop eqn.pdf && pdf2svg eqn-crop.pdf eqn.svg && cp eqn.svg data/ loop every time I update a equation.

Answers

  • I tried this code with an SVG and it worked:

    size(400,400);
    PShape g=loadShape("facel.svg");
    shape(g,0,0);
    

    Is there another way you can generate a svg image? An idea will be to try an online image converter. If using Linux, you could use imagemagick.

    Kf

  • this kind of problem is impossible to debug without access to the svg file in question

    if it's not too big you can post it here, formatted as code (highlight the source, press ctrl-o)

  • edited January 2017

    Here is the svg.

    <?xml version="1.0" encoding="UTF-8"?>
    <svg xmlns="http: //www.w3.org/2000/svg" xmlns:xlink="http:// www.w3.org/1999/xlink" width="84pt" height="25pt" viewBox="0 0 84 25" version="1.1">
    <defs>
    <g>
    <symbol overflow="visible" id="glyph0-0">
    <path style="stroke:none;" d=""/>
    </symbol>
    <symbol overflow="visible" id="glyph0-1">
    <path style="stroke:none;" d="M 1.03125 21.703125 C 1.359375 21.6875 1.71875 21.328125 1.71875 21.078125 C 1.71875 20.75 1.28125 20.453125 1.046875 20.453125 C 0.8125 20.453125 0.359375 20.75 0.359375 21.09375 C 0.359375 21.609375 1.0625 22.15625 1.671875 22.15625 C 3.1875 22.15625 3.953125 19.6875 4.65625 16.796875 C 5.421875 13.640625 6.078125 10.46875 6.609375 7.265625 C 6.984375 5.140625 7.34375 3.15625 7.6875 1.859375 C 7.8125 1.375 7.9375 0.21875 8.328125 0.21875 C 8.640625 0.21875 8.75 0.375 8.578125 0.203125 C 8.609375 0.203125 8.234375 0.5625 8.234375 0.8125 C 8.234375 1.140625 8.6875 1.421875 8.90625 1.421875 C 9.15625 1.421875 9.59375 1.140625 9.59375 0.796875 C 9.59375 0.265625 8.859375 -0.265625 8.3125 -0.265625 C 7.5625 -0.265625 6.796875 0.890625 6.25 2.921875 C 6.21875 3.03125 4.859375 8.03125 3.765625 14.546875 C 3.515625 16.078125 3.21875 17.75 2.890625 19.125 C 2.71875 19.859375 2.453125 21.65625 1.640625 21.65625 C 1.28125 21.65625 1.046875 21.4375 1.03125 21.4375 Z M 1.03125 21.703125 "/>
    </symbol>
    <symbol overflow="visible" id="glyph1-0">
    <path style="stroke:none;" d=""/>
    </symbol>
    <symbol overflow="visible" id="glyph1-1">
    <path style="stroke:none;" d="M 4.171875 -2.1875 C 3.796875 -2.625 3.6875 -2.734375 3.421875 -2.921875 C 3 -3.234375 2.40625 -3.40625 2.03125 -3.40625 C 1.15625 -3.40625 0.328125 -2.5 0.328125 -1.65625 C 0.328125 -0.84375 1.140625 0.0625 2 0.0625 C 2.96875 0.0625 3.796875 -0.78125 3.921875 -0.96875 C 4.125 -0.703125 4.25 -0.59375 4.515625 -0.40625 C 4.9375 -0.09375 5.515625 0.0625 5.90625 0.0625 C 6.765625 0.0625 7.59375 -0.828125 7.59375 -1.671875 C 7.59375 -2.484375 6.796875 -3.40625 5.921875 -3.40625 C 4.953125 -3.40625 4.140625 -2.5625 4 -2.375 Z M 4.390625 -1.703125 C 4.671875 -2.15625 5.140625 -2.8125 5.984375 -2.8125 C 6.703125 -2.8125 7 -2.328125 7 -1.671875 C 7 -1 6.65625 -0.640625 6.015625 -0.640625 C 5.359375 -0.640625 5.0625 -1.125 4.46875 -1.828125 Z M 3.546875 -1.625 C 3.265625 -1.171875 2.796875 -0.515625 1.9375 -0.515625 C 1.21875 -0.515625 0.921875 -0.984375 0.921875 -1.65625 C 0.921875 -2.328125 1.28125 -2.6875 1.921875 -2.6875 C 2.5625 -2.6875 2.875 -2.203125 3.453125 -1.5 Z M 3.546875 -1.625 "/>
    </symbol>
    <symbol overflow="visible" id="glyph1-2">
    <path style="stroke:none;" d="M 5.1875 -1.578125 C 5.296875 -1.578125 5.65625 -1.734375 5.65625 -1.90625 C 5.65625 -2.078125 5.296875 -2.25 5.1875 -2.25 L 1.03125 -2.25 C 0.921875 -2.25 0.546875 -2.078125 0.546875 -1.90625 C 0.546875 -1.734375 0.90625 -1.578125 1.03125 -1.578125 Z M 5.1875 -1.578125 "/>
    </symbol>
    <symbol overflow="visible" id="glyph2-0">
    <path style="stroke:none;" d=""/>
    </symbol>
    <symbol overflow="visible" id="glyph2-1">
    <path style="stroke:none;" d="M 5.3125 -6.96875 C 5.3125 -6.984375 5.140625 -7.25 5.015625 -7.25 C 4.859375 -7.25 3.921875 -7.15625 3.75 -7.140625 C 3.671875 -7.125 3.421875 -6.90625 3.421875 -6.78125 C 3.421875 -6.65625 3.703125 -6.5 3.84375 -6.5 C 4.328125 -6.5 4.171875 -6.59375 4.171875 -6.5 L 4.140625 -6.296875 L 3.53125 -3.9375 L 3.890625 -3.921875 C 3.703125 -4.296875 3.25 -4.734375 2.796875 -4.734375 C 1.640625 -4.734375 0.21875 -3.09375 0.21875 -1.640625 C 0.21875 -0.703125 0.953125 0.109375 1.71875 0.109375 C 1.921875 0.109375 2.546875 0.015625 2.90625 -0.421875 C 2.921875 -0.375 3.453125 0.109375 3.921875 0.109375 C 4.28125 0.109375 4.625 -0.171875 4.703125 -0.34375 C 5 -0.953125 5.140625 -1.5625 5.140625 -1.578125 C 5.140625 -1.6875 4.875 -1.859375 4.84375 -1.859375 C 4.75 -1.859375 4.5625 -1.65625 4.53125 -1.515625 C 4.359375 -0.875 4.359375 -0.4375 3.953125 -0.4375 C 3.671875 -0.4375 3.8125 -0.53125 3.8125 -0.734375 C 3.8125 -0.96875 3.84375 -1.03125 3.875 -1.203125 Z M 2.890625 -1.359375 C 2.84375 -1.171875 2.890625 -1.265625 2.734375 -1.09375 C 2.296875 -0.546875 2.03125 -0.4375 1.75 -0.4375 C 1.25 -0.4375 1.28125 -0.8125 1.28125 -1.203125 C 1.28125 -1.703125 1.546875 -2.828125 1.78125 -3.28125 C 2.078125 -3.875 2.40625 -4.1875 2.8125 -4.1875 C 3.453125 -4.1875 3.421875 -3.53125 3.421875 -3.46875 C 3.421875 -3.40625 3.40625 -3.359375 3.390625 -3.3125 Z M 2.890625 -1.359375 "/>
    </symbol>
    <symbol overflow="visible" id="glyph2-2">
    <path style="stroke:none;" d="M 3.5 -3.171875 C 3.5625 -3.421875 3.625 -4.1875 4.3125 -4.1875 C 4.359375 -4.1875 4.46875 -4.234375 4.6875 -4.109375 L 4.8125 -4.390625 C 4.53125 -4.34375 4.15625 -3.921875 4.15625 -3.671875 C 4.15625 -3.515625 4.453125 -3.171875 4.71875 -3.171875 C 4.9375 -3.171875 5.421875 -3.515625 5.421875 -3.90625 C 5.421875 -4.421875 4.671875 -4.734375 4.328125 -4.734375 C 3.75 -4.734375 3.265625 -4.15625 3.296875 -4.203125 C 3.203125 -4.46875 2.5 -4.734375 2.203125 -4.734375 C 1.171875 -4.734375 0.421875 -3.28125 0.421875 -3.03125 C 0.421875 -2.9375 0.703125 -2.765625 0.71875 -2.765625 C 0.796875 -2.765625 1 -2.953125 1.015625 -3.046875 C 1.359375 -4.09375 1.84375 -4.1875 2.1875 -4.1875 C 2.375 -4.1875 2.546875 -4.25 2.546875 -3.671875 C 2.546875 -3.375 2.375 -2.71875 2 -1.3125 C 1.84375 -0.703125 1.671875 -0.4375 1.234375 -0.4375 C 1.171875 -0.4375 1.0625 -0.390625 0.859375 -0.515625 L 0.734375 -0.234375 C 0.984375 -0.296875 1.375 -0.65625 1.375 -0.9375 C 1.375 -1.203125 0.984375 -1.453125 0.84375 -1.453125 C 0.53125 -1.453125 0.109375 -1.03125 0.109375 -0.703125 C 0.109375 -0.25 0.78125 0.109375 1.21875 0.109375 C 1.890625 0.109375 2.359375 -0.640625 2.390625 -0.703125 L 2.09375 -0.8125 C 2.21875 -0.4375 2.75 0.109375 3.34375 0.109375 C 4.375 0.109375 5.109375 -1.328125 5.109375 -1.578125 C 5.109375 -1.6875 4.859375 -1.859375 4.828125 -1.859375 C 4.734375 -1.859375 4.53125 -1.65625 4.515625 -1.578125 C 4.1875 -0.515625 3.6875 -0.4375 3.375 -0.4375 C 2.984375 -0.4375 2.984375 -0.59375 2.984375 -0.921875 C 2.984375 -1.140625 3.046875 -1.359375 3.15625 -1.796875 Z M 3.5 -3.171875 "/>
    </symbol>
    <symbol overflow="visible" id="glyph2-3">
    <path style="stroke:none;" d="M 1.859375 -2.296875 C 2.15625 -2.296875 2.890625 -2.328125 3.390625 -2.53125 C 4.09375 -2.828125 4.3125 -3.578125 4.3125 -3.71875 C 4.3125 -4.15625 3.765625 -4.734375 3.078125 -4.734375 C 1.96875 -4.734375 0.28125 -3.59375 0.28125 -1.859375 C 0.28125 -0.84375 1.046875 0.109375 2.03125 0.109375 C 3.453125 0.109375 4.453125 -1.109375 4.453125 -1.21875 C 4.453125 -1.28125 4.234375 -1.53125 4.171875 -1.53125 C 4.109375 -1.53125 3.96875 -1.453125 3.90625 -1.375 C 3.125 -0.390625 2.15625 -0.4375 2.046875 -0.4375 C 1.265625 -0.4375 1.34375 -1.109375 1.34375 -1.421875 C 1.34375 -1.546875 1.359375 -1.859375 1.46875 -2.296875 Z M 1.5625 -2.6875 C 1.953125 -4.203125 2.8125 -4.1875 3.078125 -4.1875 C 3.53125 -4.1875 3.625 -4.0625 3.625 -3.71875 C 3.625 -2.6875 2.21875 -2.84375 1.796875 -2.84375 L 1.609375 -2.84375 Z M 1.5625 -2.6875 "/>
    </symbol>
    <symbol overflow="visible" id="glyph2-4">
    <path style="stroke:none;" d="M 2.640625 -3.71875 L 3.546875 -3.71875 C 3.265625 -2.40625 3.171875 -1.96875 3.171875 -1.3125 C 3.171875 -1.15625 3.171875 -0.890625 3.25 -0.546875 C 3.34375 -0.109375 3.640625 0.109375 3.78125 0.109375 C 3.984375 0.109375 4.359375 -0.234375 4.359375 -0.421875 C 4.359375 -0.484375 4.359375 -0.515625 4.3125 -0.640625 C 4.015625 -1.359375 4.015625 -2.015625 4.015625 -2.296875 C 4.015625 -2.828125 4.09375 -3.359375 4.15625 -3.71875 L 5.15625 -3.71875 C 5.296875 -3.71875 5.828125 -3.875 5.828125 -4.21875 C 5.828125 -4.453125 5.4375 -4.625 5.25 -4.625 L 1.90625 -4.625 C 1.6875 -4.625 1.1875 -4.578125 0.75 -4.109375 C 0.40625 -3.71875 0.09375 -3.140625 0.09375 -3.09375 C 0.09375 -3.078125 0.265625 -2.828125 0.390625 -2.828125 C 0.46875 -2.828125 0.609375 -2.921875 0.671875 -3 C 1.15625 -3.765625 1.609375 -3.71875 1.8125 -3.71875 L 2.15625 -3.71875 C 1.890625 -2.6875 1.34375 -1.46875 0.984375 -0.703125 C 0.890625 -0.53125 0.84375 -0.390625 0.84375 -0.3125 C 0.84375 -0.125 1.1875 0.109375 1.3125 0.109375 C 1.609375 0.109375 1.859375 -0.328125 1.984375 -0.703125 C 2.125 -1.15625 2.125 -1.171875 2.25 -1.671875 L 2.765625 -3.71875 Z M 2.640625 -3.71875 "/>
    </symbol>
    <symbol overflow="visible" id="glyph3-0">
    <path style="stroke:none;" d=""/>
    </symbol>
    <symbol overflow="visible" id="glyph3-1">
    <path style="stroke:none;" d="M 1.546875 -0.921875 C 1.46875 -0.6875 1.4375 -0.515625 1.078125 -0.515625 C 1.0625 -0.515625 0.984375 -0.453125 1.125 -0.359375 C 0.984375 -0.3125 1.203125 -0.765625 1.203125 -0.796875 C 1.203125 -0.953125 0.890625 -1.25 0.734375 -1.25 C 0.53125 -1.25 0.140625 -0.890625 0.140625 -0.640625 C 0.140625 -0.28125 0.71875 0.0625 1.0625 0.0625 C 1.390625 0.0625 1.8125 -0.1875 1.828125 -0.234375 C 1.8125 -0.25 2.390625 0.0625 2.671875 0.0625 C 3.484375 0.0625 4.09375 -1 4.09375 -1.1875 C 4.09375 -1.28125 3.8125 -1.484375 3.796875 -1.484375 C 3.6875 -1.484375 3.484375 -1.234375 3.46875 -1.15625 C 3.3125 -0.671875 3.09375 -0.515625 2.703125 -0.515625 C 2.421875 -0.515625 2.46875 -0.515625 2.46875 -0.78125 C 2.46875 -0.953125 2.640625 -1.59375 2.828125 -2.359375 C 2.96875 -2.90625 3.09375 -2.875 3.328125 -2.875 C 3.34375 -2.875 3.421875 -2.9375 3.25 -3.046875 C 3.484375 -3.109375 3.203125 -2.71875 3.203125 -2.59375 C 3.203125 -2.4375 3.515625 -2.140625 3.671875 -2.140625 C 3.828125 -2.140625 4.25 -2.46875 4.25 -2.765625 C 4.25 -3.15625 3.609375 -3.46875 3.34375 -3.46875 C 2.984375 -3.46875 2.578125 -3.171875 2.578125 -3.171875 C 2.625 -3.0625 2.109375 -3.46875 1.71875 -3.46875 C 0.9375 -3.46875 0.296875 -2.40625 0.296875 -2.203125 C 0.296875 -2.109375 0.59375 -1.921875 0.609375 -1.921875 C 0.703125 -1.921875 0.90625 -2.140625 0.9375 -2.234375 C 1.109375 -2.78125 1.359375 -2.875 1.703125 -2.875 C 1.9375 -2.875 1.921875 -2.953125 1.921875 -2.609375 C 1.921875 -2.46875 1.84375 -2.125 1.78125 -1.875 Z M 1.546875 -0.921875 "/>
    </symbol>
    <symbol overflow="visible" id="glyph4-0">
    <path style="stroke:none;" d=""/>
    </symbol>
    <symbol overflow="visible" id="glyph4-1">
    <path style="stroke:none;" d="M 2.9375 -1.359375 L 2.5625 -1.359375 C 2.515625 -1.0625 2.515625 -0.890625 2.4375 -0.84375 C 2.40625 -0.8125 2.125 -0.875 2.046875 -0.875 L 1.078125 -0.875 L 1.21875 -0.53125 C 1.546875 -0.78125 1.90625 -1.0625 2.203125 -1.265625 C 2.65625 -1.5625 3.140625 -2 3.140625 -2.53125 C 3.140625 -3.171875 2.328125 -3.71875 1.625 -3.71875 C 0.953125 -3.71875 0.25 -3.125 0.25 -2.640625 C 0.25 -2.375 0.671875 -2.140625 0.75 -2.140625 C 0.875 -2.140625 1.234375 -2.421875 1.234375 -2.625 C 1.234375 -2.8125 0.90625 -3.109375 1.078125 -3.09375 C 1.03125 -3.015625 1.1875 -3.09375 1.515625 -3.09375 C 2 -3.09375 2.203125 -3.015625 2.203125 -2.515625 C 2.203125 -2.109375 1.96875 -1.921875 1.59375 -1.59375 L 0.375 -0.5625 C 0.328125 -0.515625 0.265625 -0.390625 0.25 -0.34375 L 0.25 0 L 2.9375 0 L 3.171875 -1.359375 Z M 2.9375 -1.359375 "/>
    </symbol>
    <symbol overflow="visible" id="glyph5-0">
    <path style="stroke:none;" d=""/>
    </symbol>
    <symbol overflow="visible" id="glyph5-1">
    <path style="stroke:none;" d="M 6.84375 -3.265625 C 7 -3.265625 7.359375 -3.421875 7.359375 -3.625 C 7.359375 -3.8125 7 -3.984375 6.859375 -3.984375 L 0.890625 -3.984375 C 0.75 -3.984375 0.375 -3.8125 0.375 -3.625 C 0.375 -3.421875 0.75 -3.265625 0.890625 -3.265625 Z M 6.859375 -1.328125 C 7 -1.328125 7.359375 -1.484375 7.359375 -1.6875 C 7.359375 -1.890625 7 -2.046875 6.84375 -2.046875 L 0.890625 -2.046875 C 0.75 -2.046875 0.375 -1.890625 0.375 -1.6875 C 0.375 -1.484375 0.75 -1.328125 0.890625 -1.328125 Z M 6.859375 -1.328125 "/>
    </symbol>
    <symbol overflow="visible" id="glyph6-0">
    <path style="stroke:none;" d=""/>
    </symbol>
    <symbol overflow="visible" id="glyph6-1">
    <path style="stroke:none;" d="M 4.078125 8.390625 L 2.328125 4.515625 C 2.25 4.359375 2 4.21875 1.96875 4.21875 C 1.96875 4.21875 1.78125 4.25 1.671875 4.34375 L 0.71875 5.046875 C 0.59375 5.15625 0.53125 5.28125 0.53125 5.3125 C 0.53125 5.359375 0.75 5.546875 0.828125 5.546875 C 0.890625 5.546875 1.203125 5.375 1.3125 5.296875 C 1.359375 5.25 1.515625 5.140625 1.390625 5.21875 L 3.25 9.28125 C 3.3125 9.4375 3.5625 9.5625 3.65625 9.5625 C 3.8125 9.5625 3.984375 9.46875 4.046875 9.328125 L 4.109375 9.234375 L 8.640625 -0.125 L 8.578125 -0.046875 C 8.640625 -0.171875 8.703125 -0.3125 8.703125 -0.328125 C 8.703125 -0.421875 8.421875 -0.671875 8.296875 -0.671875 C 8.21875 -0.671875 8.015625 -0.578125 7.9375 -0.421875 L 7.875 -0.390625 L 3.671875 8.328125 Z M 4.078125 8.390625 "/>
    </symbol>
    </g>
    </defs>
    <g id="surface1">
    <g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
      <use xlink:href="#glyph0-1" x="-0.1" y="1.41"/>
    </g>
    <g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
      <use xlink:href="#glyph1-1" x="9.86" y="3.87"/>
    </g>
    <g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
      <use xlink:href="#glyph1-2" x="5.43" y="24.05"/>
      <use xlink:href="#glyph1-1" x="11.657085" y="24.05"/>
    </g>
    <g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
      <use xlink:href="#glyph2-1" x="21.76" y="14.97"/>
      <use xlink:href="#glyph2-2" x="26.945742" y="14.97"/>
    </g>
    <g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
      <use xlink:href="#glyph2-3" x="35.957275" y="14.97"/>
    </g>
    <g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
      <use xlink:href="#glyph1-2" x="40.6" y="10.86"/>
    </g>
    <g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
      <use xlink:href="#glyph3-1" x="46.82" y="10.86"/>
    </g>
    <g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
      <use xlink:href="#glyph4-1" x="51.34" y="7.85"/>
    </g>
    <g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
      <use xlink:href="#glyph5-1" x="58.5" y="14.97"/>
    </g>
    <g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
      <use xlink:href="#glyph6-1" x="69.01" y="7.31"/>
    </g>
    <path style="fill:none;stroke-width:0.398;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 269.308594 -69.999375 L 275.351562 -69.999375 " transform="matrix(1,0,0,-1,-192,-62.89)"/>
    <g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
      <use xlink:href="#glyph2-4" x="77.31" y="14.97"/>
    </g>
    </g>
    </svg>
    

    This SVG doesn't work. And do you know any other way to embed a tex equation into Processing?

  • Answer ✓

    ok, when i run that i get two warnings in the console beneath the source

    Ignoring <symbol> tag.
    Ignoring <use> tag.
    

    and given that ALL your svg code is in symbol tags or use tags then it's ignoring a lot.

    please remember the svg specification is large and complicated and i guess P3's implementation isn't that complete.

  • Yes. The console gives that error. So, what am I supposed to do now? How can I insert LATEX equation into my sketch?

  • please remember the svg specification is large and complicated and i guess P3's implementation isn't that complete.

    This is the answer unfortunately. I tried what you are doing too and had to resort to export the equation as a bitmap image.

  • Bitmaps suck big time. You cannot do animations on them and also, they slow down the code. Adding bitmaps will decrease the frameRate to like 10-15. Did you find any other way to get LATEX code into Processing?

  • Decreasing the framerate like that should not happen, unless you do something wrong like load the images in draw() or accidentally use way too large images.

    If you feel adventurous and if you are disgruntled enough Processing can't do this already, you can try to implement the missing tags yourself.

    The symbol tag defines a glyph with a specific path (shape) and a name.

    The use tag places this glyph based on the symbol name somewhere on an x and an y coordinate.

    https://www.w3.org/TR/SVG/struct.html#UseElement

    This tells you how to read the path:

    https://www.w3.org/TR/SVG/paths.html#DAttribute

    Processing has this already implemented in its loadShape() method: https://github.com/processing/processing/blob/master/core/src/processing/core/PShapeSVG.java#L467

    I'll let you figure out the rest.

  • @ayatana --

    You cannot do animation on them

    What does this mean? How can you "do animations" on SVG in ways that you can't on a transparent PNG file? Are you dynamically changing the contents of the SVG text and reloading it during a running sketch?

  • Once you load in an SVG you can have it as a PShape in the sketch, which is a collection of curves defined by points which positions you can change on runtime. I guess that is what OP is after.

  • Ah, that makes sense. I was thrown off by the example of typesetting a mathematical equation and wasn't imagining it in terms of dynamic typography.

  • i am surprised that they aren't using a third party library to parse and render svg files. there must be one. Batik for instance. (Ah, it says it uses Batik for writing).

    I've seen a few things now that say they use svg for animation, the OP-1 for instance, but i'd've thought the final rendering of them would be overly expensive.

    Mathjax is meant to be capable of going directly from Tex to svg but I haven't been able to try it and there's no guarantee that processing will parse the result.

  • Mathjax is meant to be capable of going directly from Tex to svg but I haven't been able to try it and there's no guarantee that processing will parse the result.

    Been there done that. Mathjax spits out a svg similar to the one I created and with the same problem. I am going mad now. Atleast, if Processing could prase MathML. That would have been great.

Sign In or Register to comment.