当前位置:网站首页>【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)就正常了!!!
边栏推荐
- Analysis of WLAN - Wireless Local Area Network
- WeChat applet develops some function usage methods
- CTF Attack and Defense World
- 4399 it operations intern interview experience
- 待完善:tf.name_scope() 和 tf.variable_scope()的区别
- 2022杭电多校六 1009-Map (巴那赫不动点)
- 【YOLOv5】6.0环境搭建(不定时更新)
- [Tensorflow2] Some interface changes of tensorflow1.x-tensorflow2.x
- (2022牛客多校五)G-KFC Crazy Thursday(二分+哈希/Manacher)
- JS中的预编译(AO、GO详解)
猜你喜欢
随机推荐
wps a3格式怎么转换成a4?wps a3格式转换成a4的方法
加载 已训练模型 张量的 几种方法
(2022牛客多校三)J-Journey(dijkstra)
C语言中指针的介绍
JSDay2-两个数组的交集
flutter 基本类写法
【Verilog基础】关于芯片中信号串扰的理解
The Socket (Socket)
【Tensorflow2】tensorflow1.x-tensorflow2.x一些接口的转变
微信小程序 wx:for 循环输出 例子
Button Wizard Delete File Command
JSDay1-合并两个有序数组
MySQL indexes a field in a table
(2022牛客多校五)B-Watches(二分)
Introduction to Qt (4) - Continuous playback of pictures (the use of two timers)
人人熟知的IPV6竟然还有这么多细节
Virtual router redundancy protocol VRRP - double-machine hot backup
Kubernetes 企业如何落地
线性筛求积性函数
(2022杭电多校五)1010-Bragging Dice (思维)








