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.

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?

share|improve this question
3  
Please, can you add a minimal working example (MWE) that illustrates your problem so people can help you better. –  adn Dec 13 '11 at 13:00
    
I fear that is not enough information to give a viable answer. You have a single column document? Do the multiline math environments span over the whole column horizontally? Why do you hope that placing them in a table saves space? –  uli Dec 13 '11 at 13:01
    
possible duplicate of How to break a line in a table –  Roelof Spijker Dec 13 '11 at 13:02
    
I have updated the question with the actual table code. This is a double column document. These are pretty short formulas, so grouping them next to each other will save space and still be readable. –  Ólafur Waage Dec 13 '11 at 13:17
    
What are you trying to achieve here? Do you want to compress those lines into a narrow table? or do you want to put those grammars side by side? –  adn Dec 13 '11 at 13:33

2 Answers 2

up vote 4 down vote accepted

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

share|improve this answer
1  
facepalm this is so obvious now. Thank you so much, –  Ólafur Waage Dec 13 '11 at 13:51

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

share|improve this answer

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.