下载了Elsevier的文章模板(elsarticle)并使用之后,发现babel不能正常工作。
\documentclass[preprint,a4paper,12pt]{elsarticle}
\usepackage[dutch]{babel}
\usepackage[utf8]{inputenc}
\journal{test}
\begin{document}
\begin{frontmatter}
\title{ Complicated }
\begin{abstract}
\end{abstract}
\begin{keyword}
\end{keyword}
\end{frontmatter}
\end{document}
问:有没有一种快捷方法可以将“关键词”、“摘要”和“预印本提交给”等词语更改为其他语言(例如荷兰语/法语)?
答案1
将类文件的相关部分复制到你的前言中并根据需要进行编辑。请注意,你需要\makeatletter
启用该字符的使用@
。
\documentclass{elsarticle}
\makeatletter
\renewenvironment{abstract}{\global\setbox\absbox=\vbox\bgroup
\hsize=\textwidth\def\baselinestretch{1}%
\noindent\unskip\textbf{Whatever} % <--- Edit as necessary
\par\medskip\noindent\unskip\ignorespaces}
{\egroup}
\def\keyword{%
\def\sep{\unskip, }%
\def\MSC{\@ifnextchar[{\@MSC}{\@MSC[2000]}}
\def\@MSC[##1]{\par\leavevmode\hbox {\it ##1~MSC:\space}}%
\def\PACS{\par\leavevmode\hbox {\it PACS:\space}}%
\def\JEL{\par\leavevmode\hbox {\it JEL:\space}}%
\global\setbox\keybox=\vbox\bgroup\hsize=\textwidth
\normalsize\normalfont\def\baselinestretch{1}
\parskip\z@
\noindent\textit{Some important words: } % <--- Edit as necessary
\raggedright % Keywords are not justified.
\ignorespaces}
\def\ps@pprintTitle{%
\let\@oddhead\@empty
\let\@evenhead\@empty
\def\@oddfoot{\footnotesize\itshape
Whatever \ifx\@journal\@empty Elsevier % <--- Edit as necessary
\else\@journal\fi\hfill\today}%
\let\@evenfoot\@oddfoot}
\makeatother
\begin{document}
\begin{abstract}
This is the abstract.
\end{abstract}
\begin{keyword}
Hacking
\end{keyword}
\maketitle
\end{document}