1

I need to insert a figure created with Inkscape in a tex document.

I have an 'images' subfolder where I store all my images.

In this folder I have some subfolders.

An insert statement works with relative paths except with the pdf_tex file Inkscape create, I wonder how to fix that (I do now want to put my images along the *.tex files...)

Then, all layer created by Inkscape doesn't appear. I wonder if it's a LaTeX related issue or Inkscape?

Here's the message error I get while compiling:

!pdfTeX error: pdflatex (file ./images/my_image.pdf): PDF inclusion: req
uired page does not exist <4>
s.k
  • 677
  • File > save as > select PDF format > check PDF+LaTeX. Then there is a PDF file along a TEX file in which there is the text and some other commands. This is the *.pdf_tex file. It can be normally included within the main document as describer in its the header. – s.k Jul 06 '17 at 19:14
  • Have you checked PDF file generated? Does it look ok? – berkus Jul 06 '17 at 19:19
  • Actually not really, it has several "pages" and as far as I know, I didn't create these pages. I also asked this particular point on graphical design SE. – s.k Jul 06 '17 at 19:42
  • 1
    @s.k Can you try something? Open the file my_image.pdf_tex with your tex editor and search for the line \put(0,0){\includegraphics[width=\unitlength,page=4]{my_image.pdf}}% Does it work if you comment this line? And how many pages does the file my_image.pdf has? – samcarter_is_at_topanswers.xyz Jul 06 '17 at 20:27
  • Yes, I have also figured out that page numbering within the .pdf_tex file is not consistent with the real number of pages within the .pdf document where the image is stored! It is the dirtiest workaround of my day but I can live with it for the moment. – s.k Jul 06 '17 at 20:49
  • 1
    @s.k Some time ago, there had been a bug in either inkscape or in one of the libraries involved in the export which caused additional "ghost" pages used in the .pdf_tex file. Try to update? – samcarter_is_at_topanswers.xyz Jul 06 '17 at 21:00
  • I just added the Inkscape PPA and upgraded to ver. 0.92.1. Same thing happens. – s.k Jul 06 '17 at 21:02
  • @s.k To avoid layers: https://tex.stackexchange.com/questions/243499/sharelatex-pdf-inclusion-required-page-does-not-exist-5/350175#350175 – samcarter_is_at_topanswers.xyz Jul 06 '17 at 21:04
  • Apparently, this is an Inkscape problem, not a LaTeX/TeX problem. Can it be transferred to the question that s.k asked at the graphics section of SE? – berkus Jul 07 '17 at 16:34
  • Not sure I understand the question. Isn't it just about using \graphicspath{{images/subfolder/}} in the preamble? (and then including the TeX files in images and the PDF files in images/subfolder) – scaramouche Jul 10 '17 at 12:40

0 Answers0