我正在使用 Springer 的文档类为即将召开的会议准备摘要集svmult
。但是,使用标准\tableofcontents
命令会给出一个目录,其中贡献的标题首先以粗体显示,作者的姓名则以正常字体显示在下面,如下所示:
我需要反转目录中标题和作者的顺序,这样作者就排在第一位(粗体),贡献的标题排在下面,并且使用正常字体或斜体。我尝试修改文件svmult.cls
来做到这一点,但我只设法更改了字体,而没有更改条目的顺序。任何帮助都将不胜感激!
编辑:
这是一个简单的例子:
\documentclass[graybox, openany]{svmult}
\usepackage{lipsum}
\usepackage{csquotes}
\usepackage[authordate,natbib]{biblatex-chicago}
\usepackage{helvet} % selects Helvetica as sans-serif font
%\usepackage{courier} % selects Courier as typewriter font
\usepackage{type1cm} % activate if the above 3 fonts are
% not available on your system
\usepackage{makeidx} % allows index generation
\usepackage{graphicx} % standard LaTeX graphics tool
% % when including figure files
\usepackage{multicol} % used for the two-column index
\usepackage[bottom]{footmisc}% places footnotes at page bottom
%
%% see the list of further useful packages
%% in the Reference Guide
%
\usepackage[svgnames]{xcolor}
\makeindex % used for the subject index
% % please use the style svind.ist with
% % your makeindex program
%
\usepackage{graphicx}
%\usepackage[outline]{contour}
\usepackage{tikz}
\usepackage{pifont}
%\usepackage{pst-text}
%%%% Additional font macros
\makeatletter
%%%% light series
%% e.g., s:12
\DeclareRobustCommand\ltseries
{\not@math@alphabet\ltseries\relax
\fontseries\ltdefault\selectfont}
%% e.g., t:32
\newcommand{\ltdefault}{l}
%% e.g., v:19
\DeclareTextFontCommand{\textlt}{\ltseries}
% heavy(bold) series
\DeclareRobustCommand\hbseries
{\not@math@alphabet\hbseries\relax
\fontseries\hbdefault\selectfont}
%% e.g., t:32
\newcommand{\hbdefault}{hb}
%% e.g., v:19
\DeclareTextFontCommand{\texthb}{\hbseries}
\makeatother
\newcommand*{\isbn}{{\small\textsc{ISBN}}}
%%% for the Web-O-Mints fonts
\newcommand*{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}
%%% for the Fontsite 500 fonts
\newcommand*{\FSfont}[1]{%
\fontencoding{T1}\fontfamily{#1}\selectfont}
%\renewcommand*{\FSfont}[1]{}% kills special font selections
\newcommand*{\labelit}[1]{\phantomsection\label{#1}}
\newcommand*{\refit}[1]{(graphic on page~\pageref{#1})}
\DeclareRobustCommand{\cs}[1]{\texttt{\char`\\#1}}
\newlength{\tpheight}\setlength{\tpheight}{0.9\textheight}
\newlength{\txtheight}\setlength{\txtheight}{0.9\tpheight}
\newlength{\tpwidth}\setlength{\tpwidth}{0.9\textwidth}
\newlength{\txtwidth}\setlength{\txtwidth}{0.9\tpwidth}
\newlength{\drop}
\newenvironment{showtitle}{%
\begin{boxminipage}[c][\tpheight]{\tpwidth}
\centering\begin{vplace}\begin{minipage}[c][\txtheight]{\txtwidth}}%
{\end{minipage}\end{vplace}\end{boxminipage}}
\begin{document}
\tableofcontents
%List of contributors
\contributors
\addcontentsline{toc}{chapter}{List of Contributors}
\begin{thecontriblist}
John Smith
\at Fun University, USA, \email{[email protected]}
\and
Brad Pitt
\at University of Fun, Canada, \email{[email protected]}
\end{thecontriblist}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Contribution 1
\author{John Smith}
\title*{Contribution 1}
% Use \titlerunning{Short Title} for an abbreviated version of
% your contribution title if the original one is too long
% Use \authorrunning{Short Title} for an abbreviated version of
% your contribution title if the original one is too long
\institute{John Smith
\at Fun University, USA, \email{[email protected]}}
%\and Name of Second Author \at Name, Address of Institute \email{[email protected]}}
%
% Use the package "url.sty" to avoid
% problems with special characters
% used in your e-mail or web address
\maketitle
\dominitoc
\begin{refsection}
\abstract{\lipsum
\keywords{fun, funny}
}
%\section*{References}
%\printbibliography[heading=none]
\end{refsection}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Contribution 2
\author{Brad Pitt}
\title*{Contribution 2}
\institute{Brad Pitt
\at University of Fun, Canada, \email{[email protected]}}
\maketitle
\dominitoc
\begin{refsection}
\abstract{\lipsum
\keywords{lorem, ipsum}
}
%\section*{References}
%\printbibliography[heading=none]
\end{refsection}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
这svmult
类可以在以下位置下载:Springer 官方 FTP 存储库(我认为最新版本是 中的版本/pub/tex/latex/svmultt1/
)。
答案1
根据您的示例(我已经将其最小化了不少),您可以使用几个etoolbox
补丁:
\documentclass{svmult}% ftp://ftp.springer.de/pub/tex/latex/svmultt1/styles/svmult.cls
\usepackage{etoolbox}
\usepackage{type1cm} % activate if the above 3 fonts are
% not available on your system
\makeatletter
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
% Remove printing of title and store it
\patchcmd{\maketitle}{\if@numart\if}{\iffalse\if}{}{}
\patchcmd{\maketitle}{\else\if}{\fi\let\title@store\@title\iffalse\if}{}{}
% Update printing of author and insert title after
\patchcmd{\maketitle}{\addcontentsline{toc}{author}{\toc@uthor}}{%
\addcontentsline{toc}{title}{\toc@uthor}%
\addcontentsline{toc}{author}{\title@store}%
}{}{}
\makeatother
\begin{document}
\tableofcontents
%List of contributors
\contributors
\addcontentsline{toc}{chapter}{List of Contributors}
\begin{thecontriblist}
John Smith
\at Fun University, USA, \email{[email protected]}
\and
Brad Pitt
\at University of Fun, Canada, \email{[email protected]}
\end{thecontriblist}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Contribution 1
\author{John Smith}
\title*{Contribution 1}
\institute{John Smith
\at Fun University, USA, \email{[email protected]}}
\maketitle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Contribution 2
\author{Brad Pitt}
\title*{Contribution 2}
\institute{Brad Pitt
\at University of Fun, Canada, \email{[email protected]}}
\maketitle
\end{document}
\@title
这个想法是将目录中的插入替换为\toc@uthor
为和反之亦然。需要进行一些管理工作来存储标题以供日后使用。