我正在使用jmlr2e.sty
包,用于提交给科学期刊的论文。该 sty 文件有\renewenvironment
重新定义\begin{abstract}
命令的命令。下面有些行usepackage{jmlr2e}
我写了\renewcommand\abstractname{newname}
,但它不起作用。我也试过了,\AtBeginDocument
但 pdf 一直显示“摘要”而不是“新名称”。
我正在使用 Mac OS 和 Tex Live。
答案1
jmlr2e
不使用\abstractname
。相反,它对名称进行硬编码:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% A B S T R A C T
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% use \begin{abstract} .. \end{abstract} for abstracts.
\renewenvironment{abstract}
{\centerline{\large\bf Abstract}\vspace{0.7ex}%
\bgroup\leftskip 20pt\rightskip 20pt\small\noindent\ignorespaces}%
{\par\egroup\vskip 0.25ex}
你可以用etoolbox
:
\documentclass{article}
% http://www.jmlr.org/format/jmlr2e.sty
\usepackage{jmlr2e,etoolbox}
\usepackage{lipsum}
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\patchcmd{\abstract}{Abstract}{newname}{}{}
\begin{document}
\begin{abstract}
\lipsum[1]
\end{abstract}
\end{document}