I have actually checked it, but I couldn't use it, since I'm on Windows. I assume pdf2svg and pdfcrop dependencies are the following:

http://www.cityinthesky.co.uk/pdf2svg.html
http://pdfcrop.sourceforge.net/

Anyway, this version (with pstoedit) works good. Finally I don't have to manually scale all the equations. Now the only thing, which is missing is, that double clicking the equation would open the window for extension settings so that you could basically edit the equation...

However, I was wondering if it was possible to simply use Inkscape's internals to import PDF generated by LaTeX. That would leave only LaTeX as dependency.

Otherwise a really nice improvement.

Best regards,
Rok

On Mon, Sep 6, 2010 at 8:22 PM, Dylan Thurston <dthurston@...2401...> wrote:
A few days ago I posted a revised LaTeX equation renderer.  I don't
know if anyone has taken a look at it yet, but there was a rather odd
bug, that only shows up when you render more than one equation.

The program 'pdf2svg' uses the poppler and cairo libraries to produce
SVG, and the SVG that it produces uses hrefs; these tags conflict with
each other when I try to import more than one of them.  Does Inkscape
have a proper, approved way to include one SVG file in another that
takes care of renaming node ids and hrefs to prevent overlap?

For instance, here is a somewhat abbreviated version of the SVG file
for $\alpha_1$:

------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="11pt" height="8pt" viewBox="0 0 11 8" 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 5.53125 -3.03125 C 5.53125 -4.1875 4.875 -5.265625 3.609375 -5.265625 [...] "/>
</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 2.5 -5.078125 C 2.5 -5.296875 2.484375 [...] "/>
</symbol>
</g>
<clipPath id="clip1">
 <path d="M -139 722 L 456.277344 722 L 456.277344 -119.890625 L -139 -119.890625 L -139 722 Z M -139 722 "/>
</clipPath>
</defs>
<g id="surface0">
<g clip-path="url(#clip1)" clip-rule="nonzero">
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
 <use xlink:href="#glyph0-1" x="-0.372" y="6.123"/>
</g>
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
 <use xlink:href="#glyph1-1" x="7.073" y="7.916"/>
</g>
</g>
</g>
</svg>
------------------------------------------------------------

This creates symbols 'glyph0-1' and 'glyph1-1' (one for the '\alpha'
and one for the '1'), and then uses them both via hrefs.  If I import
another equation, it will also define 'glyph0-1', probably
differently, and Inkscape will randomly pick which symbol to refer to.

Any comments or advice are welcome.

In any case, attached is a version of the scripts that uses pstoedit,
which produces SVG files without this issue.  (However, it also gets
the bounding box wrong, which will make life difficult later.)

Best,
       Dylan Thurston

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/inkscape-devel