以 pdf_tex 格式从 inkscape 导入图形时出现错误,没有行结束,通过 inkscape 生成的代码已附上

以 pdf_tex 格式从 inkscape 导入图形时出现错误,没有行结束,通过 inkscape 生成的代码已附上
%%%%%%%%%%%%%%%

%% Creator: Inkscape inkscape 0.92.3, www.inkscape.org
%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010
%% Accompanies image file 'classify1.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}%
  \newcommand*\fsize{\dimexpr\f@size pt\relax}%
  \newcommand*\lineheight[1]{\fontsize{\fsize}{#1\fsize}\selectfont}%
  \ifx\svgwidth\undefined%
    \setlength{\unitlength}{1875bp}%
    \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.68)%
    \lineheight{1}%
    \setlength\tabcolsep{0pt}%
    \put(0,0){\includegraphics[width=\unitlength,page=1]{classify1.pdf}}%
    \put(0.0271482,0.42213546){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.20818408\unitlength}\raggedright Additive manufacturing\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=2]{classify1.pdf}}%
    \put(0.26638114,0.65781264){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15818521\unitlength}\raggedright Direct Energy Deposition\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=3]{classify1.pdf}}%
    \put(0.26761521,0.53507985){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.12028501\unitlength}\raggedright Powder-Bed Fusion\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=4]{classify1.pdf}}%
    \put(0.26548282,0.35496942){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15818521\unitlength}\raggedright Material Extrusion\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=5]{classify1.pdf}}%
    \put(0.26627999,0.16637756){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15818521\unitlength}\raggedright Material Jetting\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=6]{classify1.pdf}}%
    \put(0.26601238,0.28894887){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15818521\unitlength}\raggedright Binder Jetting\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=7]{classify1.pdf}}%
    \put(0.26387857,0.0395216){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15818521\unitlength}\raggedright VAT Polymerization\end{minipage}}}%
    \put(0.51718157,0.65780413){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.37846792\unitlength}\raggedright Laser Engineered Net Shape (LENS)\\ \\ Electron Beam Additive Manufacturing (EBAM)\\ \\ Electric Arc Based Additive manufacturing\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=8]{classify1.pdf}}%
    \put(0.51810566,0.53722755){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.35551431\unitlength}\raggedright Selective Laser Melting (SLM)\\ \\ Direct Metal Laser Sintering (DMLS)\\ \\ Electron Beam Melting (EBM)\\ \\ Selective Laser Sintering (SLS)\\ \\ Multi-Jet Fusion\\ \\ \end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=9]{classify1.pdf}}%
    \put(0.51412939,0.35587596){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.29391743\unitlength}\raggedright Fused Deposition Modelling (FDM)\\ \\ \end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=10]{classify1.pdf}}%
    \put(0.51538023,0.22120653){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.1376501\unitlength}\raggedright Material jetting\\ \\ Nano-particle jetting\\ \\ Drop on Demand\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=11]{classify1.pdf}}%
    \put(1.38149405,0.4144482){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.22043515\unitlength}\raggedright \end{minipage}}}%
    \put(1.42578246,0.41142853){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.1791664\unitlength}\raggedright \end{minipage}}}%
    \put(1.27781918,0.41646131){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.42073918\unitlength}\raggedright \end{minipage}}}%
    \put(1.22245876,0.40941545){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.27176939\unitlength}\raggedright \end{minipage}}}%
    \put(1.18974578,0.47937087){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.11694805\unitlength}\raggedright \end{minipage}}}%
    \put(0.80407596,0.66789962){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{1.02774881\unitlength}\raggedright }\\ \end{minipage}}}%
    \put(0.83262992,0.63782239){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15842959\unitlength}\raggedright  Metal Powder or wire \end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=12]{classify1.pdf}}%
    \put(0.83245614,0.59818938){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15842959\unitlength}\raggedright  Metal Wire\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=13]{classify1.pdf}}%
    \put(0.53319207,0.28915515){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright Stainless steel, Cobalt-Chrome, Silica sand, Gypsum, etc.\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=14]{classify1.pdf}}%
    \put(0.70867689,0.22116886){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright ABS, Rubber etc.\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=15]{classify1.pdf}}%
    \put(0.70736941,0.19234684){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright Stainless steel, Cermaics\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=16]{classify1.pdf}}%
    \put(0.70805105,0.16442993){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright Wax\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=17]{classify1.pdf}}%
    \put(0.76224693,0.35644867){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright ABS, Metal, Nylon etc.\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=18]{classify1.pdf}}%
    \put(0.79732101,0.50803091){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright Metal powder\end{minipage}}}%
    \put(0.79800261,0.43234045){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright Nylon, Carbon-fibre\end{minipage}}}%
    \put(0.76104609,0.55208756){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{1.02774881\unitlength}\raggedright }\\ \end{minipage}}}%
    \put(0.76029143,0.45368724){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{1.02774881\unitlength}\raggedright }\\ \end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=19]{classify1.pdf}}%
    \put(0.51506988,0.08999911){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.2554168\unitlength}\raggedright Stereolithography\\ \\ Direct Light Processing (DLP)\\ \\ Continuous Direct Light Processing (CDLP)\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=20]{classify1.pdf}}%
    \put(0.77819169,0.10752163){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{1.02774881\unitlength}\raggedright }\\ \end{minipage}}}%
    \put(0.81204617,0.05988671){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.11539941\unitlength}\raggedright Resin material \end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=21]{classify1.pdf}}%
  \end{picture}%
\endgroup%



%%%%%%%%%%%%%%%%%%%

答案1

您的代码有两个问题:

  1. 您不能拥有\\ \\。删除至少一个\\

  2. }您的代码不平衡,例如\raggedright

    \begin{minipage}{1.02774881\unitlength}\raggedright }\\ \end{minipage}
    

    存在此问题的元素不包含文本,因此我建议直接将其删除。


\documentclass{book}

\usepackage{graphicx}
\usepackage{xcolor}

\begin{document}

%%%%%%%%%%%%%%%

%% Creator: Inkscape inkscape 0.92.3, www.inkscape.org
%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010
%% Accompanies image file 'example-image-duck.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}%
  \newcommand*\fsize{\dimexpr\f@size pt\relax}%
  \newcommand*\lineheight[1]{\fontsize{\fsize}{#1\fsize}\selectfont}%
  \ifx\svgwidth\undefined%
    \setlength{\unitlength}{1875bp}%
    \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.68)%
    \lineheight{1}%
    \setlength\tabcolsep{0pt}%
    \put(0,0){\includegraphics[width=\unitlength,page=1]{example-image-duck.pdf}}%
    \put(0.0271482,0.42213546){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.20818408\unitlength}\raggedright Additive manufacturing\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=2]{example-image-duck.pdf}}%
    \put(0.26638114,0.65781264){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15818521\unitlength}\raggedright Direct Energy Deposition\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=3]{example-image-duck.pdf}}%
    \put(0.26761521,0.53507985){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.12028501\unitlength}\raggedright Powder-Bed Fusion\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=4]{example-image-duck.pdf}}%
    \put(0.26548282,0.35496942){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15818521\unitlength}\raggedright Material Extrusion\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=5]{example-image-duck.pdf}}%
    \put(0.26627999,0.16637756){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15818521\unitlength}\raggedright Material Jetting\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=6]{example-image-duck.pdf}}%
    \put(0.26601238,0.28894887){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15818521\unitlength}\raggedright Binder Jetting\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=7]{example-image-duck.pdf}}%
    \put(0.26387857,0.0395216){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15818521\unitlength}\raggedright VAT Polymerization\end{minipage}}}%
    \put(0.51718157,0.65780413){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.37846792\unitlength}\raggedright Laser Engineered Net Shape (LENS) \\ Electron Beam Additive Manufacturing (EBAM) \\ Electric Arc Based Additive manufacturing\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=8]{example-image-duck.pdf}}%
    \put(0.51810566,0.53722755){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.35551431\unitlength}\raggedright Selective Laser Melting (SLM)\\ Direct Metal Laser Sintering (DMLS)\\ Electron Beam Melting (EBM)\\ Selective Laser Sintering (SLS)\\ Multi-Jet Fusion\\ \end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=9]{example-image-duck.pdf}}%
    \put(0.51412939,0.35587596){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.29391743\unitlength}\raggedright Fused Deposition Modelling (FDM)\\ \end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=10]{example-image-duck.pdf}}%
    \put(0.51538023,0.22120653){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.1376501\unitlength}\raggedright Material jetting\\ Nano-particle jetting\\ Drop on Demand\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=11]{example-image-duck.pdf}}%
    \put(1.38149405,0.4144482){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.22043515\unitlength}\raggedright \end{minipage}}}%
    \put(1.42578246,0.41142853){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.1791664\unitlength}\raggedright \end{minipage}}}%
    \put(1.27781918,0.41646131){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.42073918\unitlength}\raggedright \end{minipage}}}%
    \put(1.22245876,0.40941545){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.27176939\unitlength}\raggedright \end{minipage}}}%
    \put(1.18974578,0.47937087){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.11694805\unitlength}\raggedright \end{minipage}}}%
%    \put(0.80407596,0.66789962){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{1.02774881\unitlength}\raggedright }\\ \end{minipage}}}%
    \put(0.83262992,0.63782239){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15842959\unitlength}\raggedright  Metal Powder or wire \end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=12]{example-image-duck.pdf}}%
    \put(0.83245614,0.59818938){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.15842959\unitlength}\raggedright  Metal Wire\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=13]{example-image-duck.pdf}}%
    \put(0.53319207,0.28915515){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright Stainless steel, Cobalt-Chrome, Silica sand, Gypsum, etc.\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=14]{example-image-duck.pdf}}%
    \put(0.70867689,0.22116886){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright ABS, Rubber etc.\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=15]{example-image-duck.pdf}}%
    \put(0.70736941,0.19234684){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright Stainless steel, Cermaics\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=16]{example-image-duck.pdf}}%
    \put(0.70805105,0.16442993){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright Wax\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=17]{example-image-duck.pdf}}%
    \put(0.76224693,0.35644867){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright ABS, Metal, Nylon etc.\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=18]{example-image-duck.pdf}}%
    \put(0.79732101,0.50803091){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright Metal powder\end{minipage}}}%
    \put(0.79800261,0.43234045){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.38526216\unitlength}\raggedright Nylon, Carbon-fibre\end{minipage}}}%
%    \put(0.76104609,0.55208756){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{1.02774881\unitlength}\raggedright }\\ \end{minipage}}}%
%    \put(0.76029143,0.45368724){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{1.02774881\unitlength}\raggedright }\\ \end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=19]{example-image-duck.pdf}}%
    \put(0.51506988,0.08999911){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.2554168\unitlength}\raggedright Stereolithography\\ Direct Light Processing (DLP)\\ Continuous Direct Light Processing (CDLP)\end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=20]{example-image-duck.pdf}}%
%    \put(0.77819169,0.10752163){
%       \color[rgb]{0,0,0}
%       \makebox(0,0)[lt]{
%           \begin{minipage}{1.02774881\unitlength}
%               \raggedright  
%           \end{minipage}
%       }
%    }%
    \put(0.81204617,0.05988671){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.11539941\unitlength}\raggedright Resin material \end{minipage}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=21]{example-image-duck.pdf}}%
  \end{picture}%
\endgroup%



%%%%%%%%%%%%%%%%%%%



\end{document}

相关内容