当前位置:网站首页>【LaTex异常与错误】 - 公式编号的参考引用命令\eqref发生错误Undefined control sequence——可能是因为没加载宏包amsmath
【LaTex异常与错误】 - 公式编号的参考引用命令\eqref发生错误Undefined control sequence——可能是因为没加载宏包amsmath
2022-08-08 23:11:00 【键盘即钢琴】
一、背景
在利用官方中文文档《一份不太简短的latex介绍》学习latex时,用到以下代码
\documentclass{article}
\begin{document}
The Pythagorean theorem is $a^2+b^2=c^2$.
The Pythagorean theorem is:
\begin{equation}
a^2 + b^2 = c^2 \label{pythagorean}
\end{equation}
Equation \eqref{pythagorean} is called `Gougu theorem' in Chinese.
\end{document}
使用pdflatex引擎进行编译时,使用命令\eqref的一行出现错误【Undefined control sequence】。
二、解决方法
参考来源:Reference to Equation fails
\eqref命令需要加载宏包amsmath才能正常使用。
改成下面的代码,运行后结果如下。
\documentclass{article}
\usepackage{amsmath}
\begin{document}
The Pythagorean theorem is $a^2+b^2=c^2$.
The Pythagorean theorem is:
\begin{equation}
a^2 + b^2 = c^2 \label{pythagorean}
\end{equation}
Equation \eqref{pythagorean} is called `Gougu theorem' in Chinese.
\end{document}
一次没编译完没关系,多编译几次,引用(reference)就正常了!!!
边栏推荐
- 用工具实现 Mock API 的整个流程
- Button Wizard for ts API usage
- Kubernetes与OpenStack
- stm32 uses serial port to receive idle interrupt + dma to achieve variable length dma reception
- 【PP-YOLOv2】测试自定义的数据集
- WeChat small program "decompiled" combat "behind to unpack the eggs
- Kubernetes 实现 CI/CD 发布流程
- (2022杭电多校五)1010-Bragging Dice (思维)
- MPLS Virtual Private Network Everywhere in Life
- [Bug solution] ValueError: Object arrays cannot be loaded when allow_pickle=False
猜你喜欢
随机推荐
加载 已训练模型 张量的 几种方法
(2022牛客多校五)G-KFC Crazy Thursday(二分+哈希/Manacher)
(2022杭电多校四)1011-Link is as bear(思维+线性基)
(2022牛客多校四)D-Jobs (Easy Version)(三维前缀或)
(2022杭电多校五)1010-Bragging Dice (思维)
Excuse me: is it safe to pay treasure to buy fund on
使用Mongoose populate实现多表关联存储与查询,内附完整代码
[YOLOv5] 6.0 environment construction (updated from time to time)
postman request+加密解密
STM8L LCD digital tube driver, thermometer LCD display
Kubernetes 实现 CI/CD 发布流程
A preliminary study on the use of ndk and JNI
Tp5 in cache cache, storage cell phone text message authentication code
Share | design based on MCU P0 mouth to drive the LED flashing
Free ARP
[PP-YOLOv2] Test a custom dataset
[Bug solution] ValueError: Object arrays cannot be loaded when allow_pickle=False
iptables firewall content full solution
2021 RoboCom 世界机器人开发者大赛-本科组(决赛)7-4猛犸不上 Ban(最短路)
(newcoder 15079)无关(容斥原理)