3

Trying to group up different multi line formulas and text that I have to make space on the page, my first thought was to place them as a cell in a table, but trying to do that naively does not work

\begin{tabular}{l l}
    \textbf{Removing Left Recursion}

    $A \rightarrow A \alpha\ |\ \beta$\\
    then\\
    $A \rightarrow \beta A^{'}$\\
    $A \rightarrow \alpha A^{'}\ |\ \epsilon$\\
&
    \textbf{Left Factor}

    $A \rightarrow \alpha \beta_{1}\ |\ \alpha \beta_{2}$\\
    then\\
    $A \rightarrow \alpha \beta^{'}$\\
    $\beta^{'} \rightarrow \beta_{1}\ |\ \beta_{2}$ 
\\
\end{tabular}

How can I group these things up to take less space?

David Carlisle
  • 757,742
Ólafur Waage
  • 363
  • 2
  • 10

2 Answers2

4

I change your table to two columns. Is this what you are trying to achieve?

\documentclass{article}
\pagestyle{empty}
\begin{document}
\begin{tabular}{ll}
    \textbf{Removing Left Recursion} & \textbf{Left Factor}\\
    $A \rightarrow A \alpha\ |\ \beta$ & $A \rightarrow \alpha \beta_{1}\ |\ \alpha \beta_{2}$\\
    then & then\\
    $A \rightarrow \beta A^{'}$ & $A \rightarrow \alpha \beta^{'}$\\
    $A \rightarrow \alpha A^{'}\ |\ \epsilon$ & $\beta^{'} \rightarrow \beta_{1}\ |\ \beta_{2}$\\
\end{tabular}

\end{document}

example

David Carlisle
  • 757,742
adn
  • 11,233
1

If you don't insist on a table you can try

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
\begin{minipage}{0.49\linewidth}
\textbf{Removing Left Recursion}
\[A\rightarrow A\alpha\mid\beta \quad\text{ then } \begin{cases}A\rightarrow\beta A’\\A\rightarrow\alpha A’\mid\epsilon\end{cases}\]
\end{minipage}
\begin{minipage}{0.49\linewidth}
\textbf{Left Factor}
\[A\rightarrow\alpha\beta_1\mid\alpha\beta_2 \quad\text{then } \begin{cases}A\rightarrow\alpha\beta\\\beta’\rightarrow \beta_1\mid\beta_2\end{cases}\]
\end{minipage}
\end{document}

enter image description here

uli
  • 4,315