![如何使双栏文章的标题居中?](https://linux22.com/image/425019/%E5%A6%82%E4%BD%95%E4%BD%BF%E5%8F%8C%E6%A0%8F%E6%96%87%E7%AB%A0%E7%9A%84%E6%A0%87%E9%A2%98%E5%B1%85%E4%B8%AD%EF%BC%9F.png)
我正在尝试写一篇文章,希望标题像摘要一样居中。目前我有这个:
\documentclass[12pt, letterpaper, twocolumn]{article}
\usepackage{abstract} % Allows abstract customization
\usepackage{titlesec} % Allows customization of titles
\renewcommand\thesection{\Roman{section}} % Roman numerals for the sections
\renewcommand\thesubsection{\roman{subsection}} % roman numerals for subsections
\titleformat{\section}[block]{\large\scshape\centering}{\thesection.}{1em}{} % Change the look of the section titles
\titleformat{\subsection}[block]{\large}{\thesubsection.}{1em}{}
\title{}
\author{Daniela Dur\'an Escalona}
\date{December , 2020}
\begin{document}
\maketitle
\twocolumn[
\begin{onecolabstract}
hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola
\end{onecolabstract}
]
\section{hola 2}
\end{document}
答案1
问题是\maketitle
已经在使用\twocolumn
,所以第二个在下一页。
\documentclass[12pt, letterpaper]{article}
\usepackage{abstract} % Allows abstract customization
\usepackage{titlesec} % Allows customization of titles
\renewcommand\thesection{\Roman{section}} % Roman numerals for the sections
\renewcommand\thesubsection{\roman{subsection}} % roman numerals for subsections
\titleformat{\section}[block]{\large\scshape\centering}{\thesection.}{1em}{} % Change the look of the section titles
\titleformat{\subsection}[block]{\large}{\thesubsection.}{1em}{}
\title{}
\author{Daniela Dur\'an Escalona}
\date{December , 2020}
\begin{document}
\twocolumn[
\maketitle
\begin{onecolabstract}
hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola hola
\end{onecolabstract}
]
\section{hola 2}
\end{document}