1

I got this error in using pdflatex:

! Undefined control sequence.
l.6 \(1.5 \lt
              x \lt 5.5\)
? 
! Undefined control sequence.
l.6 \(1.5 \lt x \lt
                    5.5\)
? 

The tex-file is:

\documentclass[preview,border=2pt]{standalone}
\usepackage{amsmath}
\usepackage{tikz}

\begin{document}
\(1.5 \lt x \lt 5.5\)
\end{document}

The sequence "\lt" should represent "<" symbol. But it causes the error. Should I add some additional packages?

FireShock
  • 111

1 Answers1

3

As mentioned in What library do I have to use such that the document can render \lt and \gt as less than and greater than signs, respectively? you should define your own commands, because LaTeX can write < and > in math mode.

But if you use a "normal" TeX document (unlike the OP of the other question) you should have the following commands (note the \ensuremath):

\newcommand{\lt}{\ensuremath <}
\newcommand{\gt}{\ensuremath >}
TeXnician
  • 33,589