我正在尝试将带有 \includegraphics{pic.png} 的图片添加到考试包中的 .Rnw 文件的问题中。
类似于以下内容:
\begin{question}
What day is today: \includegraphics{picture.png}
\begin{answerlist}
\item \Sexpr{questions[1]}
\item \Sexpr{questions[2]}
\item \Sexpr{questions[3]}
\item \Sexpr{questions[4]}
\end{answerlist}
\end{question}
然后运行exams2pdf
exams2pdf(myexam, n = 1, nsamp = 2, dir = odir,
template = c("my_exam", "solution"),
encoding = 'UTF-8',
header = list(
Date = "30.05.2017"))
给我:
Error in texi2dvi(out_tex[j], pdf = TRUE, clean = TRUE, quiet = quiet) :
Running 'texi2dvi' on 'my_exam1.tex' failed.
LaTeX errors:
! Package pdftex.def Error: File `picture.png' not found.
我几乎尝试了图片可能位于的所有目录,但 tex2dvi / Exams2pdf 找不到 png - 对此有何建议?