我正在用写一篇论文这个模板。默认情况下,它采用双列布局,没有单列选项。
如果我\onecolumn
在之前\maketitle
使用,则不会发生任何事情。 如果在之后使用它,则会拆分页面:第一页有标题,然后第一部分从第二页开始。
\documentclass[sigconf,nonacm]{aamas} % there is no "onecolumn" option
\newtheorem{Definition}{Definition}
\title[xxx]{xxx}
\begin{document}
\pagestyle{fancy}
\fancyhead{}
\onecolumn % doesn't do anything
\maketitle
\onecolumn % title is in the first page, then Introduction starts in the next page
\section{Introduction}
This document explains the main features of the `\texttt{aamas}'
document class, which is essentially identical to the `\texttt{acmart}'
document class provided by the ACM. The only difference is a minor
modification to allow for the correct copyright attribution to IFAAMAS.
For detailed documentation of the original document class, please refer
to the relevant website maintained by the~ACM:
\begin{Definition}
This should also spawn across the whole page, but it does not.
\end{Definition}
\end{document}
答案1
更新评论之后。
尝试使用\hsize=\textwidth
after\maketitle
或 after\begin{figure}
或 after \begin{table}
and来执行此代码
\global\@ACM@balancefalse
在序言中阻止\balance
采取行动。
可选择将 放在\appto{\@floatboxreset}{\hsize=\textwidth}
序言中的 之后\global\@ACM@balancefalse
。它将对所有浮点数起作用。
使用以下方法恢复两列格式(在新页面上)
\clearpage
\hsize=\columnwidth
% !TeX TS-program = pdflatex
\documentclass[sigconf,nonacm]{aamas} % there is no "onecolumn" option
%******************** added
\makeatletter
\global\@ACM@balancefalse
%\appto{\@floatboxreset}{\hsize=\textwidth} % OPTIONAL it will work with all the floats
\makeatother
%******************
\newtheorem{Definition}{Definition}
\title[xxx]{xxx}
\begin{document}
\pagestyle{fancy}
\fancyhead{}
\maketitle
\hsize=\textwidth % added for one column <<<<<<<<<<<<<<<
\section{Introduction}
This document explains the main features of the `\texttt{aamas}'
document class, which is essentially identical to the `\texttt{acmart}'
document class provided by the ACM. The only difference is a minor
modification to allow for the correct copyright attribution to IFAAMAS.
For detailed documentation of the original document class, please refer
to the relevant website maintained by the~ACM:
\begin{Definition}
This should also spawn across the whole page, but it does not.
\end{Definition}
\begin{figure}[ht!]
\hsize=\textwidth %added <<<<<<<<<<<<<<<<<<<<<
\centering
\includegraphics[width=0.7\textwidth]{example-image-a}
\caption{The 23rd International Conference on Autonomous Agents and Multiagent Systems.}
\end{figure}
\begin{table}[ht]
\hsize=\textwidth% <<<<<<<<<<<<<<<<<<<<
\centering
\caption{Locations of the first five editions of AAMAS}
\label{tab:locations}
\begin{tabular}{rll}\toprule
\textit{Year} & \textit{City} & \textit{Country} \\ \midrule
2002 & Bologna & Italy \\
2003 & Melbourne & Australia \\
2004 & New York City & USA \\
2005 & Utrecht & The Netherlands \\
2006 & Hakodate & Japan \\ \bottomrule
\end{tabular}
\end{table}
\end{document}
答案2
好的。由于您使用的是自定义模板,因此可以真正编辑文件aamas.cls
本身。
如果您运行的是 GNU/Linux 或 MacOS,请打开终端,将 dir 更改为保存文件的目录aamas.cls
,然后运行以下命令:
$ sed -e 's/\\twocolumn\[\\box\\mktitle@bx\]/\\box\\mktitle@bx\\par/g' aamas.cls
这应该\twocolumn
用一列版本替换不同样式的选项,manuscript
而不改变其他设置。
如果您使用的是 Windows(我不知道 PowerShell 是否足以运行这样的脚本)或者不习惯使用 shell,您可以使用任何文本编辑器打开文件,搜索提到的行并手动更改它(当然,不要转义反斜杠和括号)。
此后,该类的所有样式都应使用一列布局。
附言:我只是自己测试了正则表达式,并没有编译文件,因为我只查看了文件aamas.cls
,并没有下载它。最终,您必须在之后调整一些数字,但通常它应该可以工作。