Inkscape.org
Using Inkscape with Other Programs How to edit pdf_tex files?
  1. #1
    khalameet khalameet @khalameet
    *

    Hi!

    I hope this is the right section of the forum for this kind of question.

    Currently I am finishing my master's thesis and I am using Latex. I find it really nice to edit pictures in inkscape and export them as pdf_tex files. However, sometimes I don't get the placement of the text inside those files right at the first time and I see it only after compiling my Latex document. So I have to readjust the position of the textboxes in inkscape accordingly.

    Now that is not a problem if I have the file still open in inkscape, I can adjust the text positions and save the file again to compile it in my latex document. However, after saving it in inkscape, there are two connected files, a pdf-file and a pdf_tex file. If I try to edit those two files together later, after I already closed inkscape, I can only edit the pdf-file and can not include the pdf_tex. So I would have to recreate the part of the image which contains the textboxes.

    I did a lot of googling and searched in inkscape, but I am not able to find an import option. Is it possible to edit the files later? I hope I described my problem well enough since I am not a native speaker.

    Thank you in advance.

    Best regards,

    Daniel

    Edit: I forgot to mention that I use Inkscape 1.1.2

  2. #2
    alexgrey alexgrey @alexgrey

    I worked on a similar project but I couldn't find a way to edit the PDF tex files. If anyone can help me too then it will be a huge favor. I might need to use it some other time in future. Thanks!

  3. #3
    alexgrey alexgrey @alexgrey

    Hey! I am commenting for the follow-up. Did anyone find a solution to this problem yet? Or is it the same as before??

  4. #4
    Friedrich2 Friedrich2 @Friedrich2

    A few notes from a complete Inkscape newbie:

    At first, I have to implore you to use TikZ (or in few use cases something similar, e. g. matplotlib). I am sure that you have often heard this advice, just do it. :-) Yes, TikZ seems to be intimidating at a first glance, but the manual is very well written, has the relevant content within the first sections (Tutorials), there is a resume and the TikZ gallery is impressing as well as helpful. In addition, it is much easier to automate things (e. g., draw patterned matrices, use the same object layout every time using style and so on.) and work with math-oriented content.

    It seems that you work only with Inkscape's internal version of your picture, which is then exported as PDF file and as TeX file. Remind that the TeX version of your picture is not the native way to store the information on your disk. Therefore, you have to import the TeX file into Inkscape to convert it into an internal picture, which looks hopefully rather similar.
    This is not possible in Inkscape up to date.(File --> Import .. and TeX files are not listed under "File Type").

    Imagine you are writing a contract in English (internal data / SVG), which is then very roughly translated into Hindi (TeX file) and very roughly re-translated.into English (imported into Inkscape). Your contract will barely be understandable. In other words: Your picture would look really bad after the Export-Import sequence.

    How to solve your problem, iff you are stubborn enough to not using TikZ? :-D Just save your Inkscape work as SVG, work on this file, and export it, if needed, as TeX. SVGs are rather nice since they are vector graphics, i. e. the computer does not see single pixels alone, but objects like lines, blurs etc Thus, it is much easier to apply structural changes.
    Remind that it is almost surely not necessary to generate a PDF file, you can include the exported LaTeX / TikZ code into your Master thesis' LaTeX code e. g. via \include{picture.tex}   (or similar).

    .It may be that you have already completed your Master thesis, then this answer is for future readers and your understanding only. Else: Best wishes and good luck from someone, who had to write a master thesis with LaTeX and TikZ himself. I am sure you recognized my fondness of TikZ. :-)