neuthesis icon indicating copy to clipboard operation
neuthesis copied to clipboard

无法导入Inkscape生成的 .pdf_tex 文件

Open vaple opened this issue 3 years ago • 0 comments

同时在StackExchange提的问题

问题具体定位到无法使用

\begin{picture}
....
\end{picture}  

这个是和什么冲突了?


.pdf_tex .pdf .svg文件在项目根目录下

\documentclass[printcopy,windows]{Style/neuthesis}%
\usepackage[bibtex,myhdr,table,list,geometry]{Style/artratex}
\usepackage{Style/artracom}% user defined commands
\def\alltex{}

\begin{document}
    \begin{figure}
        \centering
        \def\svgwidth{\columnwidth}
        \input{intro_example0.pdf_tex}
        \caption{origin}
        \label{fig:intro_e0}
    \end{figure}

.....
\end{document}

ERROR:File ended while scanning use of \@picture. ^^I^^I\input{intro_example0.pdf_tex}

导入的文件本身是没有问题的,通过如下代码可以在测试文件里正常显示:

\documentclass{article}
\usepackage{graphicx}
\usepackage{xcolor}
\begin{document}
    \begin{figure}
        \centering
        \def\svgwidth{\columnwidth}
        \input{intro_example0.pdf_tex}
        \caption{orign}
        \label{intro_e0}
    \end{figure}
\end{document}

几乎确定是.pdf_tex 内容和自定义package冲突了,但是不明是哪里冲突,有谁能看下么

\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}{146.81691794bp}%
    \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.67960791)%
    \lineheight{1}%
    \setlength\tabcolsep{0pt}%
    \put(0,0){\includegraphics[width=\unitlength,page=1]{intro_example0.pdf}}%
    \put(0.09320036,0.49901525){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}0\end{tabular}}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=2]{intro_example0.pdf}}%
    \put(0.09320036,0.39684738){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}1\end{tabular}}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=3]{intro_example0.pdf}}%
    \put(0.0932004,0.11588546){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}1\end{tabular}}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=4]{intro_example0.pdf}}%
    \put(0.47633059,0.49901525){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}0\end{tabular}}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=5]{intro_example0.pdf}}%
    \put(0.47633059,0.39684738){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}1\end{tabular}}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=6]{intro_example0.pdf}}%
    \put(0.47633059,0.11588516){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}0\end{tabular}}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=7]{intro_example0.pdf}}%
    \put(0.85946075,0.49901569){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}1\end{tabular}}}}%
    \put(0,0){\includegraphics[width=\unitlength,page=8]{intro_example0.pdf}}%
    \put(0.09131421,0.60860249){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}a\end{tabular}}}}%
    \put(0.08554511,0.00144339){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}b\end{tabular}}}}%
    \put(0.47468278,0.01091853){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}c\end{tabular}}}}%
    \put(0.43232378,0.60622781){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\lineheight{1.25}\smash{\begin{tabular}[t]{l}$mid_0$\end{tabular}}}}%
  \end{picture}%
\endgroup%

image

vaple avatar Mar 31 '21 13:03 vaple