Text FormattingSymbol Command causes Error

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
sachinrajsharma
Posts: 35
Joined: Sun Apr 08, 2012 5:48 am

Symbol Command causes Error

Post by sachinrajsharma »

Hi,

I'm using the following source code for making a case differentiation. However, it is showing in the log "undefined control sequence". Please help, where I am wrong in coding.

Code: Select all

\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\begin{document}
  $$
    f(x) = 
    \begin{cases}
      |2x-3|[x] & \text{if} \ x\ge1 \\ 
      \sin\frac{\pi x}{2} & \text{if} \ x\lt 1 \ 
    \end{cases}.
  $$
\end{document}
Regards,

Sachin
Last edited by cgnieder on Tue May 07, 2013 7:09 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Symbol Command causes Error

Post by cgnieder »

Simply replace \lt by <.

By the way: $$ ... $$ is plain TeX syntax and should be avoided in a LaTeX document, see Why is \[ … \] preferable to $$ … $$? for reasons why.

Regards
site moderator & package author
sachinrajsharma
Posts: 35
Joined: Sun Apr 08, 2012 5:48 am

Re: Symbol Command causes Error

Post by sachinrajsharma »

Thanks a lot... thanks once again it fine now....

Sachin Sharma
Post Reply