
我正在寫一篇 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
切換。它將格式化的文字放入保存箱並一次性將其全部轉儲。頁面末尾留下的任何內容都將使用 multicols 進行處理。\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}