10

I'm exporting a simple org-table through LaTeX to PDF:

| a | b | c |
| 1 | 2 | 3 |

After export with C-c C-e l o the PDF contains a centered table, and I'd rather have it on the left (to be clear, I'm referring here to the table as a whole, not the positioning of elements in individual cells).

I'm not an expert at LaTeX. I've looked at :float and :placement in the Org manual here and haven't been able to affect the outcome. How could I accomplish this?

2
  • 2
    Will adding #+ATTR_LaTeX: :center nil before the table do what you need, or do you want to move the table even further to the left?
    – wvxvw
    Sep 1, 2015 at 6:48
  • 1
    @wvxvw You should make that an answer. Sep 4, 2015 at 9:46

2 Answers 2

9

#+ATTR_LaTeX: :center nil will cancel centering (by default LaTeX tables inherit alignment from the document)

This is how the table would be exported with default settings:

\begin{center}
\begin{tabular}{rrr}
a & b & c\\
1 & 2 & 3\\
\end{tabular}
\end{center}

This is how it would be exported without centering:

\begin{tabular}{rrr}
a & b & c\\
1 & 2 & 3\\
\end{tabular}

If you need to move it even further to the left, you could add

#+BEGIN_LaTeX
  \hspace{-3cm}
#+END_LaTeX

before the table.

1

To make it global, applied to all tables, you can also customize this variable

M-xcustomize-variableorg-latex-tables-centered

and look into options > customize emacs > specific group > org-export-latex for more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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