I am trying to include a .pdf_tex file into my latex document. I saved the file from svg in Inkscape to .pdf_tex file. And I use this in my latex document:
\begin{figure}
\centering
\input{myfile2.pdf_tex}
\end{figure}
myfile2.pdf_tex is in the same file as the main folder. But the error said
Package pdftex.def Error: `myfile2.pdf' not found
I don't know what's going on here and tried to check for many forum but couldn't find the answer. I using texmaker.
LOG FILE :
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex 2017.1.23) 23 JAN 2017 19:44
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**"Report-PhysicallyCoupledTask copy.tex"
(./Report-PhysicallyCoupledTask copy.tex
LaTeX2e <2017/01/01>
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
LaTeX Font Info: Try loading font information for OT1+lmtt on input line 63.
(/usr/local/texlive/2016/texmf-dist/tex/latex/lm/ot1lmtt.fd
File: ot1lmtt.fd 2009/10/30 v1.6 Font defs for Latin Modern
)
LaTeX Font Info: External font `lmex10' loaded for size
(Font) <12> on input line 66.
LaTeX Font Info: External font `lmex10' loaded for size
(Font) <8> on input line 66.
LaTeX Font Info: External font `lmex10' loaded for size
(Font) <6> on input line 66.
LaTeX Warning: No \author given.
LaTeX Font Info: External font `lmex10' loaded for size
(Font) <9> on input line 72.
LaTeX Font Warning: Font shape `OT1/lmr/bx/sc' undefined
(Font) using `OT1/lmr/bx/n' instead on input line 85.
(./myfile2.pdf_tex <myfile2.pdf, id=83, page=1, 1284.8pt x 702.625pt>
File: myfile2.pdf Graphic file (type pdf)
<use myfile2.pdf, page 1>
Package pdftex.def Info: myfile2.pdf, page1 used on input line 52.
(pdftex.def) Requested size: 1284.79999pt x 702.64471pt.
<myfile2.pdf, id=84, page=2, 1284.8pt x 702.625pt>
File: myfile2.pdf Graphic file (type pdf)
<use myfile2.pdf, page 2>
Package pdftex.def Info: myfile2.pdf, page2 used on input line 55.
(pdftex.def) Requested size: 1284.79999pt x 702.64471pt.
<myfile2.pdf, id=85, page=3, 1284.8pt x 702.625pt>
File: myfile2.pdf Graphic file (type pdf)
<use myfile2.pdf, page 3>
Package pdftex.def Info: myfile2.pdf, page3 used on input line 59.
(pdftex.def) Requested size: 1284.79999pt x 702.64471pt.
!pdfTeX error: /Library/TeX/texbin/pdflatex (file ./myfile2.pdf): PDF inclusion
: required page does not exist <3>
==> Fatal error occurred, no output PDF file produced!
pdf_tex file:
%% Creator: Inkscape inkscape 0.91, www.inkscape.org
%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010
%% Accompanies image file 'myfile2.pdf' (pdf, eps, ps)
%%
%% To include the image in your LaTeX document, write
%% \input{<filename>.pdf_tex}
%% instead of
%% \includegraphics{<filename>.pdf}
%% To scale the image, write
%% \def\svgwidth{<desired width>}
%% \input{<filename>.pdf_tex}
%% instead of
%% \includegraphics[width=<desired width>]{<filename>.pdf}
%%
%% Images with a different path to the parent latex file can
%% be accessed with the `import' package (which may need to be
%% installed) using
%% \usepackage{import}
%% in the preamble, and then including the image with
%% \import{<path to file>}{<filename>.pdf_tex}
%% Alternatively, one can specify
%% \graphicspath{{<path to file>/}}
%%
%% For more information, please see info/svg-inkscape on CTAN:
%% http://tug.ctan.org/tex-archive/info/svg-inkscape
%%
\begingroup%
\makeatletter%
\providecommand\color[2][]{%
\errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}%
\renewcommand\color[2][]{}%
}%
\providecommand\transparent[1]{%
\errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}%
\renewcommand\transparent[1]{}%
}%
\providecommand\rotatebox[2]{#2}%
\ifx\svgwidth\undefined%
\setlength{\unitlength}{1280bp}%
\ifx\svgscale\undefined%
\relax%
\else%
\setlength{\unitlength}{\unitlength * \real{\svgscale}}%
\fi%
\else%
\setlength{\unitlength}{\svgwidth}%
\fi%
\global\let\svgwidth\undefined%
\global\let\svgscale\undefined%
\makeatother%
\begin{picture}(1,0.546875)%
\put(0,0){\includegraphics[width=\unitlength,page=1]{myfile2.pdf}}%
\put(0.46834302,0.50912102){\color[rgb]{0.14901961,0.14901961,0.14901961}\rotatebox{90}{\makebox(0,0)[b]{\smash{Force difference [N]}}}}%
\put(0.63887864,0.31148664){\color[rgb]{0.14901961,0.14901961,0.14901961}\makebox(0,0)[b]{\smash{Total force [N]}}}%
\put(0,0){\includegraphics[width=\unitlength,page=2]{myfile2.pdf}}%
\put(0.52089864,0.34793664){\color[rgb]{0.14901961,0.14901961,0.14901961}\makebox(0,0)[b]{\smash{0}}}%
\put(0.63887864,0.34793664){\color[rgb]{0.14901961,0.14901961,0.14901961}\makebox(0,0)[b]{\smash{15}}}%
\put(0.75685864,0.34793664){\color[rgb]{0.14901961,0.14901961,0.14901961}\makebox(0,0)[b]{\smash{30}}}%
\put(0,0){\includegraphics[width=\unitlength,page=3]{myfile2.pdf}}%
\put(0.49981927,0.36697227){\color[rgb]{0.14901961,0.14901961,0.14901961}\makebox(0,0)[rb]{\smash{-3}}}%
\put(0.49981927,0.46725539){\color[rgb]{0.14901961,0.14901961,0.14901961}\makebox(0,0)[rb]{\smash{0}}}%
\put(0.49981927,0.63439414){\color[rgb]{0.14901961,0.14901961,0.14901961}\makebox(0,0)[rb]{\smash{5}}}%
\put(0,0){\includegraphics[width=\unitlength,page=4]{myfile2.pdf}}%
\end{picture}%
\endgroup%
\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Martin Schröder Jan 23 '17 at 20:13myfile2.pdfhas 4 pages? From the error message it looks, like it might only have 2 pages. – samcarter_is_at_topanswers.xyz Jan 23 '17 at 20:13\put(0,0){\includegraphics[width=\unitlength,page=3]{myfile2.pdf}}%and\put(0,0){\includegraphics[width=\unitlength,page=4]{myfile2.pdf}}%? – samcarter_is_at_topanswers.xyz Jan 23 '17 at 20:21myfile2.pdf? Are the first two pages empty and the graph is somewhere on the 3rd or 4th page? – samcarter_is_at_topanswers.xyz Jan 23 '17 at 20:26.pdf_texfile and the.pdfare actually found – daleif Jan 24 '17 at 09:58file.pdfseems to have only three pages. I would suggest 1) you openfile.pdfin preview.app and save it. 2) remove the line\put(0,0){\includegraphics[width=\unitlength,page=4]{file.pdf}}– samcarter_is_at_topanswers.xyz Jan 24 '17 at 10:23pdf_tex– samcarter_is_at_topanswers.xyz Jan 24 '17 at 10:25.pdf_texfile thinks the PDF has 4 pages, but it does not. – daleif Jan 24 '17 at 11:11refering to the suggestion, do you know how to add the shell command (separately ) in texmaker? @samcarter
– Sharah Jan 24 '17 at 12:57