# How do I have tables side by side?

I'd like to have small tables being shown side by side instead of one under the other, when I export to PDF.

Is there an easy way to do that ? Like a break between tables ?

PDF export is handled by LaTeX, which provides endless ways to customize your document presentation. A relatively simple way to apply side-by-side formatting to tables in org-mode is to wrap them in minipage environments:

#+ATTR_LATEX: :options {0.4\textwidth}
#+begin_minipage
| one | two | three |
|-----+-----+-------|
| cat | dog | fish  |
|-----+-----+-------|
#+end_minipage
#+ATTR_LATEX: :options {0.4\textwidth}
#+begin_minipage
| Something | Else     |
|-----------+----------|
| Row 1     | Column 2 |
#+end_minipage


Here, each table is wrapped in its own minipage, and the minipages are set to be 40% of the width of a text line. IMPORTANT: don't leave a space between the two minipages!

The options are limitless, but the more sophisticated you get the trickier it is to mix org and LaTeX together. For more than simple tweaks I usually find it's easier to use LaTeX for the full document, or at least the full table.

• Super cool, I only need a short tables side to side to compare some results ! Where can I learn about that kind of stuff though? I feel like the manual goes over Latex pretty fast and I'd like to know more about how to format tables as I like. Last question, how can I add padding before the minipage ? For now it's super close to the text and I can't seem to find the option for a a skip or a pad. Thanks ! – Nathan Furnal Aug 21 '19 at 21:37
• LaTeX is a huge subject, and there are full books devoted to different parts of the language. A good intro is [pdf] ctan.org/tex-archive/info/lshort/english/lshort.pdf – Tyler Aug 21 '19 at 22:28
• try \vspace{1em} on a line by itself, with a blank line before and after, where you want to insert some vertical space. If that's not enough, try a larger number – Tyler Aug 21 '19 at 22:30
• I meant learning about org-mode and latex integration. I've already written some stuff in Latex but never had to write new macros or sty files. I'd like to add some autocomplete and easy Tab complete (if that's a word) to my org mode so that I can easily input short tables. I don't know any ELisp though :s – Nathan Furnal Aug 21 '19 at 22:40
• I see. What you're talking about can be done in Emacs and doesn't really require much LaTeX knowledge, mostly. Certainly not writing sty files or macros. My advice is to pick one discrete thing you want to do. Google around a bit, and when you get stuck come back with a question for us. If you want to autocomplete complex structures, take a look at snippets or skeletons. – Tyler Aug 21 '19 at 23:46