0

How can you change the appearance of a TeX template? E.g. The AAS journal template. I don't like having the abstract on the front page and don't manage to force it on another page with \newpage.

12
  • 5
    Why do you want to change a journal template? Change the very basic template article available on your system. – Johannes_B Jan 10 '15 at 13:40
  • 1
    The templates are provided by journal publishers (and copyrighted, most probably) Changing their template will lead to a rejection of a 'manuscript' ;-) – user31729 Jan 10 '15 at 13:49
  • 2
    It's not nearly enough to say "I don't like having the abstract on the front page". You need to tell us: Where on the following page should it be? How wide, how much vertical offset to the subsequent material, which font (and which font weight), etc... – Mico Jan 10 '15 at 13:50
  • 2
    do you want it for writing stuff for your own amusement? or is it for submitting a paper, or the like — in which case, just don't! – wasteofspace Jan 10 '15 at 14:00
  • 2
    However, it is almost certainly better to start from a standard class - or another general-use class such as KOMA or memoir or whatever. – cfr Jan 11 '15 at 0:32
1

DISCLAIMER: The following solution is merely for academic purposes. Is is not recommended to fiddle with journal classes.

The Journal editors decide how papers in their journal should look like. Any changes by submittors will be reverted in the publishing process or the paper will be rejected at all. Changing the visual appearance of styles for preprints is very strange in my point of view.

Now, what is going on? The abstract environment that simply prints some text in the standard classes (and memoir and KOMA-script) does something different, it saves the whole abstract in a box. \maketitle later calls the abstract back; a helper macro is called that does some stuff and calls back the abstract box.

One needs to prevent \maketitle from calling the helper macro, which will be different in other modes. Later one can reuse the helper macro. The recurring use of \makeatletter and \makeatother reveals that something is going on. Remember what the combo of the two means: Be careful, you are fiddling with stuff you shouldn't fiddle with!

Clemens suggested to define a new macro \makeabstract to use the box. Saves the catcode change in the document.

\documentclass[12pt,preprint
]{aastex}
\usepackage{blindtext}
\usepackage{etoolbox}
\tracingpatches
\makeatletter
\patchcmd{\@abstract@pptt}{\vspace{3em}}{\clearpage}{}{}
\patchcmd{\@maketitle}{\@abstract}{}{}{}
\newcommand*\makeabstract{\@abstract@pptt}
\makeatother
\title{Thesis title}
\keywords{keywords title}
\author{Hans Muster}
\affil{behind the Moon}
\altaffiltext{1}{\email{hans.muster@uni.somewhere}}
\begin{abstract} \blindtext \end{abstract}

\begin{document}
~%\tableofcontents
\makeabstract
\section{Introduction}
\end{document}
7
  • With etoolbox I would use \csuse{@abstract@pptt} :P – Manuel Jan 13 '15 at 22:29
  • Iĺl have a look at this tomorrow. But thanks :-) – Johannes_B Jan 13 '15 at 22:29
  • I mean in the document body, so no catcode change happens. – Manuel Jan 13 '15 at 22:44
  • @Manuel or \csname @abstract@pptt\endcsname (or even \csname@abstract@pptt\endcsname since @ isn't a letter). Works with and without etoolbox :) – cgnieder Jan 13 '15 at 22:58
  • 2
    @Manuel I'd do something different, actually: after the patching define \newcommand*\makeabstract{\@abstract@pptt} and use that macro instead in the document body – cgnieder Jan 13 '15 at 23:01

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.