6

Basically what I want is something like this

###### | ######
###### | ######
###### | ######
###### | ######
###### | ######
###### | ######

where # represents a derivation for an equation or something. I also cannot figure out the vertical line option with just \vline[30pt].

4
  • 1
    It is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. As it is a simple \begin{tabular}{l|l} <left content> & <right content> \end{tabular} will produce output with a vertical bar. Jun 9, 2012 at 19:22
  • 2
    Related: How to show the vertical line between two columns?
    – Werner
    Jun 9, 2012 at 19:56
  • \begin{align} \end{align} doesn't work inside tab
    – Lemon
    Jun 9, 2012 at 19:57
  • And this takes us back to my first comment: a MWE would be helpful to really understand your needs. Jun 10, 2012 at 6:19

3 Answers 3

4

Based on your comments it appears that you want to be able to use an align environment inside a tabular. If that is the case then you need to wrap the align within a \parbox:

enter image description here

Code:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{tabular}{l|l} 
left content & right content\\ 
left content & right content\\ 
\parbox{0.3\linewidth}{%
    \begin{align*} 
        E &= mc^2 \\ 
        F &=ma
    \end{align*}} & right content\\ 
left content & right content\\ 
\end{tabular}
\end{document}
7

You can indeed use tabular type of environments, alternatively, you can use the minipage environment which may give you more flexibility with what you want to achieve:

\documentclass[a4paper,12pt]{article}

\usepackage{lipsum}

\begin{document}
\begin{minipage}[t]{.4\linewidth}
\lipsum[1]
\end{minipage}
\hfill
\vline
\hfill
\begin{minipage}[t]{.4\linewidth}
\lipsum[2]
\begin{align*}
x^2 + y^2 &= 1\\ 
y &= \sqrt{1 - x^2}.
\end{align*}
\begin{align}
u &= \arctan x & dv &= 1 \, dx\\ 
du &= \frac{1}{1 + x^2} dx & v &= x.
\end{align}
\end{minipage}
\end{document}

This will give:

enter image description here

0

Here is a solution using the multicol package. You can make the line separating the columns visible by setting \columnseprule to something greater than 0pt. The advantage of this technique is that content can flow from one column to the next.

Code:

\documentclass[10pt]{article}

\usepackage[]{amsmath,amssymb}

\usepackage[]{multicol}
\setlength{\columnsep}{1cm} % space between columns
\setlength{\columnseprule}{1pt} % vertical line thickness

\usepackage[]{microtype}

\usepackage[]{lipsum} %<---used only to generate dummy text

\begin{document}
\begin{multicols}{2}

\lipsum[1]
%
\begin{align}
a^2+b^2&=c^2\\
F&=ma\\
K&=\frac{1}{2}mv^2
\end{align}
%
\lipsum[2]

\end{multicols}
\end{document}

Example Output:

example output

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .