Say I have a table with many columns, so I would like to put it into a landscape page in latexpdf. Is it possible to achieve this?
I know this question was asked a long time ago, but it can still be useful.
In my case, I had a reStructuredText (rst) file with a CSV table that I wanted to rotate to have a landscape page only in my Latex file.
Using the raw directive, I was able to do it.
First, add this in your conf.py file to load the lscape package :
latex_elements = {
  'preamble': r'''\usepackage{lscape}'''
}
After, you can use the directive this way :
My CSV table
~~~~~~~~~~~~~~~~
.. raw:: latex
    \begin{landscape}
.. csv-table::
    :header: "Col 1", "Col 2", "Col 3"
    :widths: 10 10 10
    "Value 1", "Value 2", "Value 3"
.. raw:: latex
    \end{landscape}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With