How do I enter full_path and path_extension using the import package?

I am using Windows and want to point to c:\tex\proj\pic\alpha having proj as the directory hosting the tex file (I would like to point to pic\alpha relative to proj with path_extension).

I tried c/tex/proj/pic/alpha and c:\tex\proj\pic\alpha as full_path but it didn't help me find the file beta.tex_pdf in alpha directory. The file beta.pdf_tex was created by Inkscape.


\import{c/tex/proj/pic/alpha}{beta.pdf_tex}%File `beta.pdf_tex' not found.

I can't figure out how to make a MWE out of this.



This works but then I have to put beta.pdf_tex in the same folder as the tex file.

  • I think you don't have to include c/tex/proj, just simply pic/alpha. – Gipfeli Apr 29 '16 at 12:22
  • pdf_text is not valid file type extension. – Zarko Apr 29 '16 at 13:32

I had forgot the semicolon (:) and the trailing / for the absolute path. The relative path uses \subimport and needs to start with ./ and end with a trailing forward slash.




    \import{C:/tex/proj/pic/alpha/}{beta.pdf_tex}% Absolute path
    \subimport{./pic/alpha/}{beta.pdf_tex}% Relative path


Edit: Observe that the backward slashes used in Windows ( c:\tex\proj\pic\alpha ) turns into forward slashes. I would avoid using spaces in folder names but if you have to I would try replacing the space with an asterisk (*) in the path used in (La)TeX. Another alternative is to use MS-DOS 8.3 file name format. If the 8.3 file name format gets you in trouble with tilde (~) you might need to replace for example ~1 with \string~1. The 8.3 format can be seen by using dir /X in cmd (Win+R).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.