如何使用 resizebox 删除 threeparttable 中 sidewaystable 创建的空白页(缩小表格不起作用)?

如何使用 resizebox 删除 threeparttable 中 sidewaystable 创建的空白页(缩小表格不起作用)?

我正在完成我的博士论文。剩下的最后一项任务是放大表格和图形,以便在较小的打印格式下清晰地查看它们。我有一张表格,在使用简单的表格环境时很难阅读(见第 117 页)。因此,我想将其作为sidewaystable(见第 118 页)包含。但是,这会在表格后创建一个空白页(第 119 页)。也许第 118 页上的表格太大,无法放在一页上,因此我使用了命令\resizebox。即使使用例如\resizebox{0.3\textwidth}{!}第 118 页上的表格缩小,但空白页的问题仍然存在。我读过类似问题的答案,并理解会sidewaystable创建页面范围的浮动,但这些先前的答案都没有解决我的问题。我花了几个小时试图解决这个问题,阅读了一堆与 sidewaystable 相关的问题。此时我甚至不知道我做错了什么。也许这与混合sidewaystable和有关threeparttable?我尝试过\FloatBarrier\clearpage\newpage但这些似乎都没有帮助……任何指导都非常感谢。

您可以在下面找到我的序言以及第 116-119 页的代码:

前言:

\documentclass[10pt,twoside]{report}
\usepackage{appendix,amsmath,amscd,amssymb,amsfonts,amsthm,setspace,booktabs,pgfplotstable,a4wide,float,floatflt,bbm,tikz,pdflscape}
\usepackage{tikz,etoolbox,graphicx,chngpage,pdfpages,multirow,fancyhdr,verbatim,float,lscape,rotating,color, colortbl,longtable,graphicx,mathrsfs,eurosym,enumerate}
\usepackage[normalem]{ulem}
\usepackage[margin=1.75in]{geometry}
\usepackage{adjustbox}
\usepackage{refstyle}
\usepackage[colorlinks=true, citecolor=black, linkcolor=black, urlcolor=black,breaklinks]{hyperref}
\usepackage[round,authoryear]{natbib} 
\usepackage[flushleft]{threeparttable}
\usepackage[section]{placeins}
\usepackage{mathtools,subcaption,bm,arydshln,bookmark,chngcntr,titlesec}

\usetikzlibrary{positioning}
\newcommand{\npar}{\par \vspace{2.3ex plus 0.3ex minus 0.3ex}}
\setcounter{MaxMatrixCols}{10}
\begin{document}
\newcommand{\fra}[1]{\ensuremath{\frac{\partial #1}{\partial #2}}}
\raggedbottom
\pagenumbering{gobble}\clearpage
\chapter{Second chapter}
\input{chapter2} %The pages mentioned are inside the chapter2.tex file
\clearpage
\bibliographystyle{abbrvnat}
\bibliography{References_PhD}
\end{document}

第 116-118 页的代码:

p.116(仅一些文字和数学符号):

\begin{enumerate}
\item[] \begin{equation*} \text{Min/Max } \sum^{s}_{t=1} \Omega_{t \mid t \in i} 
\end{equation*}
\item[] subject to
\item[] \begin{center} $\forall t,s \in T: \hat{\theta_{t}} \mathbf{W_{t}X_{t}} + \Omega_{t} \leqslant \mathbf{W_{t}} (\left( \frac{Q_{t}}{Q_{s}} \right)^{\frac{1}{\gamma}} \mathbf{X_{s}}) + \Omega_{s}$.
\end{center}
\item[] \begin{center}
$\forall t: \beta*\theta_{t} \leq \hat{\theta_{t}} \leq (2-\beta)*\theta_{t}$
\end{center}
\item[] \begin{center}
$\sum^{T}_{t=1} \hat{\theta_{t}} \mathbf{W_{t} X_{t}} \geq \beta* \sum^{T}_{t=1} \theta_{t} \mathbf{W_{t} X_{t}}$
\end{center}
\item[] \begin{center} $\forall t \in T: \Omega_{t} \geq a$. \end{center}
\item[] \begin{center} $\forall t \in T: 0 \leq \hat{\theta_{t}} \leq 1$.
\end{center}
\end{enumerate}
We applied this procedure to the MC samples discussed in Appendix \ref{MonteCarlo}. \autoref{MCboundsbeta} shows the frequency with which we obtain correct lower and upper bounds for individual unobserved input costs, averaged over the 200 bootstraps and for the sample size of 500 obs. For comparison, columns 1 and 2 show results obtained by LP-OP. Columns 3-8 then show results obtained by LP-2 for alternative values of $\beta$. \autoref{MCboundsbeta} presents some interesting features. First, we find that under LP-OP the estimated $\Omega$ value nearly always exceeds its true value. This result should, however, not be too surprising given the discussion in \autoref{identifomega} indicating that LP-OP tends to overestimate both the industry average of $\Omega$ as well as cost efficiency $\theta$. Thus, the LP-OP estimate of $\Omega$ serves as an informative upper bound for most (but not all) observations. Second, we observe a dramatic increase in the number of observations for which we obtain a correct lower bound as $\beta$ is being reduced. As such, lowering $\beta$ presents a viable alternative for obtaining set identification of $\Omega$ in case precise information regarding bounds on $\Omega$ is not available (e.g. in the MC simulation we merely impose a common lower (upper) bound on the $\Omega$ values lying 10\% below (above) the lowest (highest) unobserved cost in the sample). More generally, the set identification for $\Omega$ will become more precise with better recovery of the returns-to-scale $\gamma$, individual cost efficiency $\theta$ and with narrower bounds on $\Omega$.%Some comments.
\clearpage

第 117 页:

\begin{table}[h]
\centering
\caption{Set identification results for $\Omega$ based on LP-2 (sample size 500 obs)}
\label{MCboundsbeta}
\resizebox{\textwidth}{!}{%
\begin{threeparttable}
\begin{tabular}{l|cc|cc|cc|cc}
\toprule
& \multicolumn{2}{c}{LP-1}
& \multicolumn{2}{c}{$\beta =$ 1} 
& \multicolumn{2}{c}{$\beta = $ .950} 
& \multicolumn{2}{c}{$\beta = $ .900} \\ \midrule
& $\# (\Omega^{true} > \Omega_{LP-OP})$ 
& $\# (\Omega^{true} < \Omega_{LP-OP})$ 
&  $\# (\Omega^{true} > \Omega^{MIN}_{LP-2})$ 
&  $\# (\Omega^{true} < \Omega^{MAX}_{LP-2})$
&  $\# (\Omega^{true} > \Omega^{MIN}_{LP-2})$ 
&  $\# (\Omega^{true} < \Omega^{MAX}_{LP-2})$ 
&  $\# (\Omega^{true} > \Omega^{MIN}_{LP-2})$ 
&  $\# (\Omega^{true} < \Omega^{MAX}_{LP-2})$ 
\\ \midrule
$\sigma^{2}_{\varepsilon}$=0    & 9.67 & 490.33  & 18.79  & 492.32 & 265.97    & 499.74  & 491.73 & 500 \\
$\sigma^{2}_{\varepsilon}$=.025 & 19.63 & 480.37 & 23.99 & 482.4 & 291.37 & 499.66 & 485.89  & 500 \\
$\sigma^{2}_{\varepsilon}$=.05  & 46.8 & 453.2 & 49.32  & 453.85 & 284.93 & 499.19 & 463.69  & 500 \\ \midrule
$\sigma^{2}_{\varepsilon}$=0   & (-) & (-) & 0 & 10  & 5.67  & 10     & 9.90 & 10  \\
$\sigma^{2}_{\varepsilon}$=.025 & (-) & (-)  & 0   & 10 & 6.44   & 10  & 9.96   & 10  \\
$\sigma^{2}_{\varepsilon}$=.05  & (-) & (-) & 0  & 10  & 6.15  & 10  & 9.73    & 10  \\ 
\bottomrule
\end{tabular}%
\begin{tablenotes}
\Large \item Note: Rows 1-3 show the frequency of correct set identification of $\Omega$ for individual observations. Similar results on the level of individual groups $i$ are reported in rows 4-6 (i.e. comparing the computed LP-2 objective function value with its true value). For the sample of 500 observations there are 10 such groups, each consisting of 50 observations.
\end{tablenotes}
\end{threeparttable}
} %resizebox
\end{table}

p.118(与 p.117 相同,但使用 sidewaystable 而不是 table):

\begin{sidewaystable}
\centering
\caption{Set identification results for $\Omega$ based on LP-2 (sample size 500 obs)}
\label{MCboundsbeta}
\resizebox{\textwidth}{!}{%
\begin{threeparttable}
\begin{tabular}{l|cc|cc|cc|cc}
\toprule
& \multicolumn{2}{c}{LP-1}
& \multicolumn{2}{c}{$\beta =$ 1} 
& \multicolumn{2}{c}{$\beta = $ .950} 
& \multicolumn{2}{c}{$\beta = $ .900} \\ \midrule
& $\# (\Omega^{true} > \Omega_{LP-OP})$ 
& $\# (\Omega^{true} < \Omega_{LP-OP})$ 
&  $\# (\Omega^{true} > \Omega^{MIN}_{LP-2})$ 
&  $\# (\Omega^{true} < \Omega^{MAX}_{LP-2})$
&  $\# (\Omega^{true} > \Omega^{MIN}_{LP-2})$ 
&  $\# (\Omega^{true} < \Omega^{MAX}_{LP-2})$ 
&  $\# (\Omega^{true} > \Omega^{MIN}_{LP-2})$ 
&  $\# (\Omega^{true} < \Omega^{MAX}_{LP-2})$ 
\\ \midrule
$\sigma^{2}_{\varepsilon}$=0    & 9.67 & 490.33  & 18.79  & 492.32 & 265.97    & 499.74  & 491.73 & 500 \\
$\sigma^{2}_{\varepsilon}$=.025 & 19.63 & 480.37 & 23.99 & 482.4 & 291.37 & 499.66 & 485.89  & 500 \\
$\sigma^{2}_{\varepsilon}$=.05  & 46.8 & 453.2 & 49.32  & 453.85 & 284.93 & 499.19 & 463.69  & 500 \\ \midrule
$\sigma^{2}_{\varepsilon}$=0   & (-) & (-) & 0 & 10  & 5.67  & 10     & 9.90 & 10  \\
$\sigma^{2}_{\varepsilon}$=.025 & (-) & (-)  & 0   & 10 & 6.44   & 10  & 9.96   & 10  \\
$\sigma^{2}_{\varepsilon}$=.05  & (-) & (-) & 0  & 10  & 6.15  & 10  & 9.73    & 10  \\ 
\bottomrule
\end{tabular}%
\begin{tablenotes}
\Large \item Note: Rows 1-3 show the frequency of correct set identification of $\Omega$ for individual observations. Similar results on the level of individual groups $i$ are reported in rows 4-6 (i.e. comparing the computed LP-2 objective function value with its true value). For the sample of 500 observations there are 10 such groups, each consisting of 50 observations.
\end{tablenotes}
\end{threeparttable}
} %resizebox
\end{sidewaystable}

p.119:我想删除的空白处

p.120:以下页面仅包含章节标题和图片

\section{Graphical output of the Simar, 2003 procedure} 
\begin{minipage}{0.55\textheight}
\centering
\begin{adjustbox}{angle=90, center, caption=\# of DMUs with robust cost efficiency 
$\theta^{m}_{t}>$ 1.05 as a function of m, nofloat=figure} %,center
\includegraphics[width=1.7\linewidth]{Figures/simar1.05.png}  
\label{simarprocedure_single}
\end{adjustbox}
\end{minipage}
\FloatBarrier

更新:我按照下面 David Carlisle 的建议将标题设置为多行。这给出了以下代码(输出显示在最后一个屏幕截图中)。现在表格显然适合页面,但问题仍然存在?

\begin{sidewaystable}
\centering 
\caption{Set identification results for $\Omega$ based on LP-2 (sample size 500 obs)}
\label{MCboundsbeta}
%\resizebox{\textwidth}{!}{%
\setlength{\tabcolsep}{0.75\tabcolsep}
\begin{threeparttable}
\begin{tabular}{l|cc|cc|cc|cc}
\toprule
& \multicolumn{2}{c}{LP-1}
& \multicolumn{2}{c}{$\beta =$ 1} 
& \multicolumn{2}{c}{$\beta = $ .950} 
& \multicolumn{2}{c}{$\beta = $ .900} \\ \midrule
& $\# (\Omega^{true}$ 
& $\# (\Omega^{true}$ 
&  $\# (\Omega^{true}$ 
&  $\# (\Omega^{true}$ 
&  $\# (\Omega^{true}$ 
&  $\# (\Omega^{true}$ 
&  $\# (\Omega^{true}$ 
&  $\# (\Omega^{true}$ \\
& $>$ & $<$ & $>$ & $<$ & $>$ & $<$ &$>$ &$<$
\\
& $\Omega_{LP-OP})$ & $\Omega_{LP-OP})$ & $\Omega^{MIN}_{LP-2})$ & $\Omega^{MAX}_{LP-2})$ & $\Omega^{MIN}_{LP-2})$ & $\Omega^{MAX}_{LP-2})$ & $\Omega^{MIN}_{LP-2})$ & $\Omega^{MAX}_{LP-2})$
\\ \midrule
$\sigma^{2}_{\varepsilon}$=0    & 9.67 & 490.33  & 18.79  & 492.32 & 265.97    & 499.74  & 491.73 & 500 \\
$\sigma^{2}_{\varepsilon}$=.025 & 19.63 & 480.37 & 23.99 & 482.4 & 291.37 & 499.66 & 485.89  & 500 \\
$\sigma^{2}_{\varepsilon}$=.05  & 46.8 & 453.2 & 49.32  & 453.85 & 284.93 & 499.19 & 463.69  & 500 \\ \midrule
$\sigma^{2}_{\varepsilon}$=0   & (-) & (-) & 0 & 10  & 5.67  & 10     & 9.90 & 10  \\
$\sigma^{2}_{\varepsilon}$=.025 & (-) & (-)  & 0   & 10 & 6.44   & 10  & 9.96   & 10  \\
$\sigma^{2}_{\varepsilon}$=.05  & (-) & (-) & 0  & 10  & 6.15  & 10  & 9.73    & 10  \\ 
\bottomrule
\end{tabular}%
\begin{tablenotes}
\Large \item Note: Rows 1-3 show the frequency of correct set identification of $\Omega$ for individual observations. Similar results on the level of individual groups $i$ are reported in rows 4-6 (i.e. comparing the computed LP-2 objective function value with its true value). For the sample of 500 observations there are 10 such groups, each consisting of 50 observations.
\end{tablenotes}
\end{threeparttable}
%} %resizebox
\end{sidewaystable}

P.116 我想要表格之前页面上的文本 p.117 普通的桌子,看上去很小 p.118 侧向桌看起来好多了 p.119 使用 sidewaystable 弹出的空白页需要删除 p.120 正文以章节标题和图片结尾(竖排而非横排,以提高可读性) p.117 更新:表格适合页面,但空白页仍然存在

答案1

不确定从何而来0.55\textheight,但如果这是你想要的宽度:

\documentclass[10pt,twoside]{report}
\usepackage{appendix,amsmath,amscd,amssymb,amsfonts,amsthm,setspace,booktabs,pgfplotstable,a4wide,float,floatflt,bbm,tikz,pdflscape}
\usepackage{tikz,etoolbox,graphicx,chngpage,pdfpages,multirow,fancyhdr,verbatim,float,lscape,rotating,color, colortbl,longtable,graphicx,mathrsfs,eurosym,enumerate}
\usepackage[normalem]{ulem}
\usepackage[margin=1.75in]{geometry}
\usepackage{adjustbox}
\usepackage{refstyle}
\usepackage[colorlinks=true, citecolor=black, linkcolor=black, urlcolor=black,breaklinks]{hyperref}
\usepackage[round,authoryear]{natbib} 
\usepackage[flushleft]{threeparttable}
\usepackage[section]{placeins}
\usepackage{mathtools,subcaption,bm,arydshln,bookmark,chngcntr,titlesec}

\usetikzlibrary{positioning}
\newcommand{\npar}{\par \vspace{2.3ex plus 0.3ex minus 0.3ex}}
\setcounter{MaxMatrixCols}{10}

\newsavebox{\tempbox}

\begin{document}

\begin{sidewaystable}
\centering
\caption{Set identification results for $\Omega$ based on LP-2 (sample size 500 obs)}
\label{MCboundsbeta}
\resizebox{\textwidth}{!}{%
\begin{threeparttable}
\begin{tabular}{l|cc|cc|cc|cc}
\toprule
& \multicolumn{2}{c}{LP-1}
& \multicolumn{2}{c}{$\beta =$ 1} 
& \multicolumn{2}{c}{$\beta = $ .950} 
& \multicolumn{2}{c}{$\beta = $ .900} \\ \midrule
& $\# (\Omega^{true} > \Omega_{LP-OP})$ 
& $\# (\Omega^{true} < \Omega_{LP-OP})$ 
&  $\# (\Omega^{true} > \Omega^{MIN}_{LP-2})$ 
&  $\# (\Omega^{true} < \Omega^{MAX}_{LP-2})$
&  $\# (\Omega^{true} > \Omega^{MIN}_{LP-2})$ 
&  $\# (\Omega^{true} < \Omega^{MAX}_{LP-2})$ 
&  $\# (\Omega^{true} > \Omega^{MIN}_{LP-2})$ 
&  $\# (\Omega^{true} < \Omega^{MAX}_{LP-2})$ 
\\ \midrule
$\sigma^{2}_{\varepsilon}$=0    & 9.67 & 490.33  & 18.79  & 492.32 & 265.97    & 499.74  & 491.73 & 500 \\
$\sigma^{2}_{\varepsilon}$=.025 & 19.63 & 480.37 & 23.99 & 482.4 & 291.37 & 499.66 & 485.89  & 500 \\
$\sigma^{2}_{\varepsilon}$=.05  & 46.8 & 453.2 & 49.32  & 453.85 & 284.93 & 499.19 & 463.69  & 500 \\ \midrule
$\sigma^{2}_{\varepsilon}$=0   & (-) & (-) & 0 & 10  & 5.67  & 10     & 9.90 & 10  \\
$\sigma^{2}_{\varepsilon}$=.025 & (-) & (-)  & 0   & 10 & 6.44   & 10  & 9.96   & 10  \\
$\sigma^{2}_{\varepsilon}$=.05  & (-) & (-) & 0  & 10  & 6.15  & 10  & 9.73    & 10  \\ 
\bottomrule
\end{tabular}%
\begin{tablenotes}
\Large \item Note: Rows 1-3 show the frequency of correct set identification of $\Omega$ for individual observations. Similar results on the level of individual groups $i$ are reported in rows 4-6 (i.e. comparing the computed LP-2 objective function value with its true value). For the sample of 500 observations there are 10 such groups, each consisting of 50 observations.
\end{tablenotes}
\end{threeparttable}
} %resizebox
\end{sidewaystable}

\section{Graphical output of the Simar, 2003 procedure} 
\centering
\begin{minipage}{0.55\textheight}
\begin{adjustbox}{angle=90, center, caption=\# of DMUs with robust cost efficiency 
$\theta^{m}_{t}>$ 1.05 as a function of m, nofloat=figure} %,center
\includegraphics[height=\linewidth]{example-image}
\label{simarprocedure_single}
\end{adjustbox}
\end{minipage}
\FloatBarrier
\end{document}

现在,如果您想使图形尽可能大并且仍然适合页面:

请注意,随着小页面的缩小,标题的高度可能会改变,因此形成循环。

\begingroup% use local registers
\setbox0=\vbox{\csname @minipagetrue\endcsname% if top of page
  \section{Graphical output of the Simar, 2003 procedure}}% measure height
\setlength{\dimen1}{\dimexpr \textheight-\ht0-\dp0}% rest of page, not including caption
\unvbox0
\dimen2=\textwidth
\loop
  \sbox1{\begin{minipage}{\dimen2}
    \vspace*{\abovecaptionskip}%
    \captionof{figure}{\# of DMUs with robust cost efficiency 
      $\theta^{m}_{t}>$ 1.05 as a function of m}
    \addtocounter{figure}{-1}%
   \end{minipage}}
  \sbox2{\includegraphics[height=\textwidth,width={\dimexpr \dimen1-\ht1-\dp1},keepaspectratio]{example-image-16x9}}%
  \ifdim\ht2<\dimen2
    \dimen2=\ht2
  \repeat
\refstepcounter{figure}\label{simarprocedure_single}%
\centering
\rotatebox{90}{\usebox2}\\
\noindent\usebox1\par
\endgroup

相关内容