I've needed to put some long equations into a two-column paper recently. I found that Anjishnu Sarkar (http://www.iopb.res.in/~anjishnu/) posted widetext.sty , an implementation of the environment from REVTeX4, which nicely places a page-wide column at the point you specify. Great. It also places nice lines either side of the text to guide the reader through the flow of the text.
However, these lines are pointless and confusing if the environment falls at the top/bottom of a page (the lines get pushed to the previous/next page). So I wonder if there is a way of conditionally placing the lines according to whether the text is NOT at the top/bottom of the page? See the code below (obviously you don't want to place the top line if the text is at the top of the page and vice versa).
Code: Select all
%[snip]
\if@twocolumn
\newenvironment{widetext}
{%
\begin{strip}
% ------ conditionally do this bit ------
\rule{\dimexpr(0.5\textwidth-0.5\columnsep-0.4pt)}{0.4pt}%
\rule{0.4pt}{6pt}
% ---------------------------------------
\par %\vspace{6pt}
\parindent \@parindent
}%
{%
\par
% ------ conditionally do this bit ------
\hfill\rule[-6pt]{0.4pt}{6.4pt}%
\rule{\dimexpr(0.5\textwidth-0.5\columnsep-1pt)}{0.4pt}
% ---------------------------------------
\end{strip}
}
\else
\newenvironment{widetext}{}{}
\fi
Thanks!
Chris