我遇到了同样的问题这里:我想利用“tex in inkscape”技术。
以下是一段文本:
\documentclass{article}
\usepackage{graphicx}
\usepackage{color}
\begin{document}
\begin{figure}[htb]
\centering
\def\svgwidth{200pt}
\input{drawing.pdf_tex}
\caption{Double pendulum}
\end{figure}
\end{document}
这是一个 pdf_tex:
\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}{311.07356567pt}
\else
\setlength{\unitlength}{\svgwidth}
\fi
\global\let\svgwidth\undefined
\makeatother
\begin{picture}(1,0.59438645)%
\put(0,0){\includegraphics[width=\unitlength]{drawing.pdf}}%
\put(0.48568235,0.40805542){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$\ell_1$}}}%
\put(0.67084755,0.16631196){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$\ell_2$}}}%
\put(0.71199538,0.04029675){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$m_2$}}}%
\put(0.55254756,0.27175325){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$m_1$}}}%
\put(0.52940191,0.0763011){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$\theta_2$}}}%
\put(0.42138888,0.28204021){\color[rgb]{0,0,0}\makebox(0,0)[lb]{\smash{$\theta_1$}}}%
\end{picture}%
\endgroup
我收到错误:
! Unable to load picture or PDF file 'drawing.pdf'.
<to be read again>
}
l.46 ...egraphics[width=\unitlength]{drawing.pdf}}
%
?
因此看起来我的 tex 是在寻找drawing.pdf
而不是drawing.pdf_tex
。
我在用着TeX Live 2012/Debian
。
答案1
\input{drawing.pdf_tex}
找到了drawing.pdf_tex
,但随后随着处理,它到了
\includegraphics[width=\unitlength]{drawing.pdf}
drawing.pdf
它需要大概由 inkscape 制作的文件?