2

I'm trying to modify the abstract style of a revtex 4.1 document and am running into problems. I'm just using the revtex-4.1 style file for a personal project (i.e. not worried about submitting to a journal or similar). So far if I try to use \renewenvironment{abstract} as in the first answer to this question:

How to adjust the width of abstract?

the abstract is formatted how I want, except it appears below the title when I compile. A minimal example using \renewenvironment:

\documentclass[10pt,a4paper,aps,pra,twocolumn,superscriptaddress]{revtex4-1}
\usepackage{lipsum}

\renewenvironment{abstract}
{\onecolumngrid
    \list{}{%
        \setlength{\leftmargin}{.5in}% 
        \setlength{\rightmargin}{\leftmargin}%
        }%
        \item\relax}
        {\endlist}

\begin{document}
\title{Some title}
\author{Some vagrant}
\affiliation{Some box}

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

\lipsum[2]
\end{document}

Thanks!

1 Answers1

2

You can hook into the parameters used by revtex4-1:

\documentclass[10pt,a4paper,aps,pra,twocolumn,superscriptaddress]{revtex4-1}

\usepackage{lipsum}

\makeatletter
\renewcommand\frontmatter@abstractwidth{\dimexpr\textwidth-1in\relax}
\makeatother

\begin{document}
\title{Some title}
\author{Some vagrant}
\affiliation{Some box}

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

\lipsum[2]
\end{document}

The macro \frontmatter@abstractwidth is set by the journal options, so you can override it; the abstract is typeset in a box as wide as stated by \frontmatter@abstractwidth and horizontally centered on the page.

enter image description here

egreg
  • 1,121,712
  • Thanks for the code and the explanation, this worked perfectly! – Kevin Lyons Jun 05 '15 at 18:33
  • I noticed after the fact this solution appears to have a side effect - in my table of contents sections have been demoted to subsections and subsections to subsubsections. Is there some way around that? – Kevin Lyons Jun 05 '15 at 19:53
  • @KevinL I see no difference in the table of contents with and without the code about the abstract. – egreg Jun 05 '15 at 20:00
  • You're right, it doesn't change the table of contents in the minimal example, but it is in my actual document for some reason. I will have to see if I can figure out what the difference is between the two. Thanks again! – Kevin Lyons Jun 05 '15 at 20:27