Page Layoutachemso | Abstract Formátting in a two-columned Document

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
bhamla
Posts: 2
Joined: Mon May 28, 2012 10:46 pm

achemso | Abstract Formátting in a two-columned Document

Post by bhamla »

Hello all,

I'm trying to create a two-columm layout using the achemso package. When I use the following code,

Code: Select all

\documentclass[journal=jacsat,manuscript=communication,layout=twocolumn]{achemso}
I get a two column layout but that makes the abstract one column as well. To fix that, I used the following code:

Code: Select all

begin{document}

\twocolumn[
\begin{onecolabstract}
%abstract text here%
\end{onecolabstract}
]
This indeed fixes the abstract and I see a one-column abstract. But this creates a new problem - I have the title and authors on one page and then the abstract and body on a new page. I can't figure out how to keep the title and abstract on the same page and suppress the new page command.

A little digging around shows me that this happens due to this piece of code in the achemso.dtx file.
I'm not very sure about this...

Code: Select all

\begin{macro}{\acs@tocentry@print}
%\begin{macro}{\acs@tocentry@text}
% The same approach is taken for the graphical table of content 
% printing. This is done in a box so that everything has a frame around
% it.
%    \begin{macrocode}
\newcommand\acs@tocentry@print[1]{%
  \global\long\def\acs@tocentry@text
    {%
      \if@twocolumn
        \@restonecoltrue\onecolumn
      \else
        \@restonecolfalse\newpage
      \fi
      \acs@section*{\tocentryname}%
      \tocsize
      \sffamily
      \singlespacing
      \begin{center}
        \fbox
          {%
            \begin{minipage}{\acs@tocentry@height}
              \vbox to \acs@tocentry@width{#1}%
            \end{minipage}%
          }%
      \end{center}%
      \if@restonecol
        \twocolumn
      \else 
        \newpage 
      \fi
    }%
  \AtEndDocument{\acs@tocentry@text}%
}
Could someone help me fix this new page issue with achemso?
Thanks.
Last edited by localghost on Tue May 29, 2012 9:50 am, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

achemso | Abstract Formátting in a two-columned Document

Post by cgnieder »

How about the multicol package:

Code: Select all

\documentclass{achemso}
\usepackage{multicol}
\usepackage{lipsum} % for dummy text

\author{Andrew N. Other}
\email{i.k.groupleader@unknown.uu}
\phone{+123 (0)123 4445556}
\fax{+123 (0)123 4445557}
\affiliation[Unknown University]{Department of Chemistry, Unknown University, Unknown Town}
\title[An \textsf{achemso} demo]
  {A demonstration of the \textsf{achemso} \LaTeX\ class}
   
\begin{document}
\maketitle
\begin{abstract}
 \lipsum[2]
\end{abstract}

\begin{multicols}{2}
\section{Introduction}
\lipsum[1-5]
\end{multicols}

\end{document}
Regards
site moderator & package author
bhamla
Posts: 2
Joined: Mon May 28, 2012 10:46 pm

Re: achemso | Abstract Formátting in a two-columned Document

Post by bhamla »

Thanks.
That works.
Post Reply