I want to export two long tables (each 6X179). I tried to export with latex-->PDF using #+ATTR_LATEX: :float sidewaystable attribute. But what I get is this result, I get just three pages pdf file (tables are cut at the first page).

  • 1
    Can you please update your example with your emacs and org versions and a minimum working example of an org file which doesn't export as your intend? Jul 21, 2016 at 15:56
  • 1
    Org 8.3.5. Emacs 24-5-1 (OSX). code Jul 21, 2016 at 16:24

2 Answers 2


For some unknown reason the answer proposed by Kaushal is not working on my system (Org version ?). Anyway I find out a working solution using the pandoc export instead of the Org native LaTeX. So using the same example and exporting to Pandoc-->Latex and Open you get a tex file with longtable package. I made a slight modification adding the lscapepackage. This is the result

enter image description here


I got this to work, but .. it seems like minted and float packages do not work well with sidewaystable environment. So this looks like more of a question for https://tex.stackexchange.com/.

When you do C-c C-e l o on the below, pdf generation will fail.

You will need to hack the .tex file and comment out the \usepackage lines for minted and float if present.

Then the tex to pdf conversion will happen fine on doing

\latexmk -xelatex -quiet -shell-escape *.tex

The sidewaystable value in #+ATTR_LATEX:, while still works, is deprecated since Org 8.3. sideways should be used instead.

#+OPTIONS: toc:nil

#+CAPTION: foo
#+NAME: tab__foo
#+ATTR_LATEX: :float sideways
| Data  | Numero Progr. | Descrizione o Fornitore | Importi delle operazioni |           Importi Imponibili |               Iva |
| 07/01 |           313 | ACLS Corso              |                   317.20 |                       260.00 |              57.2 |
| 07/01 |           314 | Libro Amazon            |                    76.59 |                        62.78 |             13.81 |
| 17/01 |           315 | Bottega della Pizza     |                      8.8 |                         7.21 |              1.59 |
| 23/01 |           316 | Pizzeria Passaparola    |                    11.00 |                         9.02 |              1.98 |

enter image description here


  • GNU Emacs of 2016-07-20 built using commit 852111f3a6640d61ea1a1b2fd0cbf50623642927 (master branch).
  • Org-mode version 8.3.4 (release_8.3.4-1049-g481709) (master branch, so actually Org 9.x)
  • I tried with your hack but still I got the same problem. This is my generated tex file Jul 22, 2016 at 7:33
  • If you look carefully at my answer above, that hack is not the only thing required. Notice that the CAPTION, NAME (not LABEL) and ATTR_LATEX (with sideways, not sidewaystable) are directly above the org table that you want to format in a sidewaystable environment. That is required for each table. Also, in newer org versions, you cannot use the colon : character in the NAME field. So I have used tab__ instead of tab:. Can you check if my example above works for you directly? Jul 22, 2016 at 10:35
  • Using your example produce the same result Jul 22, 2016 at 14:35

Your Answer

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

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