1

I'm trying to horizontally number some exercises for a problem set, and I'm getting an error

"Missing number, treated as zero."

on the two lines after "\multicolumn" shown here:

\documentclass[11pt,epsfig]{article}

\oddsidemargin=0in
\evensidemargin=0in
\textwidth=6.3in
\topmargin=-0.5in
\textheight=9in

\parindent=0in
\pagestyle{empty}

\input{notestpoints}

\begin{document}

QUIZ 3.1-3.5 \hfill {Name:} {\underline {\hspace{2.5in}}}
\vspace{1pc}

Simplify each expression by clearing parentheses and combining like terms. 
\\
\begin{problem}{0}
$\displaystyle -2(4a+3)-14$
\end{problem} 
\vspace{.6 in}

\begin{problem}{0}
$\displaystyle -2(4a+3)-14$
\end{problem} 
\vspace{.6 in}

Solve the equation using the appropriate property of equality. %\textit{(2 points each)}
\vspace{1pc}

\begin{tabular}{ll}
\multicolumn{2}{c} 
\problem{} $\displaystyle -20t=36$ \hspace{1.5in} \problem{} \hspace{.15in} $\displaystyle 1.2+z=-3.7$ \\\\\\
\problem{} $\displaystyle \frac{2}{3}y=12$ \hspace{1.5in} \problem{} \hspace{.15in} $\displaystyle 7=\frac{x}{4}$
\end{tabular}

\end{document}

I'm fairly inexperienced with LaTeX.

  • 2
    Welcome to TeX.SE. Could you provide a code that can be copy/past and compile without any modification? Just add the documentclass and the package needed :-) – Romain Picot Feb 16 '16 at 15:32
  • 2
    Hi, as stated by Romain already, you should add a minimum working example which can be compiled. Otherwise we can't help you. – Eric Feb 16 '16 at 15:40
  • Did you define \problem{}? – Sigur Feb 16 '16 at 17:15
  • Originally it was defined as \problem then I tried \problem{0}, which just placed a zero after the numbered exercise. As you can seen, I don't know what I'm doing. – c_law Feb 16 '16 at 17:20
  • 1
    @c_law, you can not use \begin{problem}{0} if the problem environment was not defined. – Sigur Feb 16 '16 at 17:55
1

Combining with the answer by @Mario S. E. I just created the command \problem to print a counter.

But I'm sure that there are many topics here related to enumerated list of problems in tabular style.

\documentclass[11pt,epsfig]{article}

\oddsidemargin=0in
\evensidemargin=0in
\textwidth=6.3in
\topmargin=-0.5in
\textheight=9in

\parindent=0in
\pagestyle{empty}

%\input{notestpoints}
\newcounter{problem}
\setcounter{problem}{0}
\newcommand{\problem}{\stepcounter{problem}\theproblem.\ }

\begin{document}

Solve the equation using the appropriate property of equality. %\textit{(2 points each)}
\begin{center}
\renewcommand*{\arraystretch}{1.5}
\begin{tabular}{|ll@{\hspace*{2in}}||ll@{\hspace*{2in}}|}
\problem $-20t=36$               &           & \problem $1.2+z=-3.7$       & \\
\problem $\frac{2y}{3}=12$       &           & \problem $7=\frac{x}{4}$    &
\end{tabular}
\end{center}

\end{document}

enter image description here

  • I was actually getting the output I would like for the most part, just with the error. The document is a worksheet with exercises numbered vertically, except for this subsection containing two columns numbered horizontally. What you have above is what I want except without lines. I'm guess those can be easily omitted. I still don't understand why I was getting an error, but this fixes my problem. Thanks! – c_law Feb 16 '16 at 18:00
  • @c_law, to omit the lines remove the vertical bars |. – Sigur Feb 16 '16 at 18:01
  • Ok, I was wrong. I added this to the code above and still got the "Missing number, treated as zero" error. Also, the output is correct, but the numbering font is smaller than the rest of the numbering in the document. – c_law Feb 16 '16 at 18:08
0

Are you trying to do something like this?:

\documentclass{article}

\begin{document}

\begin{center}
\renewcommand*{\arraystretch}{1.5}
\begin{tabular}{|ll@{\hspace*{2in}}||ll@{\hspace*{2in}}|}
$-20t=36$               &           &$1.2+z=-3.7$       & \\
$\frac{2y}{3}=12$       &           &$7=\frac{x}{4}$    & \\
\end{tabular}
\end{center}

\end{document}

enter image description here

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.