I would like to create an acknowledgments
environment that's simply the duplicate of the abstract
environment, with two exceptions:
-
It should print
Acknowledgments
as its heading, notAbstract
. -
The
acknowledgments
environment should end with\clearpage
.
The answer to Duplicating Environments shows me how to duplicate an environment, but what do I need to do to accomplish the two points above?
\documentclass{article}
\usepackage{filecontents,lipsum}
\begin{filecontents}{mystyle.sty}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{mystyle}
\let\acknowledgments\abstract
\let\endacknowledgments\endabstract
\endinput
\end{filecontents}
\usepackage{mystyle}
\begin{document}
\begin{abstract}
\lipsum[1]
\end{abstract}
\begin{acknowledgments}
\lipsum[1]
\end{acknowledgments}
\end{document}
Best Answer
It seems easier to define the
acknowledgments
environment as an "abstract
wrapper" using the following:The name redefinition to
Acknowledgments
is temporary within the environment group.