8

I'm making a two-column document, but I need a one-column abstract. The code:

\twocolumn[
\begin{@twocolumnfalse}
\maketitle
\begin{abstract}
...
\end{abstract}
\end{@twocolumnfalse}
]

doesn't work, because the abstract is longer enough to use two pages and page don't break. I also tried making a one-column document and used the multicol environment only for the document "text" (not the abstract), but then i had problems with the figure environment.

So, how can I make a one-column abstract?

6
  • Is there any text environment with automatic page break? If that doesn't exist, can I write it?
    – Agustin
    Sep 28, 2012 at 0:00
  • 1
    That's not the best way of using the concept of Abstract if it is more than one page. I would go with Summary or something similar.
    – percusse
    Sep 28, 2012 at 0:04
  • actualy the abstract is not that long, but with the title, the abstract needs to be splited into 2 pages.
    – Agustin
    Sep 28, 2012 at 1:12
  • 1
    i'm not sure this is a duplicate. although it's not an ideal situation, this abstract must break to a second page. so the approach taken depends (1) on the document class that is/must be used, and (2) whether or not there will be footnotes in the remainder of the document -- the suggested multicol in one answer to the question cited by @PeterGrill will place footnotes across the whole page, not in the column from which the footnote is called. Sep 28, 2012 at 12:28
  • How can I tell whoever closed this post that this post is not a duplicate, since I say that the code in the other post doesn't work for me? Thanks
    – Agustin
    Sep 28, 2012 at 17:51

2 Answers 2

6

You can copy the following code as a file long2.sty, place it in your document folder, and then use it as shown below:

%%
%% This is file `long2.sty'.
%%
%% Author: Tomas "tohecz" Hejda <[email protected]>
%%
%% Licenced under LaTeX-Project Public License version 1.3 or newer.
%% 
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{long2}[2012/08/19 v0.1 long2: breakable one-column preamble in a two-column document]

\newlength\longtwo@top
\newlength\longtwo@bottom

\newsavebox\longtwo@box
\def\longtwo@repeat{%
    \longtwo@column[{\@twocolumnfalse
    \ifdim\ht\longtwo@box>1.00\textheight%1
      \begingroup
      \vbadness10000
      \setbox0\vsplit\longtwo@box to 1.00\textheight%1
      \setbox1\vbox{\unvbox\longtwo@box}
      \global\setbox\longtwo@box\vbox{\unvbox1}
      \setbox2\vbox to \textheight{%
        \unvbox0
      }
      \ht2=0.9\textheight
      \box2
      \endgroup
    \else
      \ifdim\ht\longtwo@box>0.84\textheight
        \global\let\longtwo@repeat\clearpage
      \else
        \global\let\longtwo@repeat\relax
      \fi
      \unvbox\longtwo@box
      \vspace{15pt plus 15pt}
    \fi
    }]%
  \longtwo@repeat
}

\long\def\longtwo@[#1]{%
  \begingroup
    \let\longtwo@column\twocolumn
    \let\longtwo@mkttl\maketitle
    \def\maketitle{
      \begingroup
      \let\newpage\relax
      \longtwo@mkttl
      \endgroup
    }
    \longtwo@column[{\@twocolumnfalse
    \global\setbox\longtwo@box\vbox{#1}%
    \ifdim\ht\longtwo@box>\textheight
      \begingroup
      \vbadness10000
      \setbox0\vsplit\longtwo@box to 1.00\textheight%1
      \setbox1\vbox{\unvbox\longtwo@box}%
      \global\setbox\longtwo@box\vbox{\unvbox1}%
      \setbox2\vbox to \textheight{%
        \unvbox0
      }
      \ht2=0.9\textheight
      \box2
      \endgroup
    \else
      \ifdim\ht\longtwo@box>0.87\textheight
        \global\let\longtwo@repeat\clearpage
      \else
        \global\let\longtwo@repeat\relax
      \fi
      \unvbox\longtwo@box
    \fi
    }]%
    \longtwo@repeat
  \endgroup
}

\def\longtwocolumn{\@ifnextchar[\longtwo@\twocolumn}

\endinput
%%
%% End of file `long2.sty'.
%%

The document can then look like this (package lipsum and command \lipsum[x-y] are only used to produce some dummy text):

\documentclass[twocolumn]{article}

\usepackage{long2}
\usepackage{lipsum}
\parskip0pt plus 8pt

\title{My title}
\author{My the first}

\begin{document}

\longtwocolumn[{
\maketitle
\begin{abstract}
\lipsum[1-8]
\end{abstract}
\lipsum[9-15]
}]

\lipsum[16-25]

\end{document}

PS: I'm considering making it a package (after I add some features), that's why I posted a complete package file ;)

PPS: Brief introduction of the idea: We store the whole one-column part in a box, then we check whether the box is larger than a page. If yes, we \vsplit it, output the first part, and call \longtwo@repeat on the rest, which does the same again.

6
  • Too complex, I don't get it... and I can't make it work.
    – Agustin
    Sep 28, 2012 at 22:43
  • Well, what does it mean "can't make it work"? If you save the first code as long2.sty and the second one as test.tex, it does not compile? And yes, it is complex, because you are asking for a complicated thing.
    – yo'
    Sep 29, 2012 at 7:27
  • @Agustin: For an initial test, place the long2.sty in the same directory where you have the example above and try. If it does not work, please detail the result and provide the error message you get. Sep 29, 2012 at 8:05
  • It worked very good. It makes some vspaces to print diferent, but nothing I can not fix. Thanks a lot!!!
    – Agustin
    Sep 29, 2012 at 13:17
  • Where did you leaned all that? If it is a book, which one? I wanna learn too but i dont find any book or manual.
    – Agustin
    Sep 29, 2012 at 13:23
4

New solution, use \afterpage to insert the twocolumn switch after the page break, butting the end of the abstract into its optional argument.

enter image description here

\documentclass{article}
\usepackage{afterpage}
\let\xaddboxcontents\addboxcontents
\def\zzz#1\end#2{\end{abstract}\twocolumn[\unvbox\csname AP@partial\endcsname\par\small\quotation#1\endquotation]}
\def\addboxcontents#1{\aftergroup\zzz}
\author{me}
\date{today}
\title{test}
\def\b{abstract stuff }\def\c{\b\b\b. }\def\d{One \c. Two three \c. Four five six\c\c.\par}\def\e{\d\d\d\d\d}

\begin{document}
\maketitle
\afterpage{\clearpage}
\begin{abstract}
\e\e\e\e
\end{abstract}


\def\b{main body text }
\e\e\e\e\e

\end{document}

Original (simpler!) solution:

Switch to one column for the title and abstract then back to two

enter image description here

\documentclass{article}

\author{me}
\date{today}
\title{test}
\def\b{abstract stuff }\def\c{\b\b\b. }\def\d{One \c. Two three \c. Four five six\c\c.\par}\def\e{\d\d\d\d\d}

\begin{document}
\maketitle
\begin{abstract}
\e\e\e\e
\end{abstract}
\twocolumn

\def\b{main body text }
\e\e\e\e\e

\end{document}
3
  • Yeah, that works great, but it start a new page and I'm not supposed to do that, actualy I can't do it because it is for a job. Is there any option that tells the \twocolumn command not to start a new page? Thanks
    – Agustin
    Sep 28, 2012 at 17:48
  • No the standard two column system requires a page break. multicol does not, but as you noted in the question that has other restrictions. you may be able to use afterpage, I'll have a think Sep 28, 2012 at 19:02
  • afterpage version added Sep 28, 2012 at 19:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .