編號練習,錯誤:缺少數字,視為零

編號練習,錯誤:缺少數字,視為零

我試著對問題集的一些練習進行水平編號,但出現錯誤

“缺失數字,視為零。”

此處顯示的「\multicolumn」之後的兩行:

\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}

我對 LaTeX 相當缺乏經驗。

答案1

結合@Mario SE 的回答\problem我剛剛創建了列印計數器的命令。

但我確信這裡有很多主題與表格樣式的問題枚舉清單相關。

\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}

在此輸入影像描述

答案2

你想做這樣的事情嗎?

\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}

在此輸入影像描述

相關內容