删除附录前的页面空间

删除附录前的页面空间

我正在写一篇 IEEE 格式的论文,分为两栏。我将在附录中包含一些大图,这些图跨越两栏 - 宽但不长 - 因为在文本中放置这些图会破坏论文的组织。但是,当我创建附录时,参考文献后面有一大片空白,附录转到下一页。我附上了一个示例代码来展示这个问题。

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%2345678901234567890123456789012345678901234567890123456789012345678901234567890
%        1         2         3         4         5         6         7         8

\documentclass[conference,10pt]{IEEEtran}
\makeatletter
\def\ps@headings{%
\def\@oddhead{\mbox{}\scriptsize\rightmark \hfil \thepage}%
\def\@evenhead{\scriptsize\thepage \hfil \leftmark\mbox{}}%
\def\@oddfoot{}%
\def\@evenfoot{}}
\makeatother
\pagestyle{empty}


\usepackage{booktabs}

\usepackage[caption=false]{subfig}
\usepackage{comment}
\usepackage[]{algorithm2e}
\usepackage{balance} 
\usepackage{booktabs} 
\usepackage{subfig}

\usepackage{balance}


\usepackage[english]{babel}
\usepackage{blindtext}

\usepackage{blindtext}
\usepackage{wrapfig}
\usepackage{amsmath}
\usepackage[dvipsnames,svgnames,x11names]{xcolor}
\usepackage[final]{changes}
\definechangesauthor[color=BrickRed]{EE}
\usepackage{todonotes}
\setlength{\marginparwidth}{3cm}
\makeatletter
\setremarkmarkup{\todo[color=Changes@Color#1!20,size=\scriptsize]{#1: #2}}
\makeatother

\newcommand{\note}[2][]{\added[#1,remark={#2}]{}}

\IEEEoverridecommandlockouts      

\title{\LARGE \bf A long title comes here about lets say whales}

\author{\IEEEauthorblockN{
Author First\IEEEauthorrefmark{1},
Author Second\IEEEauthorrefmark{1},
Author Third\IEEEauthorrefmark{1}, 
Author Fourth \IEEEauthorrefmark{2} and
Author Fifth \IEEEauthorrefmark{1}}
\IEEEauthorblockA{\IEEEauthorrefmark{1}A University, City, State\\
Email: \{first, second, third, fifth\}@city.edu}
\IEEEauthorblockA{\IEEEauthorrefmark{2}Another University, City, State\\
Email: [email protected]}}

\begin{document}



\maketitle
\thispagestyle{empty}
\pagestyle{empty}

\begin{abstract}

\blindtext

\end{abstract}

\section{Conclusion}
\Blindtext
\Blindtext

\balance
\onecolumn
\section*{Appendix}

\Blindtext

\end{document}

我修改了论文内容,但包含了我正在使用的所有软件包。顺便提一下,我的大图是使用 \minipage 软件包创建的。这是我得到的,请注意附录之前的大量剩余空间。

编辑代码

我尽可能地删除了导致问题产生的冗余包,我只是想让其他人知道我使用的某个包是否会产生该问题。

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%2345678901234567890123456789012345678901234567890123456789012345678901234567890
%        1         2         3         4         5         6         7         8

\documentclass[conference,10pt]{IEEEtran}


\usepackage{balance}
\usepackage[english]{babel}
\usepackage{blindtext}
\IEEEoverridecommandlockouts      

\title{\LARGE \bf A long title comes here about lets say whales}

\author{\IEEEauthorblockN{
Author First\IEEEauthorrefmark{1},
Author Fourth \IEEEauthorrefmark{2} and
Author Fifth \IEEEauthorrefmark{1}}
\IEEEauthorblockA{\IEEEauthorrefmark{1}A University, City, State\\
Email: \{first, second, third, fifth\}@city.edu}
\IEEEauthorblockA{\IEEEauthorrefmark{2}Another University, City, State\\
Email: [email protected]}}

\begin{document}
\maketitle
\thispagestyle{empty}
\pagestyle{empty}

\begin{abstract}

\blindtext

\end{abstract}

\section{Conclusion}
\Blindtext
\Blindtext

\balance

\onecolumn

\section*{Appendix}

\Blindtext

\end{document}

答案1

此解决方案使用命令在自然页面边界之间\shortpage切换。它将格式化的文本放入保存框并一次性转储所有内容。页面末尾剩余的内容使用多列进行处理。\twocolumn\onecolumn

\afterpage在下一页开始时执行,\onecolumn不会创建新页面。它还会将上一页的剩余文本保存到 中\AP@partial

\documentclass[conference,10pt]{IEEEtran}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{balance}

\usepackage{afterpage}
\usepackage{multicol}
\newsavebox{\shortpagebox}

\makeatletter
\newcommand{\shortpage}[1]% #1= \twocolumn text to wrap into \onecolumn page
{\par
  \setbox\shortpagebox=\vbox{\strut #1\par}%
  \afterpage{\onecolumn
    \begin{multicols}{2}
    \unvbox\AP@partial
    \end{multicols}}%
  \unvbox\shortpagebox
\par}
\makeatother

\IEEEoverridecommandlockouts      

\title{\LARGE \bf A long title comes here about lets say whales}

\author{\IEEEauthorblockN{
Author First\IEEEauthorrefmark{1},
Author Second\IEEEauthorrefmark{1},
Author Third\IEEEauthorrefmark{1}, 
Author Fourth \IEEEauthorrefmark{2} and
Author Fifth \IEEEauthorrefmark{1}}
\IEEEauthorblockA{\IEEEauthorrefmark{1}A University, City, State\\
Email: \{first, second, third, fifth\}@city.edu}
\IEEEauthorblockA{\IEEEauthorrefmark{2}Another University, City, State\\
Email: [email protected]}}

\begin{document}

\maketitle
\thispagestyle{empty}
\pagestyle{empty}

\begin{abstract}

\blindtext

\end{abstract}

\section{Conclusion}
\Blindtext
\shortpage{\Blindtext}

\section*{Appendix}

\Blindtext

\end{document}

相关内容