TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using LaTeX to write up my math notes and have been fairly successful implementing most of the styles I'm trying to figure out. I seem to be having trouble with the environment dcases* though.

Using the code

\item Let $g: \N \rightarrow \N$ be given by $n=$ 
$1$ & if $n=1$ \\ 
$n-1$ & if $n \not = 1$ 

gives me an error saying that it can only be used in math mode. Then it gives me a bunch of errors surrounding missing deliminators, but there aren't any missing. The other weird thing is that it does display properly.

share|improve this question
Welcome to TeX.sx! As new user without image posting privileges simply include the image as normal and remove the ! in front of it to turn it into a link. A moderator or another user with edit privileges can then reinsert the ! to turn it into an image again. – Qrrbrbirlbel Feb 15 '13 at 1:27
up vote 5 down vote accepted

Perhaps you meant something like the following, note that dcases must be in mathmode, and ideally in displayed mathmode such as

  • \[...\]
  • \begin{equation}...\end{equation}
  • \begin{equation*}...\end{equation*}

Here's a complete MWE:

% arara: pdflatex


Let $g: N \rightarrow N$ be given by 
        1 & if $n=1$ \\ 
        n-1 & if $n \ne 1$


For future reference, you can view pages 17 and 18 of the documentation which describe that

  • dcases puts every column in mathmode
  • dcases* puts only the first column in mathmode, and the second column in the normal roman font of the document (hence the need to step back into mathmode in the second column)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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