I am trying to typeset a table with very long paragraphs. Due to the nature of the work, the table must not be divided into smaller ones. I want the following to be satisfied
- The page on which the table exists must be rotated by a user-defined angle, either 90 degrees or -90 degrees
The picture provided above is simply the result of rotating the table using a PDF viewer.
- The table must go exactly to the center of the page (horizontally and vertically), irrespective of the margins specified by the document class or
geometry
package.
However, it must be flexibly changed by the user. This is important since the option width=1.1\textwidth
in adjustbox
environment enlarges the area available for the table to be typeset in. Thus, I might want to increase the size of the table, but I also want it to remain at the center of the page.
In the provided code, however, it is easy to see how the table has very small margin with the left edge of the page
- The style
emptytablepage
must be executed for the page at which the table exists
Note: in the code provided, when I remove the command \clearpage
, the direction at which the table is typeset changes. What is the explanation for this?
I tried to apply what is in How to change certain pages into landscape/portrait mode. However, the package typearea
seems to change the general layout of pages, which is not desired for my work (i.e., I want the geometry of my page to remain exactly the same)
\documentclass{book}
\usepackage{ragged2e}
% ========== Caption packages ==========
\usepackage{caption}
% ========== Table packages ==========
\usepackage{tabularx}
% BEGIN_FOLD
\newcolumntype{J}{ >{\arraybackslash\justifying} X }
\def \tabularxcolumn#1{m{#1}}
% END_FOLD
\usepackage{booktabs}
\usepackage{makecell}
\usepackage[flushleft]{threeparttable}
\usepackage[]{rotating}
\usepackage{adjustbox}
% ========== Figures and tables locations packages ==========
\usepackage{float}
\usepackage{blindtext}
\usepackage{fancyhdr}
\fancypagestyle{emptytablepage}{
\renewcommand{\headrulewidth}{0pt}
\fancyhead{}
\fancyfoot{}
}
\pagestyle{emptytablepage}
\begin{document}
\blindtext
\clearpage
\begin{sidewaystable*}[p]
\caption{Classifications of Strategies}
\label{table:strategies_names_definitions}
\centering
\renewcommand{\arraystretch}{1}
\begin{adjustbox}{width=1.1\textwidth, center}
\begin{tabularx}{\textwidth}{r c c J c}
\toprule
\multicolumn{3}{c}{Strategy} &
\multicolumn{2}{c}{Definition and References that Discuss/Propose the Strategy}
\\
\cmidrule(r){1-3} \cmidrule(l){4-5}
&
\multicolumn{2}{c}{Name and Abbreviation} &
\multicolumn{1}{c}{Definition}
& References
\\
\cmidrule(r){2-3} \cmidrule(lr){4-4} \cmidrule(lr){5-5}
1. &
Name A &
Class A &
\blindtext &
\\
\addlinespace[0.3cm]
2. &
Name B &
Class B &
\blindtext &
\\
3. &
Name C &
Class C &
\blindtext &
\\
\bottomrule
\end{tabularx}
\end{adjustbox}
\end{sidewaystable*}
\blindtext
\end{document}