Graphics, Figures & Tables ⇒ Rotate a table and should not move it to next page (PDF screen shot attached)
Rotate a table and should not move it to next page (PDF screen shot attached)
- Attachments
-
- Appendix_screenshot.png (273.57 KiB) Viewed 11416 times
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10328
- Joined: Mon Mar 10, 2008 9:44 pm
Rotate a table and should not move it to next page (PDF screen shot attached)
Code: Select all
\usepackage{rotating}
\begin{document}
...
\begin{sidewaystable}
\centering
\caption{Your table caption}
\begin{tabular}{...}
...
\end{tabular}
\end{sidewaystable}
Rotate a table and should not move it to next page (PDF screen shot attached)
- Attachments
-
- rotateerror.png (135.17 KiB) Viewed 11395 times
- Stefan Kottwitz
- Site Admin
- Posts: 10328
- Joined: Mon Mar 10, 2008 9:44 pm
Rotate a table and should not move it to next page (PDF screen shot attached)
Code: Select all
\usepackage[graphicx]{realboxes}
\usepackage{varwidth}
...
\begin{document}
...
\begin{table}[!htbp]
\centering
\rotatebox{90}{%
\begin{varwidth}{\textheight}
\caption{the caption text}\label{tab:1}
\begin{tabular}{...}
...
\end{tabular}
\end{varwidth}}
\end{table}
Stefan
Rotate a table and should not move it to next page (PDF screen shot attached)
I added those two packages mentioned by you and Here is the code I entered:
\begin{table}[!htbp] \centering \rotatebox{90}{% \begin{varwidth}{\textheight} \caption{Switch comparison} \begin{tabular}{|c|c|c|c|c|c|} \hline \multirow{2}{*}{Particulars} & \multicolumn{5}{c|}{per unit} \\ \cline{2-6} & IGBT\cite{igbt}& \gls{spst} \cite{spstdpst} & \gls{spdt} \cite{digikey} & \gls{dpst}\cite{spstdpst} & \gls{dpdt}\cite{dpdt} \\ \hline Size(in mm)&20x16x5&10x7x5&18x14 $\times$ 15&20x10x11&29x25x13 \\ \hline AC Rating & 1200V, 5A & 250V,5A & 250V,5A & 250V,5A&250V,5A \\ \hline \begin{tabular}[c]{@{}c@{}}Conduction loss \\ P$_{con}$ (in W)\end{tabular} & \begin{tabular}[c]{@{}c@{}}13.5$^{**}$\end{tabular} & 2.5&2.5&2.5&2.5 \\ \hline \begin{tabular}[c]{@{}c@{}}Gate loss \\ P$_{gate}$ (in W)\end{tabular} & \begin{tabular}[c]{@{}c@{}}DNA\end{tabular} & 0.75&0.4&0.75&0.54 \\ \hline %\begin{tabular}[c]{@{}c@{}}Perday loss(Whr)$^*$\end{tabular} & 130.5&25& 13.4 \\ \hline %\begin{tabular}[c]{@{}c@{}}Switching time($T_{on}$+$T_{off}$)\end{tabular}& 1.8+2.0= 3.8$\mu$s &3.3ms & 6+4=10ms \\ \hline \begin{tabular}[c]{@{}c@{}}Switching time\end{tabular}& 3.8$\mu$s &3.3ms& 10ms &5ms&15ms \\ \hline Elect. cycles &-&3x10$^4$& 10$^5$& 3x10$^4$& 10$^5$ \\ \hline Mech. cycles & -& 10$^7$ & 5x10$^6$& 10$^7$& 10$^7$ \\ \hline Operating temp. & $+150^{\circ}$C &\begin{tabular}[c]{@{}c@{}} -40 - +$85^{\circ}$C \end{tabular} &\begin{tabular}[c]{@{}c@{}} -40 - +$70^{\circ}$C \end{tabular} &\begin{tabular}[c]{@{}c@{}} -40 - +$85^{\circ}$C \end{tabular} &\begin{tabular}[c]{@{}c@{}} -30 - +$70^{\circ}$C \end{tabular} \\ \hline \begin{tabular}[c]{@{}c@{}}market cost (in \$) \end{tabular} & 30.38 &3.59 & 2.05 &3.59&3.77\\ \hline \end{tabular} %} \\ ~~**~$I_{CE}$=5A,$V_{CE}$=2.7V;DNA Data not available; %\end{sidewaystable} \end{varwidth}} \end{table}
- Stefan Kottwitz
- Site Admin
- Posts: 10328
- Joined: Mon Mar 10, 2008 9:44 pm
Rotate a table and should not move it to next page (PDF screen shot attached)
0.9\textheight
.Code: Select all
text
\begin{table}[!htbp]
\centering
\rotatebox{90}{%
\begin{minipage}{0.9\textheight}
\caption{Switch comparison}
\begin{tabular}{|c|c|c|c|c|c|}
...
\end{tabular}
\end{minipage}}
\end{table}
text
Rotate a table and should not move it to next page (PDF screen shot attached)
- Attachments
-
- tableDONE.png (85.78 KiB) Viewed 11352 times
- Stefan Kottwitz
- Site Admin
- Posts: 10328
- Joined: Mon Mar 10, 2008 9:44 pm
Rotate a table and should not move it to next page (PDF screen shot attached)
varwidth
environment was for auto-adjusting the width (here: hight, as it's rotated), somehow it did not work with the content here. But as it works with minipage
, fine. 
Stefan