1

I am making a cover sheet for my university, which requires the very first page to contain some information and then from the second page, the document should follow the standard documentclass structure which has been chosen (in this case article).

My approach was to create a .sty file and redefine the \maketitlecommand and renew the abstract environment. Unfortunately, I keep failing at positioning the abstract underneath the title, author, etc. (as in the original article class). I am fairly certain that my \renewenvironment{abstract} is not correct. Any help or advice would be greatly appreciated.

MWE:

iccover.sty

%% Start of `iccover.sty`
\ProvidesPackage{iccover}[2017/10/28 Custom Cover Page]
\RequirePackage{etoolbox}
\RequirePackage[textwidth=20cm, textheight=27.5cm]{geometry}

%% Redefining \maketitle
\renewcommand{\maketitle}{%
   \textbf{CUSTOM FIRST PAGE, NOTHING ELSE SHOULD BE DISPLAYED HERE.}
   \null\vfil
   \newgeometry{textwidth=17cm,textheight=24cm}
\begin{titlepage}   
%% This is the standard title page of article.cls
   \let\footnotesize\small
   \let\footnoterule\relax
   \let \footnote \thanks
   \null\vfil
   \vskip 60\p@
   \begin{center}%
    {\LARGE \@title \par}%
    \vskip 3em%
    {\large
        \lineskip .75em%
        \begin{tabular}[t]{c}%
            \@author
        \end{tabular}\par}%
    \vskip 1.5em%
    {\large \@date \par}%       % Set date in \large size.
   \end{center}\par
\end{titlepage}%

\setcounter{footnote}{0}
}

\renewenvironment{abstract}{%
    \titlepage
    \null\vfil
    \begin{center}
        \bfseries \abstractname
    \end{center}}
%{\par\vfil\null\endtitlepage}

%% End of `iccover.sty`

sample.tex

\documentclass[12pt]{article}
\usepackage{iccover}
\usepackage{lipsum}

\author{Author}
\title{Some title}
\date{\today}

\begin{document}
\begin{abstract}
    \lipsum[1]
\end{abstract}
\maketitle

\section{Introduction}
\lipsum[3]
\end{document}
1

Perhaps this is what you're after.

You can define the \abstract{<abstract>} using a macro which is then set via \maketitle immediately after the regular title.

enter image description here

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents*}{iccover.sty}
%% Start of `iccover.sty`
\ProvidesPackage{iccover}[2017/10/28 Custom Cover Page]
\RequirePackage{etoolbox}
\RequirePackage[textwidth=20cm, textheight=27.5cm]{geometry}

%% Redefining \maketitle
\renewcommand{\maketitle}{%
  \textbf{CUSTOM FIRST PAGE, NOTHING ELSE SHOULD BE DISPLAYED HERE.}

  \newgeometry{textwidth=17cm,textheight=24cm}
  \begin{titlepage}   
  %% This is the standard title page of article.cls
    \let\footnotesize\small
    \let\footnoterule\relax
    \let \footnote \thanks
    \null\vfil
    \vskip 60\p@
    \begin{center}%
      {\LARGE \@title \par}%
      \vskip 3em%
      {\large
        \lineskip .75em%
        \begin{tabular}[t]{c}%
          \@author
        \end{tabular}\par}%
      \vskip 1.5em%
      {\large \@date \par}%       % Set date in \large size.
    \end{center}\par
    \csname @abstract\endcsname
  \end{titlepage}%

  \setcounter{footnote}{0}
}

\def\@abstract{}

\renewcommand{\abstract}[1]{%
  \long\def\@abstract{%
    \begin{center}
        \bfseries \abstractname
    \end{center}
    #1\par
    \vspace{\bigskipamount}
  }%
}

%% End of `iccover.sty`
\end{filecontents*}

\usepackage{iccover}
\usepackage{lipsum}

\author{Author}
\title{Some title}
\date{\today}
\abstract{\lipsum[1]}

\begin{document}

\maketitle

\section{A section}
\lipsum[2]

\end{document}
  • Very interesting and simple approach, thank you! I wanted to ask, if you are aware of any differences between the \abstract macro and the \begin{abstract}...\end{abstract} environment? – nikjohn Nov 8 '17 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.