I've been using this newcommand for ages and it always worked perfectly:  \newcommand{\comment}[1]{\textit{\small\textcolor{red}{ #1}}}   However, in my new latex document it returns an error:  Undefined control sequence. \comment{ciao}   This is the heading I'm using, but I can't find any incompatibility:  \documentclass[twocolumn,aps,prl,showpacs,superscriptaddress,notitlepage]{revtex4-1} \usepackage[a4paper,top=3cm,bottom=3cm,left=1.cm,right=1.cm]{geometry} \usepackage[english]{babel} \usepackage{graphicx}                \usepackage{booktabs}            \usepackage{amsmath}                 \usepackage{mathtools}               \usepackage{braket}                  \usepackage{multirow} \usepackage{setspace} \usepackage[separate-uncertainty=true]{siunitx}  \DeclarePairedDelimiter\abs{\lvert}{\rvert}   \newcommand{\comment}[1]{\textit{\small\textcolor{red}{ #1}}}  \newcommand{\oos}{\omega_s} \newcommand{\ooi}{\omega_i} \newcommand{\oop}{\omega_p} \newcommand{\ooa}{\left( \oos,\ooi\right)}  \makeatletter \let\cat@comma@active\@empty \makeatother   I'd like to ask you if you can see where the problem is!  Thanks
123935
I am trying to create a very simple new command such as follows:  \newcommand{\rvm}[1]{\textcolor{red}{#1}}   My text is organized in a main tex file and the sections are in other files. I call them using \input in the main .tex file.  However, no matter when I call it, the \newcommand is undefined. The tex editor returns the following error:  Undefined control sequence. \rvm{test}   Is it something about the template I am using? I tried it in other documents and it works. How can I solve this issue?
63774
This minimal example produces an error (undefined control sequences):  % !TEX TS-program = pdflatexmk  \documentclass{article}  \usepackage{tikz} \usepackage{preview}  \begin{document}  Hello.  \end{document}   Once the tikz package is removed, it compiles fine. Removing either usepackage commands allows the program to compile. Moreover, including both, but adding the [active] option to preview allows the script to compile.   I've pasted the log file .
16244
The first time I learnt LaTeX, I thought \newcommand properly fits for inline mode and \newenvironment for displayed mode.  Later I noticed it is not correct. So the question is   What is the rule of thumb when deciding whether we should use one over the other one?
108175
I'm trying to typeset an article.  In the preamble, I defined these two things:  \newcommand{\leftexp}[2]{{\vphantom{#2}}^{#1}{#2}}  \newcommand{\hr}{\leftexp{*}{\mathbb{R}}}   However, when I try to use $\hr$ in a section, as in:  \section{Constructing $\hr$}   I get an error:  Incomplete `\iffalse`; all text was ignored after line 1.   Any idea what could be causing this? Everything works just fine if I don't have the $\hr$ in the section (e.g. It typesets just fine if I have \section{Constructing $\mathbb{R}$}, say).
21700
I am running this LaTeX file through pdflatex and getting these warnings:     latex warning: there were undefined references.   latex warning: label(s) may have changed. Rerun to get cross-reference right.   and also some more warnings like this:     latex warning: reference 'lastpage' on page 76 undefined on input line 3200.   on every page end.  My LaTeX file is like this   \documentclass[a4paper,leqno,twoside]{article}  \usepackage[latin1]{inputenc} \usepackage[english]{babel} \usepackage{multirow}  \renewcommand{\familydefault}{\sfdefault}  \usepackage{color} \usepackage[colorlinks=true]{hyperref} \usepackage{draftwatermark} \SetWatermarkText{EXPERIMENTAL}  \SetWatermarkScale{0.6}  \usepackage{parskip}   \graphicspath{{Figure/}}    \let\oldsection\section  \renewcommand{\section}{\clearpage\oldsection}   \begin{document}      % Issued by {Name, acronym, department, phone}  \issuedby{vrebwr}  % Checked by   \checkedby{-}   % Approved by  \approvedby{-}   % Document title. Use \doctitleShort{} to insert a shorter title in the header.   \doctitle{test numbers with id}   \doctitleShort{document for tests}   % Publish date  \publishdate{\today}     % Titlepage  \frontmatter % Should be on first page  \maketitle     \vspace*{08eX}   \begin{center}    \subsection*{Abstract}    \end{center}    \noindent      it contains information about tests.    \newpage     \mainmatter     % Main pages. This command should be on page 2 or later.     \phantom{phantom}    \cleardoublepage     \subsection*{Change Record}    \begin{itemize}   \item R.1: Initial version.    \begin{itemize}   \item  generation of documentation using the vrebwr     \end{itemize}    \end{itemize}      \cleardoublepage    \setcounter{tocdepth}{2}     \tableofcontents      \cleardoublepage     \section{ How to read the tset information}     \begin{enumerate}      \item information how to read     \item information of tests     \end{enumerate}      \section{test numbers}     \subsection*{1, temperature sensor. }    \addcontentsline{toc}{subsection}{ 1, temperature sensor.}    \subsubsection*{data}    some data regarding test where we performed    \subsubsection*{values}    temperature sensor value here three or more.     \subsubsection*{reason}        why we get like this.      \newpage      \subsection*{2, humidity sensor. }     \addcontentsline{toc}{subsection}{ 2, humidity sensor.}    \subsubsection*{data}    some data regarding test where we performed    \subsubsection*{values}    humidity sensor value here three or more.     \subsubsection*{reason}         why we get like this.    \subsection*{3, pressure sensor. }    \addcontentsline{toc}{subsection}{ 3, pressure sensor.}    \subsubsection*{data}    some data regarding test where we performed    \subsubsection*{values}    pressure sensor value here three or more.    \subsubsection*{reason}      why we get like this.    \newpage   \end{document}   In the above LaTeX file I have around 100 tests. I used the * symbol to eliminate numbering in subsections, because I am using test names with number so there is no need to add numbering. It looks bad in the PDF, so I  tried to add that test name and number in table of contents by using this command:  \addcontentsline{toc}{subsection}{1,temperature sensor.}   When I used this command I am getting errors like as I explained above. I searched and I found some reasons why this error occurred, because of \label{} and \ref{} is not used like that. But I don't know how to use that in my file. Can anyone help me with it?
37134
I'm having trouble getting basic APA bibliographies to work. The same thing works with nejm style, but changing the style to apa gives errors:  ! Undefined control sequence. &lt;argument&gt; \mkbibdateapalongextra  {year}{month}{day}\iffieldundef {endyear}{...  Package biblatex Warning: Macro 'name:apa:last-first' undefined. (biblatex)                Using \newbibmacro.  Package biblatex Warning: Macro 'name:apa:first-last' undefined. (biblatex)                Using \newbibmacro.   I'm using texlive 2012, as you can see I'm using biber, yes, I reran biber, and also tried delting the .bbl file and rerunning tools. My source markup is:  \documentclass[12pt]{article}  \usepackage[hidelinks]{hyperref} \usepackage[backend=biber,style=apa]{biblatex}  \addbibresource{BibResource.bib}  \begin{document}  test\parencite{ormrod2004human}  \clearpage  \printbibliography  \end{document}
6056
I’m getting an “undefined control sequence” error with the following code, using TeXstudio:  \documentclass[11pt]{article} \begin{document} \begin{center} \chapter{CHAPTER 6} \end{center} \end{document}
46316
Here is a minimal example showing the problem.  \documentclass[10pt]{article} \usepackage[usenames,dvipsnames]{color} \usepackage{soul} %\soulregister{\ref}{1} \begin{document}  \section*{x}\label{x}  \section*{y} \hl{ Some text.   Section~\ref{x}. } \end{document}   I'm getting the error  LaTeX Warning: Reference `{x}' on page 0 undefined on input line 12.  ! Argument of \ref has an extra }.   The problem is with \ref. Commenting out the line beginning with "Subsection" makes the error disappear. \soulregister is intended for font commands. I don't know if \ref is a font command, but I could not get \soulregister to fix the problem (see the commented line above).
51329
Firstly, hello everyone. I am new here : )  I am writing my phd thesis using MikTeX + TeXnicCenter and everything goes well, until I have updated MikTeX today.  My Problem:  The program gives an error message to the "same old" command:  \printbibliography[prefixnumbers={},notkeyword={Eigene}, notkeyword={Datenblatt}, title={Fremdliteratur}, heading=subbibliography]   The error message looks like this:  Undefined control sequence. &lt;argument&gt; ...nameprefix {van~der}\isdot }\ifprefchar    Investigation  I have found out that this error comes from the name prefix "van der". If I write them together without space in *.bib file and compile it, it works again.  What's the best way to fix this or work around it? Is it a bug?
33623
I have a document where I quiet often refer to source code element, such as class names, I wanted to format these strings differently, but at the beginning I didn't want to fiddle with various options I had, rather I defined my custom command as follows:  \providecommand{\inlinecode}[1]{\texttt{#1}}   Now my question is, what do you think is the best way to define \inlinecode? Note: I often use text with unescaped &lt;, >, e.g., List&lt;T&gt;.   The \texttt looks fine to me, and works with &lt;, >, but sometimes the words overflow the line. Is there any way to tell latex not to overflow the line, but rather "underflow" or insert more spaces between words, which seems to me as (maybe still ugly but) more acceptable than overflow? And is it possible to achieve it by only changing definition of my command, so I won't have to change the whole source?
3683
Since I wanted a better readability of highlights of a would be black &amp; white-printed document, I needed to change both the highlighting color (gray) AND the font color (white).  Depending which command you implement inside the other will compile or not: \hl{\textcolor{white}{Fail}} does not work, compiling returns Package xcolor Error: Undefined color '{white}'.  Here's the mwe:  \documentclass{article} \usepackage{xcolor} \usepackage{color} \usepackage{soul} % Enables highlighting \sethlcolor{gray}  \begin{document}      \textcolor{white}{\hl{Success}}     %% Error:     %% Package xcolor Error: Undefined color `{white}'.     \hl{\textcolor{white}{Fail}}  \end{document}   So, in the end, the problem is sorta solved but I thought you might have an answer as to what happens.
118328
I need to write an article with APA citations. I have sample code that works fine with style=authoryear, but if I switch to style=apa I get the following error message:   Error Line 21 ! Undefined control sequence.&lt;argument&gt; \printdateextralabel   I'm using TexMaker with biber. I've gone through example after example and I can't figure out what's wrong. I suspected it was with TexMaker or MiKTeX, but I just uninstalled and reinstalled both programs and I'm having the same issue. The same error message always pops up with the line number after \printbibliography. I tried copying corrected MWE's from other questions (such as  answered by Alan Munn) and I get the same error.  I included a MWE and my .bib file (borrowed from another thread) below.  File MWE:  \documentclass[article,12pt,letterpaper]{apa6} \usepackage[american]{babel} \usepackage{csquotes} \usepackage[style=apa,natbib=true,backend=biber]{biblatex} \DeclareLanguageMapping{american}{american-apa}   \title{Annotated Bibliography 1} \author{Joe Smith} \affiliation{Spectacular University} \addbibresource{bib.bib}  \begin{document} \abstract{abstract goes here} \maketitle this is a test \cite{Kim1999188} \printbibliography \end{document}   bib:  @article{Kim1999188, title = "Absorption of water vapour into lithium bromide-based solutions with additives using a simple stagnant pool absorber ", journal = "International Journal of Refrigeration ", volume = "22", number = "3", pages = "188 - 193", year = "1999", note = "", issn = "0140-7007", doi = "10.1016/S0140-7007(98)00061-9", url = "http://www.sciencedirect.com/science/article/pii/S0140700798000619", author = "Jin-Soo Kim and Huen Lee and Sun Il Yu", keywords = "Absorption", keywords = "Water", keywords = "Lithium bromide", keywords = "Absorption", keywords = "Eau", keywords = "Bromure de lithium " }      Here is a link to my .
94562
\documentclass{beamer}  \usepackage{subfig}  \begin{document}  test  \end{document}   returns undefined control sequence \@@magyar@captionfix  (It was not so in January; I am on fully updated pretest)
7538
In the following code, I need to use +/- where I have used it, and plus/minus where I have used it.  \documentclass{amsart} \usepackage{lipsum} \usepackage{calc} \parindent=0 pt \parskip=12 pt plus 0 pt minus 0 pt \def\headsep{25pt} \newcommand{\LAYOUT}[5]{%   \setlength{\hoffset}{0pt}   \setlength{\voffset}{0pt}   \setlength{\topmargin}{#1 - 1in - \voffset - \headheight - \headsep}    \setlength{\oddsidemargin}{#2 - 1in - \hoffset}   \setlength{\evensidemargin}{\oddsidemargin}   \setlength{\textheight}{#3}   \setlength{\textwidth}{#4}   \setlength{\marginparwidth}{#5} } \newcommand{\FULLPAGE}{\LAYOUT{1in}{1in}{9in}{6.5in}{0.75in}}  \FULLPAGE \begin{document} \lipsum[1-10] \end{document}   If I replace the plus and minus in line 5 with + and - I get an enigmatic  "missing begin{document}" error.    If I replace the minus's in lines 10-11 with "-" I get an equally enigmatic error:  "Missing number, treated as zero. Illegal unit of measure (pt inserted)."   Can somebody please explain when one can use +/- and when one can use plus/minus?  Presumably there's a good reason why latex's error messages are so completely mystifying, and why inconsistencies like these keep appearing? It's really hard to explain to my coauthors, who regularly complain that latex is the most infuriating program ever devised by mankind.  Thanks very much for any advice!   Leo
3858
I'm working on an exam document class where the user enters in questions something like this:  \multiplechoice{Question} {Answer #1} {Answer #2} {Answer #3} {Answer #4} {Correct answer} {Explanation}   I'd like to process this information in various ways in one LaTeX run (to create an answer sheet, key, and the test itself), so the questions need to be stored in a macro. The awkwardness comes when one defines:  \newcommand{\sectionA}[1]{\newcommand{\putsectionA}{#1}}   and then asks the user to put 15 questions as an argument to \sectionA. I'd much rather have those questions be the contents of an environment, like so:  \begin{sectionA} lots of questions \end{sectionA}   Mostly because I find it much easier to keep track of environment declarations than curly brackets. Is it possible to have the contents of an environment get packaged up into a macro?  Edit:  The solution would seem to be to us the environ package, but it doesn't seem to be working. Here's what I'm trying:  \documentclass{article} \usepackage{environ} \NewEnviron{foo}{\edef\foot{\BODY}} \begin{document} \begin{foo}   Store This \end{foo} \foot \end{document}   However when running this code \foot remains undefined. It actually seems impossible to define any macro using environ. Even when not using \BODY. For example, replacing the definition above with  \NewEnviron{foo}{\newcommand{\foot}{Print me}}   still fails. I've also tried \Collect@Body from the environ package with similar results. Does \NewEnvrion somehow prohibit defining new commands?
90386
Hello I've been having a "Missing $ inserted" on my latex document and i'm not sure what to do. I've tried asking previously but wasn't able to fix it.  I'm not sure at all what I'm doing wrong but i get an error Missing $ inserted. $ on the 2nd line with c)\  The text works fine separately but when put with the rest of the document i keep on getting errors.  The rest of the text works fine and there are no $ signs that are not already paired in previous parts  \noindent c)\\ coordinates = (99,85),(190,220),(286,383)\\ \begin{align} error&amp;= \left | y-(a+bx) \right |\\ E&amp;= \left | y-(475.5+1.253x) \right |\\ (99,85): E&amp;=\left | 85-(475.5-1.253(99) \right |\\ &amp;=\left | 85-(351.5) \right |\\ &amp;=266.5\\ (190,220): E&amp;=\left | 220-(475.5-1.253(190) \right |\\ &amp;=\left | 220-(237.5) \right |\\ &amp;=17.5\\ (286,383): E&amp;=\left | 383-(475.5-1.253(286) \right |\\ &amp;=\left | 386-(117.2) \right |\\ &amp;=265.8\\ \end{align} $\therefore$ \text{Next location is "The Reservoir" at (190,220)} \end{document}   This is link to writeLatex online document   Is anyone able to help with this? Error is at end.
50813
I am using LyX with MikTeX and I am trying to use the following command \oiiint but I am getting the following error:   \oiiint  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.   I have added \usepackage{mathdesign} to the preamble in:  Document -&gt; Settings -&gt; LaTeX Preamble  Why is this not working?