# How to write text in multiple columns in rows order

I plan to write a text, for example in 4 columns or variable, in row order. for example see the following text :

• \usepackage{tasks} look after you must, mmmh! – user31729 Oct 28 '15 at 19:06

You can also use a tabular with each cell enumerated using a custom \newcounter.

\documentclass{article}
\usepackage{array}
\begin{document}

\newcounter{mycounter}
\newcommand{\step}{\protect\stepcounter{mycounter}\themycounter.\ }
\newcolumntype{M}{>{\arraybackslash$\step\displaystyle}l<{$}}

Basic Integration Formulas:\par\medskip
\begin{tabular}{MM}
\int [f(x)\pm g(x)]dx = \int f(x)dx \pm \int g(x)dx  & \int \\
\int ..  &  \int ..\\
\int ..  &  \int ..\\
\int ..  &  \int ..\\
\int ..  &  \int ..\\
\end{tabular}

\end{document}


The \newcounter is setup using the following two lines:

\newcounter{mycounter}
\newcommand{\step}{\protect\stepcounter{mycounter}\themycounter.\ }


and you can automate the whole process of enumeration plus math mode inputs via defining a \newcolumntype{M} like this:

\newcolumntype{M}{>{\arraybackslash$\step\displaystyle}l<{$}}


The array package is to be loaded for this command. You are free, then, to choose the number of columns, \displaystyle, etc.

Horizontal enumerated lists are easy with the tasks package. Use \begin{tasks}(4)\task ... \end{task} to build up a list with 4 tasks per row (or four 'columns') -- the tasks environment has an optional arguments, see the manual for the options.

Please fill in the integrals yourself ;-)

\documentclass{article}

\begin{document}
\begin{center}
Basic Integration Formulas
\end{center}
\begin{tasks}[counter-format={tsk[1].}](4)   % tsk[1] will use arabic numbers
\task $\int$
\task $\int$
\task $\int$
\task $\int$
\task $\int$
\task $\int$
\task $\int$
\task $\int$