Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
tex.stackexchange.com/questions/11541/… describes how to include a numbered list in a tabular, does that help? –  doncherry Apr 27 '12 at 9:54
add comment

1 Answer

up vote 10 down vote accepted

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

share|improve this answer
    
I have corrected the error, but what I can't understand why the border is wrong. –  user565447 Apr 27 '12 at 14:43
    
@user565447: \enumerate leaves a vertical space between first item and the paragraph above it (parsep). Hence put \parsep=-10pt as \begin{enumerate}[parsep=-10pt,itemsep=1ex,leftmargin=1cm,rightmargin=.52\textw‌​idth]. border will be alright. –  Harish Kumar Apr 27 '12 at 14:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.