Inkscape.org
Beyond the Basics Is there a way to preview LaTeX equations without rendering it as a path?
  1. #1
    Breno Breno @bva

    Hi all!

    I am looking for a way to write text in a figure using LaTeX commands without rendering it to a path and yet still see it in generated LaTeX form while in Inkscape.

    This way, when I save the file as a pdf and choose the option "Omit text in PDF and create LaTeX file", the formulas can be rendered by LaTeX as text when I include the figure in a .tex document.

    For example, let's say I want the following figure, in which the formulas are generated in Inkscape using Extensions -> Render -> Formula (pdflatex). If I save this figure as a pdf with the aforementioned option, the formulas will not be understood as text, but as an image. This makes sense, because it was rendered to a path, but this is not the desired behaviour.

    To accomplish what I want, I use the following workaround: I write the LaTeX formula explicitly as text in Inkscape, such that the pdf_tex file that is generated when saving to pdf contains the formulas as text. Then, when including the pdf/pdf_tex figure to my actual LaTeX document, the formulas are rendered as text, not as a path.

    Is there a way to just use pdflatex as a "preview tool" only for the formulas, while actually saving the formulas as text file when saving the pdf/pdf_tex?

    Best,

    Breno

  2. #2
    inklinea inklinea @inklinea⛰️

    in 

    /usr/share/inkscape/extensions/pdflatex.inx

    or in the equivalent extensions folder on windows ( you can find this at Edit>preferences>system>user extensions folder)

    change:

    <effect needs-live-preview="false">

    to

    <effect needs-live-preview="true">

    The extension gui with then have a preview checkbox.

  3. #3
    inklinea inklinea @inklinea⛰️

    Sorry on windows it should be 

    C:\Program Files\Inkscape\share\inkscape\extensions\pdflatex.inx

  4. #4
    Breno Breno @bva

    Hi! Thanks for the suggestion.

    But that does not work as intended. Even with Live Preview on, you cannot change where the extension will generate the LaTeX equation.

    And even if you could, you are limited to one equation at a time, instead of all equations at once.

    I found this extension here that has the functionality I would like. But it seems to be dead (i.e., not updated to current versions of Inkscape).

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Is there a way to preview LaTeX equations without rendering it as a path?