以下是 MWE(使用 overleaf 上的 XeLateX):
\documentclass[11pt, a4paper, preprint]{article}
\usepackage{amsmath, amssymb, graphicx, outline, float, cite, color}
\usepackage{longtable,array}
\renewcommand{\thefigure}{S\arabic{figure}}
\renewcommand{\thetable}{S\arabic{table}}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{authblk}
\usepackage{placeins}
\usepackage{caption}
\captionsetup[figure]{font=footnotesize,labelfont=normalsize}
\usepackage{xr-hyper}
\usepackage{hyperref}
\usepackage{framed}
\usepackage{graphicx}
\graphicspath{ {Figs/} }
\newcommand{\tcr} { \textcolor{red} }
\title{compile errors}
\begin{document}
\begin{align}
\bm{K} &= \sigma_0\\
\text{foo} &= \text{bar}
\end{align}
\end{document}
以下是完整的错误输出:
<argument> \bm
{K}(\bm {x},\bm {x'}) &= \sigma _0 + \sigma _i^2 exp
\left [...
l.383 \end{align}
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.
答案1
您没有显示错误消息:
! Undefined control sequence.
<argument> \bm
{K} &= \sigma _0\\ \text {foo} &= \text {bar}
l.25 \end{align}
?
所以这向你表明\bm
你需要加载未定义的命令bm
。