在回忆录中为 \title 和 \thanks 定义不同的字体

在回忆录中为 \title 和 \thanks 定义不同的字体

\title我想更改和的字体\thanks。这可以通过在我想更改的文本前面添加字体来实现,例如\title{\sffamily{My Title}}

我想有一个更聪明的方法,就像我对标题所做的那样:

\usepackage{caption}
\captionsetup[figure]{labelfont={bf},textfont={small}}

这样我就不必每次都定义标题的规范。或者也许\title在我的规则中更改字体?我怀疑和\maketitle有类似的解决方案,但我找不到,或者通过阅读手册来找出解决方案。\title\thanksmemoir

我的序言中的相关内容如下:

\documentclass[a4paper,article,twocolumn]{memoir}
\usepackage{kpfonts}
\usepackage[T1]{fontenc}

希望一些聪明的人能够帮助我!

编辑:

以下是创建我的文档所需的内容:

\documentclass[a4paper,article,twocolumn]{memoir}
\RequirePackage[english]{babel}
\RequirePackage{lipsum}
\RequirePackage[utf8x]{inputenc}
\RequirePackage{geometry}
\RequirePackage{graphicx}
\RequirePackage[table]{xcolor}
\RequirePackage{microtype}
\checkandfixthelayout
\RequirePackage{kpfonts}
\RequirePackage[T1]{fontenc}
\newgeometry{left=2.0cm,right=2.0cm,bottom=2.5cm,top=2.5cm,head=79pt}
%%%%%%
% Keywords
%%%%%%
\providecommand{\keywords}[1]{\textbf{Keywords:} #1}
%%%%%%
% \thanks
%%%%%%
% Maybe I can put something here???
%%%%%%
% Pagestyle
%%%%%%
\makepagestyle{paper}
\makepsmarks{paper}{
  \createmark{chapter}      {both}{shownumber}{}{ -\ }
}
\makeoddhead{paper}%
  {Published: \puB}%
  {}%
  {\sffamily\institution\hspace{0.1cm}\includegraphics[height=0.5cm]{logo.png}}%
\makeevenhead{paper}%
  {Published: \puB}%
  {}%
  {\sffamily\institution\hspace{0.1cm}\includegraphics[height=0.5cm]{logo.png}}%
\makeoddfoot{paper}
  {}
  {\thepage} %  {\thepage/\pageref*{LastPage}}
  {}
\makeevenfoot{paper}
  {}
  {\thepage}
  {}
\makeheadrule{paper}{\textwidth}{\normalrulethickness}
%%%%%%
% Dates
%%%%%%
\newcommand{\submitted}[1]{\gdef\suB{#1}}
\newcommand{\published}[1]{\gdef\puB{#1}}
\newcommand{\suB}{}
\newcommand{\puB}{}
\predate{\vfill\begin{flushleft}\large}
\postdate{\vfill\end{flushleft}}
%--------------------------------------------------------------------------
\pretitle{\begin{flushleft}\huge\bfseries\sffamily\vskip 0cm}
\posttitle{\end{flushleft}}
\makeatletter
\renewcommand{\@maketitle}{%
  \newpage
  \null
  \maketitlehooka %before \title
    \vskip -1cm%
  {\@bspredate %
  \hspace{-0.9em}
    \begin{tabular}{p{2cm} p{5cm}}
    Submitted: & \suB\\
    Published: & \puB 
    \end{tabular}
    \@bspostdate}
  \maketitlehookb % before \author
  {\@bspretitle \@title \@bsposttitle}
  \maketitlehookc % before \date  
  {\begin{minipage}{0.7\textwidth}%
  \@bspreauthor %
  \@author %
  \@bspostauthor%
   \end{minipage}
    \hfill
    \begin{minipage}{0.20\textwidth}%
    \centering
    \vskip2em\includegraphics[width=0.5\textwidth]{logo.png}%
    \vskip0em\sffamily\bfseries\institution
    \end{minipage}
    }
  \maketitlehookd % after \date
  \vskip 1em
}
\makeatother
%--------------------------------------------------------------------------
\title{Title of paper}
\newcommand{\institution}{My University}
\author{%
First author\thanks{My e-mail}
\and 
Second author\thanks{\ttfamily{Their e-mail}}
}%
\submitted{DATE 1}
\published{DATE 2}
%--------------------------------------------------------------------------
\begin{document}
\twocolumn[\maketitle\hrule
\vspace{10pt}
\begin{onecolabstract}
Some text for my abstract...
%\input{0-abstract.tex}
\end{onecolabstract}
\keywords{%
Please, let, me, pass
}\vspace{10pt}
\hrule\vspace{30pt}]
\saythanks
\pagestyle{paper}
%--------------------------------------------------------------------------
\chapter{Introduction}
\label{chap:intro}
\lipsum[1-2]
\section{Section for intro}
\lipsum[1-1]
\chapter{Method}
\label{chap:method}
\lipsum[1-2]
\end{document}

我的猜测是,可以更改所有 的字体\thanks,而不是将字体写入\thanks{}

答案1

memoir确实“为文档的标题样式提供了一定的灵活性[;]提供了用户级命令,可以更改这些命令以重新配置由此产生的外观\maketitle”。这些命令包括

\pretitle
\posttitle
\preauthor
\postauthor
\predate
\postdate

要更新\title字体,请使用 添加它。但是,请考虑已经设置了一些默认格式的\pretitle{<font>}事实:\title\title

\pretitle{\begin{center}\LARGE}

要更新\thanks字体,请点击\makethanksmark位于\thanks文本前面的字体。您可以使用它\g@addto@macro来添加内容,也可以执行\let...\renewcommand更新。

在此处输入图片描述

\documentclass{memoir}

\title{A title}
\author{An author\thanks{A note.}}

% Update font of \title.
\pretitle{\begin{center}\LARGE\sffamily}

% Update font of \thanks note.
\let\oldmakethanksmark\makethanksmark
\renewcommand{\makethanksmark}{\oldmakethanksmark\sffamily}
% ...or
% \makeatletter
% \g@addto@macro\makethanksmark{\sffamily}
% \makeatother

\begin{document}

\maketitle

\end{document}

以下非正式的更新方式\title以及\thanks始终包含您所需要的内容也可能是您所追求的:

\let\oldthanks\thanks
\renewcommand{\thanks}[1]{\oldthanks{\sffamily #1}}
\let\oldtitle\title
\renewcommand{\title}[1]{\oldtitle{\sffamily #1}}

相关内容