0

How can I rotate and center a landscape table in a document based on the svmono class, which also contains \sidesubfloat instances? It seems the use of floatrow messes badly with the position of the landscape table (see "actual output" example). Even if this were not a problem, the rotation of the table is not as desired (see "desired output" example).

I've tried without luck the ideas in other posts in the forum... can someone please give me a hand? Thanks and regards, Jorge.

Example:

\documentclass[graybox,envcountchap,vecarrow,twoside]{svmono}
\usepackage[paperheight=240mm,paperwidth=170mm,top=2.5cm,inner=2.5cm]{geometry}
\usepackage{mathptmx}
\usepackage[caption=false,font=footnotesize]{subfig}
\usepackage{graphicx}
\usepackage{lipsum}

% For labels besides figures
\usepackage{floatrow}
\floatsetup[figure]{style=plain,subcapbesideposition=top}
\setlength{\labelsep}{1cm}

% Tables-related
\usepackage{booktabs}
\aboverulesep=0ex
\belowrulesep=0ex
\usepackage{multirow}
\usepackage{multicol}
\usepackage{makecell}
\renewcommand{\arraystretch}{1.2}

% For landscape stuff
\usepackage{pdflscape}


\begin{document}
% Some text and a figure
\lipsum[1]
\begin{figure}
\centering
\sidesubfloat[]{\includegraphics[scale=0.45]{example-image-a}}
\\
\vspace{1.0cm}
\sidesubfloat[]{\includegraphics[scale=0.45]{example-image-b}}
\end{figure}
\lipsum[1]

% The landscape table
\clearpage
\vspace{4cm}
%\newgeometry{margin=3cm}   % This messes up the page number position!
%\thispagestyle{empty}       % This erases the page number!
\begin{landscape}
\begin{table*}[!h]
\centering%
\begin{tabular}{llccccccccccc}
\midrule[1pt]
\multicolumn{2}{l}{}& & VLSI'17& ISSCC'17& VLSI'16& ISSCC'15& ISSCC'14& VLSI'17& ISSCC'17& VLSI'16& ISSCC'15& ISSCC'14\\
\multicolumn{2}{l}{}& \multirow{-2}{*}{\textbf{This work}}& [1]& [2]& [3]& [4]& [5]& [1]& [2]& [3]& [4]& [5]\\
\midrule[0.5pt]
\multicolumn{2}{l}{Input range [V$_{\mathrm{pp}}$]}& 1.6& -& 2.0& -& 2.5& 2.0& -& 2.0& -& 2.5& 2.0\\
\multicolumn{2}{l}{Sampling rate [Sa/s]}& 600M& 500M& 9G& 2.5G& 500M& 1G& 500M& 9G& 2.5G& 500M& 1G\\
\midrule[0.5pt]
& LF input& 9.4& 9.1& -& 10.3& 10.5& 11.2& 9.1& -& 10.3& 10.5& 11.2\\
\multirow{-2}{*}{ENOB [bit]} & Nyquist& 9.06& 9.1& 10.7& 10& 10.3& 11& 9.1& 10.7& 10& 10.3& 11\\
\midrule[0.5pt]
\multirow{2}{*}{SNDR [dB]} & LF input& 58.1& 56.7& -& 64& 64.8& 69& 56.7& -& 64& 64.8& 69\\
& Nyquist& 56.3& 56.6& 66& 61.7& 64& 68& 56.6& 66& 61.7& 64& 68\\
\midrule[0.5pt]
\multirow{2}{*}{SFDR [dBc]}& LF input& 67.5& 73& 79& 80& 93& 86& 73& 79& 80& 93& 86\\
& Nyquist& 69.2& 69.2& 79& 73& 82& 82& 69.2& 79& 73& 82& 82\\
\midrule[0.5pt]
\multicolumn{2}{l}{Power [W]}& 14.2m& 6m& 2330m& 1150m& 550m& 1200m& 6m& 2330m& 1150m& 550m& 1200m\\
\multicolumn{2}{l}{FOMW [J/conv.-step]}& 44f& 22f& 715f& 463f& 849f& 585f& 22f& 715f& 463f& 849f& 585f\\
\multicolumn{2}{l}{FOMS [dB]}& 159.5& 162.8& 152.3& 152.1& 150.6& 154.2& 162.8& 152.3& 152.1& 150.6& 154.2\\
\multicolumn{2}{l}{Active area [mm$^{2}$]}& 0.621& 0.015& 5.1& -& 2.5& 18& 0.015& 5.1& -& 2.5& 18\\
\midrule[1pt]
\end{tabular}
\vspace{6pt}
\caption{Performance summary and comparison with state-of-the-art.}
\end{table*}
\end{landscape}

\end{document}

Actual output: enter image description here

Desired output: enter image description here

dontpanic
  • 809
  • 1
    May be you can try \begin{table}...\end{table} instead of \begin{table*}[!h]...\end{table*}? – Ruixi Zhang Aug 05 '18 at 18:22
  • Thanks for the suggestion, Ruixi, that does improve the positioning of the table (at least now it's within the page). Any ideas on how to achieve the rotation and centering? – dontpanic Aug 05 '18 at 18:44
  • I think you are better off using the rotating package. Please take a look at this answer. – Ruixi Zhang Aug 05 '18 at 18:47
  • Thanks for the solution, Ruixi. Unfotunately, this doesn't work with svmono :( . I included a link to the class definition file in the original question (under the text "svmono class"). Another factor that is important is the presence of the text and \sidesubfloat instances (i.e. I'm not trying to create and empty document with a table, but this is to be embedded in an actual document, that's why I included these in my MWE)... – dontpanic Aug 05 '18 at 19:47

1 Answers1

2

Please note:

  • The maintainer of mathptmx recommends users to use newtx instead.
  • Please do not set \aboverulesep=0ex and \belowrulesep=0ex. The table looks awful.
  • Please do not use \midrule[...]. You have \toprule, \bottomrule for thicker rules.
  • Please do not add manual space \vspace{6pt} before the caption.

You can use the rotating package for your problem. More specifically, you need \usepackage[figuresleft]{rotating} in your preamble and use the sidewaystable environment.

I don’t have the svmono class, so my illustration below uses article. I guess the svmono class used \scriptsize to get the your table to fit in one page. Please feel free to remove \scriptsize in your actual document.

Edit: It seems that the svmono class has conflict with the rotating package. So a workaround is to load the package before the class declaration.

I’ve also noticed that you want the table and the caption (as a whole block) to be centered, while they are left aligned within the block. This is NOT how captions in the svmono class work! The captions are designed to be flushed left, as seen in the following illustration.

\RequirePackage[figuresleft]{rotating}
\documentclass[graybox,envcountchap,vecarrow,twoside]{svmono}
\usepackage[paperheight=240mm,paperwidth=170mm,top=2.5cm,inner=2.5cm]{geometry}
%\usepackage{mathptmx}
\usepackage{newtxtext}
\usepackage{newtxmath}

\usepackage{lipsum}

% Tables-related
\usepackage{booktabs}
%\aboverulesep=0ex
%\belowrulesep=0ex
\usepackage{multirow}
\usepackage{multicol}
\usepackage{makecell}
\renewcommand{\arraystretch}{1.2}

% For landscape stuff
%\usepackage{pdflscape}

\begin{document}

\lipsum[1]
\begin{figure}
\centering
\rule{5cm}{3.6cm}\\[1.0cm]% But why?
\rule{5cm}{3.6cm}
\caption{The caption is supposed to be flushed left!}
\end{figure}
\lipsum[1]

\begin{sidewaystable}
\centering
\begin{tabular}{llccccccccccc}
\toprule
\multicolumn{2}{l}{}& & VLSI'17& ISSCC'17& VLSI'16& ISSCC'15& ISSCC'14& VLSI'17& ISSCC'17& VLSI'16& ISSCC'15& ISSCC'14\\
\multicolumn{2}{l}{}& \multirow{-2}{*}{\textbf{This work}}& [1]& [2]& [3]& [4]& [5]& [1]& [2]& [3]& [4]& [5]\\
\midrule
\multicolumn{2}{l}{Input range [V$_{\mathrm{pp}}$]}& 1.6& -& 2.0& -& 2.5& 2.0& -& 2.0& -& 2.5& 2.0\\
\multicolumn{2}{l}{Sampling rate [Sa/s]}& 600M& 500M& 9G& 2.5G& 500M& 1G& 500M& 9G& 2.5G& 500M& 1G\\
\midrule
& LF input& 9.4& 9.1& -& 10.3& 10.5& 11.2& 9.1& -& 10.3& 10.5& 11.2\\
\multirow{-2}{*}{ENOB [bit]} & Nyquist& 9.06& 9.1& 10.7& 10& 10.3& 11& 9.1& 10.7& 10& 10.3& 11\\
\midrule
\multirow{2}{*}{SNDR [dB]} & LF input& 58.1& 56.7& -& 64& 64.8& 69& 56.7& -& 64& 64.8& 69\\
& Nyquist& 56.3& 56.6& 66& 61.7& 64& 68& 56.6& 66& 61.7& 64& 68\\
\midrule
\multirow{2}{*}{SFDR [dBc]}& LF input& 67.5& 73& 79& 80& 93& 86& 73& 79& 80& 93& 86\\
& Nyquist& 69.2& 69.2& 79& 73& 82& 82& 69.2& 79& 73& 82& 82\\
\midrule
\multicolumn{2}{l}{Power [W]}& 14.2m& 6m& 2330m& 1150m& 550m& 1200m& 6m& 2330m& 1150m& 550m& 1200m\\
\multicolumn{2}{l}{FOMW [J/conv.-step]}& 44f& 22f& 715f& 463f& 849f& 585f& 22f& 715f& 463f& 849f& 585f\\
\multicolumn{2}{l}{FOMS [dB]}& 159.5& 162.8& 152.3& 152.1& 150.6& 154.2& 162.8& 152.3& 152.1& 150.6& 154.2\\
\multicolumn{2}{l}{Active area [mm$^{2}$]}& 0.621& 0.015& 5.1& -& 2.5& 18& 0.015& 5.1& -& 2.5& 18\\
\bottomrule
\end{tabular}
%\vspace{6pt}
\caption{Performance summary and comparison with state-of-the-art.}
\end{sidewaystable}

\end{document}

rotated table

Ruixi Zhang
  • 9,553
  • Thanks for the solution, Ruixi. Unfotunately, this doesn't work with svmono :( . I included a link to the class definition file in the original question (under the text "svmono class"). Another factor that is important is the presence of the text and \sidesubfloat instances (i.e. I'm not trying to create and empty document with a table, but this is to be embedded in an actual document, that's why I included these in my MWE)... – dontpanic Aug 05 '18 at 19:47
  • 1
    @dontpanic Please check my updated answer. :) – Ruixi Zhang Aug 06 '18 at 15:25
  • Awesome, problem solved! Thanks you so much for help, Ruixi! :) W.r.t. the "indented" captions: indeed, the class enforces full flushing to the left, but in some situations (e.g. landscape tables narrower than the example above) it looks a little too much. Is there an easy way to "push" the captions a little towards the right? A simple \hspace seems to have no effect :\ – dontpanic Aug 06 '18 at 18:05
  • 1
    @dontpanic Indeed, the \hspace method is not working. But to be honest: If the captions are meant to be flushed left, then I don’t think you should \centering the float contents in the first place. For your current table, I’d suggest an alternative: Since the table was very wide already, you could insert \setlength{\arraycolsep}{5pt}% between \begin{sidewaystable} and \centering to make it wider. You may choose a length other than 5pt to make the table to fill up the entire text height. P.S. Your \multicolumn’s gobbled all left paddings. You may want to fix that. – Ruixi Zhang Aug 06 '18 at 21:55
  • Great, thanks for the advice! Widening the table solves the "look issue" for this table, but others in my document have fewer columns, and widening the table start to make them look awkward. I think I'll just let the caption flush, as intended by the class, no big problem. :) Just one last thing: what do you mean by "\multicolumn’s gobbled all left paddings"? and... how can I fix it? – dontpanic Aug 07 '18 at 16:56