PS + LaTeX export

Bug #170802 reported by Bug Importer
2
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Wishlist
Johan Engelen

Bug Description

It would be great to have the ability to export in
combined ps+latex format, i.e. where the image is
exported as ps and the text as latex. This feature is
present in xfig (as Combined PS/LaTeX). It is very
useful in that one can change the font in the document
plus all images at the same time, whilst allowing
advanced graphical features in the image. Another
advantage is that a equation defined in latex can be
imported as a macro into the image.

Revision history for this message
Eric-brunet-users (eric-brunet-users) wrote :

Yes, it would be great. It is the single missing feature
that keeps me from ditching xfig for inkscape.

Revision history for this message
Bug Importer (bug-importer) wrote :

I would also like this feature.

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

We have export in LaTeX+PStricks, isn't that what you need?

Revision history for this message
Eric-brunet-users (eric-brunet-users) wrote :

> We have export in LaTeX+PStricks, isn't that what you need?

No, unfortunately. It works fine for the lines, but not for
the texts
As it is now, export in LaTeX+PStricks transforms any text
into a postscript contour which is drawn using PStricks
extension. So if I type $x^2$, I have a nice $x^2$ drawn in
my LaTeX picture.

What is needed, is that piece of texts (such as $x^2$) be
passed directly to the LaTeX engine so that a nice math-mode
x with a 2 as an exponent is displayed.

Now, I understand that drawing texts has some advantages: it
is wysiwyg.
But passing text directly to LaTeX has the advantage of
having the same font, typography and size as the rest of the
document. Ideally, one should be able to do both, and that
is what xfig provides (if the "special" flag is set, the
text is displayed by LaTeX, otherwise it is displayed in the
postscript.)

Another problem with pstricks is that it is becoming
obsolete in some sens; you cannot use it with pdflatex, and
pdflatex is the future. Xfig has a similar problem, but its
way of separating the output into two files (a graphic file
included in the document and a text file processed by LaTeX)
is a good step in the right solution.

To sum up, what would be great is
*) in short term, have a mechanism similar to the "special
flag" of xfig to
   mark text. Such texts would not be drawn by the
postscript engine, but
   passed directly to LaTeX which would process it itself,
expanding
   macros, etc.
*) in a longer term, be able to get rid of pstricks by
exporting into two
   files: 1) a pure LaTeX file which contains the text
marked "special" and
   an instruction to load the graphical part of the picture
(\includegraphics)
   and 2) the graphical part of the drawing (everything but
the "special"
   text) which gets included. This piece of file could be
either .eps (usefull
   for traditionnal LaTeX) or .png, .pdf, .jpg (usefull for
pdfLaTeX).

Revision history for this message
Bug Importer (bug-importer) wrote :

It would also be very useful to include the PDF + Latex
export in the same way. The PDF export already works well,
so separate text from the rest of the svg file should not be
complicated.
It just has to generate the .pdf_t file correctly!
Just perfect for pdflatex users... ;)

Revision history for this message
Julienvitard (julienvitard) wrote :

I think it would be a very useful thing to export the
picture in TeX/PSTricks format, with special text "$x^2$"
written in text, like for exporting in eps with the
unchecked option "text to path". By opening your eps picture
with a text editor, you can find the text "$x^2$", and use
it directly with LaTeX or PSTricks.

Revision history for this message
Bug Importer (bug-importer) wrote :

I built a simple Python script (with a rather different
purpose in mind) that does an adequate job of parsing
Inkscape SVG files and outputting results that can then be
compiled nicely with LaTeX (well pdflatex). While my
particular effort is not precisely what you're looking for
it could likely be easily adapted to do the job. You can
play with it yourself or, if I get the time, I may attempt
to generalise it myself.

http://jedidiah.stuff.gen.nz/lpd.html

Revision history for this message
Lckarssen (lckarssen) wrote :

Originator: NO

I'd also like to see an export to PDF + LaTeX, like in Xfig. It is indeed
the only reason for me to keep using Xfig. Alternatively the possibility to
export to the .fig format would also do since one could then insert the
LaTeX text in Xfig and export to PDF + LaTeX from there.

Revision history for this message
Olivier FAURAX (olivier-faurax) wrote :

+1 for PDF/LaTeX support.

With this feature, all my lab would switch to Inkscape, but there are stuck with xfig and its "unusual" UI to produce PDF/LaTeX.

Changed in inkscape:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
arcadiec (arcadiec) wrote :

+1 for PS and PDF/LaTeX support.

Revision history for this message
yannLC (yannlaiglechapuy) wrote :

if anyone find this usefull, here is a small tool to convert an inkscape svg file into a pdf_t and a pdf.
http://www-rocq.inria.fr/secret/Yann.Laigle-Chapuy/index.php?lg=fr&pg=ink2pdf_t

Revision history for this message
Imposeren (impogarbage) wrote :

PSTricks can put text on images using \cput*(x,y){text} , \rput*(x,y){text}
It would be great to have option for saving text this way

Revision history for this message
Johan Engelen (johanengelen) wrote :

I have added an option to PDF/EPS/PS save dialog that does what is described here.
Please read this PDF document describing the new feature. It also includes text on how to automate this, such that you can tinker the image in inkscape, save it, rerun latex and have the image automatically exported to pdf/latex again, etc.
http://wiki.inkscape.org/wiki/images/SVG_in_LaTeX.pdf

also see bug #172022

Changed in inkscape:
status: Confirmed → Fix Committed
assignee: nobody → Johan Engelen (johanengelen)
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

This feature was added in Inkscape 0.48

Changed in inkscape:
milestone: none → 0.48
status: Fix Committed → Fix Released
su_v (suv-lp)
tags: added: latex
removed: import-export
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.