error sample code
xiaohongliang2020 opened this issue · 0 comments
xiaohongliang2020 commented
at: https://github.com/xinychen/latex-cookbook/blob/main/chapter-4/section1.ipynb 【例4】
\documentclass[12pt]{article}
\begin{document}
Equation~\eqref{eq1} shows a simple formula.
\begin{equation}\label{eq1}
x+y=2
\end{equation}
\end{document}
error: Undefined control sequence.
It seems shoud use package amsmath
to make \eqref
work,
so correct code is
\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
Equation~\eqref{eq1} shows a simple formula.
\begin{equation}\label{eq1}
x+y=2
\end{equation}
\end{document}