我正在尝试绘制如下所示的曲线:
%&lualatex
% !TeX program = lualatex
\documentclass[border=5pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot [red] {-sqrt(x^3+7)};
\end{axis}
\end{tikzpicture}
\end{document}
问题是,该解决方案在 中运行得很好pdflatex
,但是,当我尝试使用 编译这个MWE
(在答案中给出)时lualatex
,我收到一系列错误,例如:
> ! Undefined control sequence. \sa@placebox ->\newpage \global
> \pdfpagewidth
> =\wd \sa@box \global \pdfpageh... l.13 \end{document}
> The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g.,
> `\hobx'), type `I' and the correct spelling (e.g., `I\hbox').
> Otherwise just continue, and I'll forget about whatever was undefined.
>
> ! You can't use a prefix with `the character ='. <to be read again>
> = l.13 \end{document}
> I'll pretend you didn't say \long or \outer or \global or \protected.
>
> ! Missing number, treated as zero. <to be read again> \global l.13
> \end{document}
> A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird
> error' in the index to The TeXbook.)
>
> ! Illegal unit of measure (pt inserted). <to be read again> \global
> l.13 \end{document}
> Dimensions can be in units of em, ex, in, pt, pc, cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one! I'll assume
> that you meant to say pt, for printer's points. To recover gracefully
> from this error, it's best to delete the erroneous units; e.g., type
> `2' to delete two letters. (See Chapter 27 of The TeXbook.)
>
> ! Undefined control sequence. \sa@placebox ...wd \sa@box \global
> \pdfpageheight
> =\ht \sa@box \global \pape... l.13 \end{document}
> The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g.,
> `\hobx'), type `I' and the correct spelling (e.g., `I\hbox').
> Otherwise just continue, and I'll forget about whatever was undefined.
>
> ! You can't use a prefix with `the character ='. <to be read again>
> = l.13 \end{document}
> I'll pretend you didn't say \long or \outer or \global or \protected.
>
> ! Missing number, treated as zero. <to be read again> \global l.13
> \end{document}
> A number should have been here; I inserted `0'. (If you can't figure out why I needed to see a number, look up `weird
> error' in the index to The TeXbook.)
>
> ! Illegal unit of measure (pt inserted). <to be read again> \global
> l.13 \end{document}
> Dimensions can be in units of em, ex, in, pt, pc, cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one! I'll assume
> that you meant to say pt, for printer's points. To recover gracefully
> from this error, it's best to delete the erroneous units; e.g., type
> `2' to delete two letters. (See Chapter 27 of The TeXbook.)
>
>
> Overfull \hbox (30.56pt too wide) in paragraph at lines 13--13
> []\TU/lmr/m/n/10 ==[] []
谁能告诉我哪里出了问题?
免责声明:我正在使用
MikTex-2.9.6300
并被standalone
打包在 上21-Jul-2015
。
答案1
错误消息表明您的独立包已过期。因此,请在 miktex 控制台(管理员和用户模式)中运行更新工具。
如果你不想更新,请使用此https://tex.stackexchange.com/a/315027/2388。