如何更改摘要标题的字体大小

如何更改摘要标题的字体大小

我已将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

在你的情况下,由于选项titlepagetwocolumn无效,因此定义结果为

 \newenvironment{abstract}{%
        \small
        \begin{center}%
          {\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}%
        \end{center}%
        \quotation
      }
      {\endquotation}

结果是,如果titlepagetwocolumn选项均无效,则(a)相对字体大小将更改为\small,(b)摘要的标题(由 给出\abstractname)居中,并且(c)摘要正文在环境内排版quotation;最重要的是,这意味着环境内的边距abstract比文本正文中的边距稍宽(并且文本块稍窄)。

如果您更喜欢设置该选项后产生的“外观” twocolumn,只需发出以下指令(在序言中):

\renewenvironment{abstract}{\section*{\abstractname}}{}

或者,更简单一点,根本不使用环境abstract。只需输入

\section*{\abstractname}

接下来是摘要正文。

答案3

另外两个解决方案不考虑内部原理,而只是模仿它们。一个用于常规twocolumn(documentclass 选项)文档,一个用于模仿twocolumn文档(使用 package multicol)。

gabrielsandoval抽象两列

\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}

使用包multicol,注意不同的边距。

gabrielsandovalAbstractFakeTwocol

\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}

相关内容