# Rotating the entire page at which a large table exists

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

1. 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.

1. 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

1. 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}

% ========== Figures and tables locations packages ==========
\usepackage{float}

\usepackage{blindtext}

\usepackage{fancyhdr}
\fancypagestyle{emptytablepage}{
\fancyfoot{}
}
\pagestyle{emptytablepage}

\begin{document}

\blindtext

\clearpage

\begin{sidewaystable*}[p]

\caption{Classifications of Strategies}
\label{table:strategies_names_definitions}

\centering

\renewcommand{\arraystretch}{1}

\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 &
\\

2. &
Name B &
Class B &
\blindtext &
\\

3. &
Name C &
Class C &
\blindtext &
\\

\bottomrule

\end{tabularx}

\end{sidewaystable*}

\blindtext

\end{document}


The easiest solution is to use TikZ and (current page.center). See also Draw at extreme page on landscape page and How to keep section heading and footnotes on a landscape table

Note that the minipage (used to center the contents) changes \textwidth, hence \dimen0. Also, sidewaystable and \tikz[remember picture] are not compatible.

\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}

% ========== Figures and tables locations packages ==========
\usepackage{float}

\usepackage{blindtext}

\usepackage{fancyhdr}
\fancypagestyle{emptytablepage}{
\fancyfoot{}
}
\pagestyle{emptytablepage}

\usepackage{tikz}

\begin{document}

\blindtext

\begin{table*}[p]
\dimen0=\textwidth
\sbox0{\begin{minipage}[c][\paperheight][c]{\paperwidth}% fill entire page
\caption{Classifications of Strategies}
\label{table:strategies_names_definitions}

\centering

\renewcommand{\arraystretch}{1}

\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 &
\\

2. &
Name B &
Class B &
\blindtext &
\\

3. &
Name C &
Class C &
\blindtext &
\\

\bottomrule

\end{tabularx}