我想为我的学生生成一个测验,并将其导入穆德尔平台。测验包括一些图形。
我尝试过穆德尔我从 texlive 2018 中安装了软件包,但在使用时出现以下错误tikz图片环境 :
ERROR:
Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "geometry-tikztemp-1" "\def\tikzexternalrealjob{geometry}\input{geometry}"' did NOT result in a usable output file 'geometry-tikztemp-1' (expected one of .pdf:.jpg:.jpeg:.png:).
Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that.
Or maybe the command simply failed? Error messages can be found in 'geometry-tikztemp-1.log'.
If you continue now, I'll try to typeset the picture.
以下是一个例子:
\documentclass{article}
\usepackage{tikz}
\usepackage[draft]{moodle}
\begin{document}
\begin{quiz}{geometry}
\begin{multi}{circle}
is the shape in the figure a circle?
\begin{tikzpicture}
\draw (0,0)circle[radius=1cm];
\end{tikzpicture}
\item yes
\item* no
\end{multi}
\end{quiz}
\end{document}
答案1
如果您很着急,这不是答案,而是一种解决方法。说实话,我几乎从未见过像这里看到的这么强烈的“副作用” moodle
。即使在加载此包后尝试执行\savebox
也会失败。希望您能找到可以解决这个问题的专家。
\documentclass{article}
\usepackage{tikz}
\usepackage[draft]{moodle}
\newsavebox\picbox
\begin{lrbox}{\picbox}%
\begin{tikzpicture}
\draw (0,0) circle(1cm);
\end{tikzpicture}
\end{lrbox}
\begin{document}
\begin{quiz}{geometry}
\begin{multi}{circle}
is the shape in the figure a circle?
\usebox\picbox
\item yes
\item* no
\end{multi}
\end{quiz}
\end{document}
答案2
答案3
这个问题的答案是在很久之后才出现的,但它可能会帮助某些人了解:
- 如果在(版本)
tikz
之后加载包,则 OP 提供的示例可以很好地编译。moodle
0.5
- 从 版本开始
0.8
,moodle
您不再需要tikz
在 之后加载moodle
。