我正在运行以下简单代码,其中包含两个几乎相同的命令({\color{red}..)。但是,我不明白为什么第二个命令会给出“未定义的控制序列”错误,而第一个命令不会(我使用注释标记了它):
\documentclass[10pt,twocolumn,letterpaper]{article}
\usepackage[table]{xcolor}
\definecolor{Gray}{gray}{0.85}
\definecolor{red}{RGB}{255,0,0}
\usepackage{color}
\newcommand{\cellem}{\cellcolor{gray}\color{white}}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage[normalem]{ulem}
\begin{document}
%COMPILES
{\color{red}\sout{and is an order of magnitude}}
%DOES NOT COMPILE
{\color{red}\sout{Comparisons are provided using a wide range of relevant alternative methods. These include the early, ``pure''-binary descriptors: BRIEF~\cite{calonder2010brief}, BRISK~\cite{leutenegger2011brisk}, FREAK~\cite{alahi2012freak}, and ORB~\cite{rublee2011orb}. We additionally provide results comparing LATCH to the more computationally expensive BinBoost~\cite{lepetit2013boosting,trzcinski2013learning}, LDA-Hash~\cite{strecha2012ldahash}, DBRIEF~\cite{trzcinski2012efficient} and A-KAZE~\cite{Alcantarilla13bmvc}. Finally, the performance of SIFT~\cite{lowe2004distinctive} and SURF~\cite{bay2006surf} are also provided as baseline methods.}}
\end{document}
有人可以告诉我为什么第二行乳胶无法编译吗?
谢谢,
吉尔。
答案1
ulem 文档建议隐藏\cite
,\mbox
这似乎有效:
\documentclass[10pt,twocolumn,letterpaper]{article}
\usepackage[table]{xcolor}
\definecolor{Gray}{gray}{0.85}
\definecolor{red}{RGB}{255,0,0}
\usepackage{color}
\newcommand{\cellem}{\cellcolor{gray}\color{white}}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage[normalem]{ulem}
\begin{document}
%COMPILES
{\color{red}\sout{and is an order of magnitude}}
%DOES NOT COMPILE
{\color{red}\sout{Comparisons are provided using a wide range of relevant alternative methods.
These include the early, ``pure''-binary descriptors: BRIEF~\mbox{\cite{calonder2010brief}},
BRISK~\cite{leutenegger2011brisk}, FREAK~\mbox{\cite{alahi2012freak}}, and ORB~\mbox{\cite{rublee2011orb}}.
We additionally provide results comparing LATCH to the more computationally expensive
BinBoost~\mbox{\cite{lepetit2013boosting,trzcinski2013learning}}, LDA-Hash~\mbox{\cite{strecha2012ldahash}},
DBRIEF~\mbox{\cite{trzcinski2012efficient}} and A-KAZE~\mbox{\cite{Alcantarilla13bmvc}}. Finally,
the performance of SIFT~\mbox{\cite{lowe2004distinctive}} and
SURF~\mbox{\cite{bay2006surf}} are also provided as baseline methods.}}
\end{document}