Hello all!
I need to prepare a document for a journal and I'm using the twocolumn option in the article class. Now I have a horrible equation that makes use of the cases environment so it's hard to split up to make it fit into one column. I do not want to use the figure* environment because I have no control over where to put the equation.
What I want to do is to use the widetext package and make sure that this equation looks something like it would like when one uses revtex4. However, when compiling my document I get an error, namely "improper \prevdepth". Does anyone have a clue what I have to do here?
A minimum working example (using the actual formula)
\documentclass[twocolumn]{article}
\usepackage{widetext}
\usepackage{flushend}
\usepackage{cuted}
\begin{document}
a lot of text ...
Here
\begin{widetext}
\begin{eqnarray} \label{e27}
T_{nn''}^{mm''}=({-}1)^{p-p''}\,\dil_0^{\infty}\,J_{m-m''}(au)\,J_{n''}(bu)\,J_{n+1}(u)\,du~=
\begin{cases}
& \dfrac{(q{+}p'')!\,(p{-}p'')!}{(q{-}q'')!\,(p{+}q'')!}\,a^{m-m''}b^{n''}\,P_{p-p''}^{(m-m'',n'')}(1{-}2A^2)P_{p-p''}^{(m-m'',n'')}(2B^2{-}1)~~~ \\ & \text{when}~~~n-n''\geq m-m''\geq0~,\\
\\
& \dfrac{(p{+}q'')!\,(q{-}q'')!}{(p{-}p'')!\,(q{+}p'')!}\,a^{m''-m}b^{n''}\,P_{q-q''}^{(m''-m,n'')}(1{-}2A^2)\,P_{q-q''}^{(m''-m,n'')}(2B^2{-}1)~~~ \\ & \text{when}~~~ n-n''\geq m''-m\geq0~, \\
\\
&0 ~~~ \text{otherwise}.
\end{cases}
\end{eqnarray}
\end{widetext}
a lot more text....
\end{document}
Any help would be greatly appreciated!
Text Formatting ⇒ Problems using widetext.sty
NEW: TikZ book now 40% off at Amazon.com for a short time.

- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Problems using widetext.sty
This is not a minimum example since it is not compilable as provided [1]. And you should not use the eqnarray environment any more [2].TimothyLucas wrote:[…] A minimum working example […]
The error already occurs when trying to use the widetext environment even without any content. I suggest to contact the package maintainer and ask for help. Feel free to report new insights here after you got a reply.
[1] View topic: Avoidable mistakes
[2] The PracTeX Journal — TeX Users Group, Lars Madsen: Avoid eqnarray!
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
-
- Posts: 2
- Joined: Sat Apr 16, 2011 5:06 pm
Problems using widetext.sty
Okay, well thanks for pointing that out with the eqnarray, definetely looks much better with align and other tricks.
As for the error, I've mailed the author and I'll be awaiting his reply. But in the meantime; is there no one who has found a solution for using a page wide equation in a two column document without using revtex? It would seem that this is a pretty common thing and therefore I find it strange that it is so hard to find a solution for this. Does anyone have a solution for this?
Edit:
And one thing I have found, is that it does work when placing it at the very beginning of a section, now I am not an expert on Tex or Latex, but it does seem rather strange that it works like this, so a (rather ugly, but you won't see it in the text) work around for this is to put a \section*{{}} on the top of your equation and instruct Latex to use negative \vspace for it, so as I have it now;
Don't trust the preamble exactly, I am a little bit in a hurry here...
As for the error, I've mailed the author and I'll be awaiting his reply. But in the meantime; is there no one who has found a solution for using a page wide equation in a two column document without using revtex? It would seem that this is a pretty common thing and therefore I find it strange that it is so hard to find a solution for this. Does anyone have a solution for this?
Edit:
And one thing I have found, is that it does work when placing it at the very beginning of a section, now I am not an expert on Tex or Latex, but it does seem rather strange that it works like this, so a (rather ugly, but you won't see it in the text) work around for this is to put a \section*{{}} on the top of your equation and instruct Latex to use negative \vspace for it, so as I have it now;
Don't trust the preamble exactly, I am a little bit in a hurry here...
Code: Select all
\document[twocolumn]{article}
\usepackage{widetext}
\begin{document}
blablablabla
\vspace{-21mm}
\section*{{}}
\begin{widetext}
\begin{equation} \label{e27}
\begin{split}
T_{nn''}^{mm''}=&({-}1)^{p-p''}\,\dil_0^{\infty}\,J_{m-m''}(au)\,J_{n''}(bu)\,J_{n+1}(u)\,du~= \\ =&
\begin{cases}
& \dfrac{(q{+}p'')!\,(p{-}p'')!}{(q{-}q'')!\,(p{+}q'')!}\,a^{m-m''}b^{n''}\,P_{p-p''}^{(m-m'',n'')}(1{-}2A^2)P_{p-p''}^{(m-m'',n'')}(2B^2{-}1)~~~ \\ & \text{when}~~~n-n''\geq m-m''\geq0~,\\
\\
& \dfrac{(p{+}q'')!\,(q{-}q'')!}{(p{-}p'')!\,(q{+}p'')!}\,a^{m''-m}b^{n''}\,P_{q-q''}^{(m''-m,n'')}(1{-}2A^2)\,P_{q-q''}^{(m''-m,n'')}(2B^2{-}1)~~~ \\ & \text{when}~~~ n-n''\geq m''-m\geq0~, \\
\\
&0 ~~~ \text{otherwise}.
\end{cases}
\end{split}
\end{equation}
\end{widetext}
more bla bla bla...