[Tex/LaTex] Divide the page into 2 parts

multicoltabularx

I have text, formulas and an enumeration. I tried to use multicols, but it divides the text where it wants. I used tabular, but it don't allow to have an enumeration or I don't know how to do it.
In other words, I want to divide some piece of the page into 2 parts as it is shown in the picture:

enter image description here

I also want to save an enumeration. See also the border and alignment of the second part of the page. How can I do it in LaTeX?

Best Answer

You can use a minipage to achieve this along with a tabular. This method will not break across the pages though.

\documentclass{article}
\begin{document}
\begin{minipage}{0.45\textwidth}
\begin{enumerate}
  \item First item \\
        This is the second line in item and this may extend to third if long
  \item second item\ldots
\end{enumerate}
\end{minipage}%
\hfill
\begin{minipage}{0.45\textwidth}
\begin{tabular}{|p{\textwidth}}
This is second part \\
$f(x) = 2x + 3y$ This line may go all along the end and wrap afterwards to the next as seen here\\
This is a forced next line by ending the previous line 
\end{tabular}
\end{minipage}%
\end{document}

enter image description here

It seems the other possibility is with parallel package.

\documentclass{article}
\usepackage{parallel,enumitem}
\begin{document}
\noindent
Here we use \texttt{parallel} package.
\par
\begin{Parallel}[v]{0.48\textwidth}{0.48\textwidth}
\ParallelLText{\noindent
This is the left side.
\begin{enumerate}[itemsep=1ex,leftmargin=1cm,rightmargin=.52\textwidth]
  \item { First item}
  \item{second item}
\end{enumerate}
And you are back in business.\\
This list can break across pages automatically }
\ParallelRText{\noindent
This goes to the right. This may be going long. If you want you can input equations also.\\
$x=y+10$\\
This may be the best choice if you want this kind of thing to span multiple pages. }
\ParallelPar
\end{Parallel}
\end{document}

enter image description here

Related Question