Table placement using sidewaystable or landscape
Solution 1
There is an automatic \clearpage
at the beginning and end of landscape, so using a float (table) is fine. If you want to position the contents, you can use a minipage INSIDE the float to fit the entire text area.
For some reason, showframe is acting up for me.
\documentclass{article}
\usepackage{pdflscape}
\begin{document}
\begin{landscape}
\begin{table}[p]
\begin{minipage}[t][\textheight][t]{\linewidth}% use entire text area
\caption{Insert table caption here}
\resizebox{\textwidth}{!}{%
\begin{tabular}{lllll lllll llll}
\multicolumn{14}{c}{**removed table data for posting**}
\end{tabular}%
}%
\end{minipage}
\end{table}
\end{landscape}
\end{document}
Solution 2
- your code snippet is not complete :-(
- see if the following solution givers what you looking for
edit: for test purposes i add package showframe
that you can see, that the table is at top left side of page in landscape orientation.
\documentclass{article}
\usepackage{lscape}
\usepackage{tabularx}
\usepackage{caption}
%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%
\begin{document}
\begin{landscape}
\vspace*{-1.5\baselineskip}
\captionsetup{singlelinecheck=false}
\captionof{table}{Insert table caption here.}
\label{my-label}
\begin{tabularx}{\linewidth}{|*{12}{X|}}
\hline
1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 \\
\hline
\end{tabularx}
\end{landscape}
\end{document}
Related videos on Youtube
mef022
Updated on February 24, 2020Comments
-
mef022 over 3 years
I can use either {sidewaystable} or {landscape} to produce a table and its caption that are landscape on a page. However, it is centered on the page. How do you move it so that it aligns with the left margin of the page?
\begin{landscape} \begin{table}[] \caption{Insert table caption here} \resizebox{\textwidth}{!}{% \begin{tabular}{llllllllllllll} **removed table data for posting** \end{tabular}% } \end{table} \end{landscape}
Gives
Which is centered on the page. I would like the caption and the table to be aligned to the left margin of my document.
If I use {sidewaystable} instead and add the first line of code:
\setlength\rotFPtop{152pt} \begin{sidewaystable} \begin{table}[] \caption{Insert table caption here} \resizebox{\textwidth}{!}{% \begin{tabular}{llllllllllllll} **removed table data for posting** \end{tabular}% } \end{sidewaystable}
Then it will shift everything to the left as desired. But I guessed 152pt. Is there a way to determine the exact pts of the page margin?
-
John Kormylo over 4 yearsSince there is no text on the page, it defaults to [p].
-
-
Zarko over 4 yearsplease, show us what you try so far. it is still not clear what you like too have. edit your question and add this there. page i show is shown rotated, that you can easily see its content.
-
mef022 over 4 yearsIf I use {sidewaystable} instead of {landscape} and keep the rest of the code the same, I can shift it towards the left margin by adding this as the first line of code %\setlength\rotFPtop{152pt} . Is there a way to determine how many pts my margin is? 152 pt was just a guess...
-
mef022 over 4 yearsSorry - that does not work. It is not at the left margin of the page.
-
Zarko over 4 yearsi edit my answer. added is package for drawing text borders. now should be clearly seen, that the table is in the place as you ask in your question.