Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vertical line between latex minipages

Tags:

latex

markup

right now I have a latex section that looks like

\begin{minipage}{0.35\textwidth}   %left column ... \end{minipage} \hfill \begin{minipage}{0.55\textwidth} %right column ... \end{minipage} 

This makes a nice looking two column layout, but I would like to add a vertical bar between the two minipages (where I currently have \hfill). What is the easiest way to do this?

like image 988
David Avatar asked Feb 20 '15 19:02

David


2 Answers

Using

\begin{minipage}{0.35\textwidth}   %left column  ...  \end{minipage}  \hfill\vline\hfill  \begin{minipage}{0.55\textwidth} %right column  ...  \end{minipage} 

Works without needing to change to parbox and staying with minipage.

like image 191
JCollerton Avatar answered Sep 21 '22 15:09

JCollerton


If using minipage is not a necessity for you, you could easily use the tabular environment together with parbox to achieve the desired result:

\begin{tabular}{l | l} \parbox{0.35\textwidth}{ left column content } & \parbox{0.35\textwidth}{ right column content } \end{tabular} 
like image 44
Miguel Avatar answered Sep 18 '22 15:09

Miguel