我想从 PDFLaTeX 切换到 LuaLaTeX 以使用 OpenType 字体。当我切换编译器时,我收到很多错误,第一个是:
Undefined control sequence.
<argument> \pdfpagewidth
l.5 \begin{document}
Overleaf 对这个问题的看法如下:
The compiler is having trouble understanding a command you have used.
Check that the command is spelled correctly.
If the command is part of a package,
make sure you have included the package in your preamble using \usepackage{...}.
以下是相应的最小工作示例:
\documentclass{article}
\usepackage[pdftex]{graphicx}
\begin{document}
Test
\end{document}
答案1
问题出在导入时graphicx
。在 pdftex 中,我使用的模板用于\usepackage[pdftex]{graphicx}
导入。像这样graphicx
删除后,错误消失了。pdftex
\usepackage{graphicx}