6
\documentclass[10pt]{article}
\usepackage{amsmath,amsthm,amssymb}
\begin{document}
\begin{enumerate}

\item Calculate:

\begin{align*}
(a) &\,\: +(-31)+(-14)=  & \quad(d) &\,\: -(-12)-(+9)=  & \quad(g) &\,\: (-11)\cdot(+18)=  & \quad(j) &\,\: (-18):(+9)=\;\: \\   
(b) &\,\: +(+44)+(-28)= & \quad(e) &\,\: -(-21)-(-15)= & \quad(h) &\,\: (-13)\cdot(-17)=  & \quad(k) &\,\: (-39):(-3)=\;\:\\
(c) &\,\: -(-26)+(-54)= & \quad(f) &\,\: +(+22)-(+10)= & \quad(i) &\,\: (+27)\cdot(-19)=  & \quad(l) &\,\: (+52):(-4)=\;\:
\end{align*}

\end{enumerate} 
\end{document}

I want it to look like this:

I want the text to have this format and a 1 instead of 2. I inserted several spaces (; : \ quad) to try to adjust the text.

enter image description here

etmat
  • 61
  • Welcome to TeX.SE. Note that you want to highlight your code and then click {} in order to have it format properly. You've also not given the code that creates that image (specifically, nothing you have here would cause \item to give 2). The parts that you've left out might not be important, but then again, they could be. What are you intending with the ,:? – Teepeemm May 02 '21 at 03:19

2 Answers2

7

Here's a solution that employs the tasks package and its tasks environment. Observe that this setup (a) generates horizontal (rather than vertical) lists and (b) allows the content of each task to be rendered in math mode automatically.

Incidentally, you may want to use \div rather than : to indicate division.

enter image description here

\documentclass{article}
\usepackage{tasks}
\usepackage{enumitem}
\usepackage[a4paper,margin=2.5cm]{geometry} % make sure text block is wide enough 
\begin{document}

\begin{enumerate}[wide=0pt] Calcule: \begin{tasks}label=(\alph*),label-width=2em,item-format=\ensuremath % see also https://tex.stackexchange.com/a/595332/5001 \task +(-31)+(-14) \task -(-12)-(+9) \task (-11)\cdot(+18) \task (-18)\div(+9) \task +(+44)+(-28) \task -(-21)-(-15) \task (-13)\cdot(-17) \task (-39)\div(-3) \task -(-26)+(-54) \task +(+22)-(+10) \task (+27)\cdot(-19) \task (+52)\div(-4) \end{tasks} \end{enumerate} \end{document}

Mico
  • 506,678
4

Welcome to TeX-SE @etmat. I think a method using enumitem and a column environment such as multicol do a much easier job. The main point is to avoid insert any kind of manual enumeration.

Please, notice I add geometry in order to display the equations as in your example. I also removed the ams-family packages since they were not necessary to this particular example.

You may use any environment/command to access math mode. In the example below I used math em $$since they achieve the same results.

\documentclass[10pt]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{enumitem,multicol}
\begin{document}
\begin{enumerate}
\item Calculate:
  \begin{enumerate}[label={\alph*)}]
    \begin{multicols}{4}
      \item
      \begin{math}
        +(-31)+(-14)=
      \end{math}
      \item
      \begin{math}
        +(+44)+(-28)=
      \end{math}
      \item
      \begin{math}
        -(-26)+(-54)=
      \end{math}
  % Changing method
  \item $-(-12)-(+9)=$
  \item $-(-21)-(-15)=$
  \item $+(+22)-(+10)=$

  \item $(-11)\cdot(+18)= $
  \item $(-13)\cdot(-17)= $
  \item $(+27)\cdot(-19)= $

  \item $(-18):(+9)=$
  \item $(-39):(-3)=$
  \item $(+52):(-4)=$
\end{multicols}

\end{enumerate} \end{enumerate} \end{document}

enter image description here

FHZ
  • 3,939
  • 1
    This is an elegant solution! In theory, one could have simply used a tabular, which, however, would have led to manually assigning the alphanumeric enumeration. – pbaer May 02 '21 at 07:29