8

In a two column latex document, I use widetext environment which results in a line above and below the widetext. This is to guide the reader from the two column to the widetext but I want to get rid of it. How can I do it?

I tried using \onecolumngrid but this retained the line (it now stretches across both columns). Clearly, the lines can be manipulated, now I want to remove them.

MWE here.

\documentclass[aps,prl,twocolumn,balance,superscriptaddress,floats,showpacs,a4paper]{revtex4}
\usepackage{latexsym}
\usepackage{dcolumn}
\usepackage{amsmath}
\usepackage{epsf}
\usepackage{float}
\usepackage{hyperref}

\begin{document}

Blah blah, blah blah blah blah

\begin{widetext}
Yada Yada Yada
\end{widetext}

Blah blah blah

\end{document}

2 Answers 2

5

You can just copy the definition and comment out the offending bits:

\documentclass[aps,prl,twocolumn,balance,superscriptaddress,floats,showpacs,a4paper]{revtex4}
\usepackage{latexsym}
\usepackage{dcolumn}
\usepackage{amsmath}
\usepackage{epsf}
\usepackage{float}
\usepackage{hyperref}
\makeatletter

\renewenvironment{widetext@grid}{%
  \par\ignorespaces
  \setbox\widetext@top\vbox{%
   \vskip15\p@
   \hb@xt@\hsize{%
    \leaders\hrule\hfil
    \vrule\@height6\p@
   }%
   \vskip6\p@
  }%
  \setbox\widetext@bot\hb@xt@\hsize{%
    \vrule\@depth6\p@
    \leaders\hrule\hfil
  }%
  \onecolumngrid
%  \dimen@\ht\widetext@top\advance\dimen@\dp\widetext@top
%  \cleaders\box\widetext@top\vskip\dimen@
  \let\set@footnotewidth\set@footnotewidth@ii
}{%
  \par
%  \setbox\widetext@bot\vbox{%
%   \hb@xt@\hsize{\hfil\box\widetext@bot}%
%   \vskip14\p@
%  }%
%  \dimen@\ht\widetext@bot\advance\dimen@\dp\widetext@bot
%  \cleaders\box\widetext@bot\vskip\dimen@
  \twocolumngrid\global\@ignoretrue
  \@endpetrue
}%

\makeatother

\begin{document}

Blah blah, blah blah blah blah

\begin{widetext}
Yada Yada Yada Yada Yada Yada Yada Yada Yada Yada Yada Yada
\end{widetext}

Blah blah blah

\end{document}
3
  • It worked well but can I ask how one should do it for only one instance while leaving all other instances of widetext with the lines? I'm guessing I should define a new "widetextwithoutlines" environment but keep the regular widetext too. Thanks! Commented Jan 13, 2014 at 11:31
  • you could or if it is just one you could move that redefinition into the document body {\makeatletter\renwcommand....\makeatother \begin{widetext}....\end{widetext}} Commented Jan 13, 2014 at 12:07
  • That didn't work, maybe you could clarify what exactly I should do. I copied {\makeatletter\renewcommand\renewenvironment{widetext@grid}...\makeatother\begin{widetext}..\end{widetext} I also tried {\makeatletter\renewcommand{widetext@grid}...\makeatother\begin{widetext}..\end{widetext} which didn't work. Thank you. Commented Jan 14, 2014 at 7:26
2

You can try to use \onecolumngrid for that:

\documentclass[twocolumn]{revtex4}

\usepackage{lipsum}

\begin{document}

\lipsum[1-3]

\onecolumngrid
\vspace{\columnsep}
\lipsum[5-6]
\vspace{\columnsep}
\twocolumngrid

\lipsum[7-9]

\end{document}

gives:

enter image description here

You must log in to answer this question.

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