我已將milticol
環境包含到我的 .tex 檔案中,以在使用\documentclass[10pt, twocolumn]{article}
.但是,當我使用multicols
摘要twocolumns
(標題和內容)時,字體大小會變更為較小的字體。
我該如何修復它?
%%%%****This is my code*****
\documentclass[10pt]{article}
\usepackage{multicol}
\setlength{\columnsep}{20.0pt}
\title{some title}
\begin{document}
\maketitle
%%this this title haven't the correct size
\begin{abstract}
this abstract haven't the correct size
\end{abstract}
\begin{multicols}{2}
\section{introduction}%%this title have the correct size
some introduction.
Whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever.
\section{another section}
Whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever
\end{multicols}
\end{document}
謝謝。
答案1
這裡是。
abstract
只需在序言中插入以下幾行即可修改 的含義:
\makeatletter
\renewenvironment{abstract}{%
\if@twocolumn
\section*{\abstractname}%
\else %% <- here I've removed \small
\begin{center}%
{\bfseries \Large\abstractname\vspace{\z@}}% %% <- here I've added \Large
\end{center}%
\quotation
\fi}
{\if@twocolumn\else\endquotation\fi}
\makeatother
微量元素:
%%%%****This is my code*****
\documentclass[10pt]{article}
\usepackage{multicol}
\setlength{\columnsep}{20.0pt}
\title{some title}
\makeatletter
\renewenvironment{abstract}{%
\if@twocolumn
\section*{\abstractname}%
\else %% <- here I've removed \small
\begin{center}%
{\bfseries \Large\abstractname\vspace{\z@}}% %% <- here I've added \Large
\end{center}%
\quotation
\fi}
{\if@twocolumn\else\endquotation\fi}
\makeatother
\begin{document}
\maketitle
%%this this title haven't the correct size
\begin{abstract}
this abstract have the correct size
\end{abstract}
\begin{multicols}{2}
\section{introduction}%%this title have the correct size
some introduction.
Whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever.
\section{another section}
Whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever, whatever
\end{multicols}
\end{document}
輸出:
答案2
值得檢查一下文檔類別如何abstract
定義環境article
:
\if@titlepage
\newenvironment{abstract}{%
\titlepage
\null\vfil
\@beginparpenalty\@lowpenalty
\begin{center}%
\bfseries \abstractname
\@endparpenalty\@M
\end{center}}%
{\par\vfil\null\endtitlepage}
\else
\newenvironment{abstract}{%
\if@twocolumn
\section*{\abstractname}%
\else
\small
\begin{center}%
{\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
\quotation
\fi}
{\if@twocolumn\else\endquotation\fi}
\fi
在您的情況下,由於titlepage
和twocolumn
選項均無效,因此定義為
\newenvironment{abstract}{%
\small
\begin{center}%
{\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
\quotation
}
{\endquotation}
結果是,如果titlepage
和twocolumn
選項都無效,(a) 相對字體大小更改為\small
,(b) 摘要標題(由 給出\abstractname
)居中,(c) 摘要正文在內部排版一個quotation
環境;最重要的是,這意味著abstract
環境中的邊距比文字正文中的邊距要寬一些(並且文字區塊要窄一些)。
如果您喜歡設定該選項後產生的「外觀」twocolumn
,只需發出以下指令(在序言中):
\renewenvironment{abstract}{\section*{\abstractname}}{}
或者,更簡單地說,根本不使用該abstract
環境。相反,只需輸入
\section*{\abstractname}
接下來是摘要正文。
答案3
另外兩個解決方案不關注內部結構,而只是模仿它們。一種用於常規twocolumn
(文檔類選項)文檔,一種用於模擬twocolumn
文檔(使用 package multicol
)。
\documentclass[10pt,twocolumn]{article}
\usepackage{blindtext}
\usepackage{titling}
\title{Wombats are cool}
\renewcommand{\maketitlehookd}{%
\begin{center}\normalfont\Large\bfseries\centering Abstract\end{center}
\begin{quotation}
\blindtext
\end{quotation}
}
\begin{document}
\maketitle
\section{Introduction}
\blindtext[2]
\section{Capybara}
\blindtext
\end{document}
使用 package multicol
,注意不同的邊距。
\documentclass[10pt]{article}
\usepackage{blindtext}
\usepackage{multicol}
\setlength{\columnsep}{20.0pt}
\title{K\"urbiskernbr\"otchen}
\begin{document}
\maketitle
\begin{center}\normalfont\Large\bfseries\centering Abstract\end{center}
\begin{quotation}
\blindtext
\end{quotation}
\begin{multicols}{2}
\section{Introduction}
Whenever, whereever, we're meant to be together
\blindtext
\section{Wombat}
\blindtext
\end{multicols}
\end{document}