1

I'm running the following simple code which contains two commands that are pretty much the same ({\color{red}..). However, I can't figure out why the second one gives an "undefined control sequence" error while the first one does not (I marked it using a comment):

\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}

Can someone please give me any clue as to why the second latex line does not compile?

Thanks,

Gil.

  • 1
    please post a complete small document that shows the problem, you haven't even said which command is undefined, and we can't run the code fragment so hard to offer help – David Carlisle Nov 10 '14 at 23:11
  • Welcome to TeX.SX!. When asking questions it is better to give a full minimal working example (MWE) both in order to demonstrate what you are trying to do and to help others help you. The MWE should look like \documentclass...\begin{document}...\end{document}, it should compile and contain close to the minimal amount of code needed to explain/demonstrate what you are asking. This saves a lot of time for everyone. – Andrew Nov 10 '14 at 23:11
  • Thanks for your comments, indeed the question was quite vague (it's the late hour, sorry:) . I updated the question with some working code. Thanks!! – GilLevi Nov 10 '14 at 23:28
  • Are you sure you are receiving an undefined control sequence error? I can't reproduce the problem with your current code. Perhaps delete the .aux and .bbl file and try to recompile. – Werner Nov 10 '14 at 23:31
4

The ulem documentation suggests hiding \cite in \mbox and this seems to work:

enter image description here

\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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.