5

I am trying to produce a two-column table of math equations, where each cell contains its own left-justified, numbered equation.

I tried using \begin{equation} \end{equation} inside the tabular environment, or inside a description list with multicols, and I can get the numbering, but not the left-justification.

I thought about using inline math mode in the table, but how do I get those equations to be numbered? Is there a little \numberthisequation command I can include in the ( inline-math ) commands?

I suppose, I could use two \minipages side by side, but I was hoping for something a little more straightforward.

Thanks!

2
  • Have you looked at the parallel package? I don't use LaTeX to typeset mathematics so I can't say for certain this will meet your needs, so I won't post this as an answer. – Scribblemacher Nov 23 '11 at 20:42
  • @Scribblemacher: You don't use LaTeX to typeset mathematics? I'm confused... – Werner Nov 23 '11 at 21:30
11

This is a little workaround to get what you need:

\documentclass[12pt,letterpaper]{article}

\usepackage{amsmath}

\begin{document}

\begin{tabular}{p{8cm}p{8cm}}

{\begin{align}
&\alpha = \beta + \gamma \\
&c = 20x^2 + 5x - 10
\end{align}}
&
{\begin{align}
&x_f = x_0 + v_0t \\
&\mu = 10 * \epsilon
\end{align} }

\end{tabular}

\end{document}

example

The key concepts with this example are:

  • You use tabular with columns defined by p{dim}.
  • The tabular has only one row.
  • For every cell of the tabular, you have an array of equations (align), whose equations are defined at the right of the &, so they get aligned to the left.
  • Very important trick: to compile, you have to enclose every align environment inside {}, so that the & doesn't collide with those of the tabular.

One flaw this approach has: as every align environment is independent from the others, if one of the equations has more height, then they will look misaligned vertically. Try writing the

\frac{at^2}{2}

to the right of the third equation.

1
  • What if I want to place the numbering before each item? – Enos Lolang Feb 7 '18 at 12:57
2

To left-align equations globally, use the fleqn option when loading amsmath. To left-align equations for only part of the document, you could load the nccmath package and use its fleqn environment. But then you'd still have the equations in actual equation environments, which creates vertical spacing problems.

It seems pretty simple to make your own inline equation tags, though, so try this:

\documentclass{minimal}

\newcommand{\teqtag}{\hfill\stepcounter{equation}(\theequation)}

\begin{document}
\begin{tabular}{p{2 in}@{\hspace{0.25 in}}p{2 in}}
  $\alpha=\beta+\gamma$\teqtag & $c=20x^2+5x-10$\teqtag   \\
  $\alpha=\frac{10x}{\int y\,dx}+\gamma$\teqtag & $c=20x^2+5x-10$\teqtag\\
  $x_f=x_0+v_0 t$\teqtag       & $\mu=10*\epsilon$\teqtag
\end{tabular}
\end{document}

Or to number the equations column-first (and put the tag on the left while we're at it):

\documentclass{minimal}

\newcommand{\lteqtag}{\stepcounter{lequation}(\thelequation)\ }
\newcommand{\rteqtag}{\stepcounter{requation}(\therequation)\ }
\newenvironment{spliteqs}%
  {\newcounter{lequation}%
  \newcounter{requation}%
  \setcounter{lequation}{\value{equation}}%
  \setcounter{requation}{\value{equation}}%
  \addtocounter{requation}{3}}% number of left-column equations
  {\setcounter{equation}{\value{requation}}}

\begin{document}
\begin{spliteqs}
\begin{tabular}{p{2 in}@{\hspace{0.25 in}}p{2 in}}
  \lteqtag$\alpha=\beta+\gamma$ & \rteqtag$c=20x^2+5x-10$   \\
  \lteqtag$\alpha=\frac{10x}{\int y\,dx}+\gamma$\ & \rteqtag$c=20x^2+5x-10$\\
  \lteqtag$x_f=x_0+v_0 t$       & \rteqtag$\mu=10*\epsilon$
\end{tabular}
\end{spliteqs}
\end{document}
1
  • Sorry to add a new answer, without providing a new one. I just wanted to comment the code supplied by rdhs is indeed simple and effective. But I think that, in order to be complete, it needs to define a way to label the equation too. Perhaps if some moderator could edit this and set it as a response to rdhs answer, would be great. – Sabian Aug 9 '14 at 22:14
0

Hmmm I'm not sure if I understand your question... does this meet your needs?

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

\begin{multicols}{2}
\begin{enumerate}
\item $a+b$
\item $c+d$ 
\item $e+f$
\columnbreak
\item $1+2$
\item $3+4$
\item $5+6$
\end{enumerate}
\end{multicols}

\end{document}

Here is what this looks like:

enter image description here

1
  • Unfortunately, no. Nicolas' output looks like what I need. I'm still hoping for a simpler method. – HTG Nov 24 '11 at 5:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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