`widetext` doesn’t play nicely with the `osa-article` documentclass; are there alternatives

document-classesenvironments

I'm writing a manuscript for publication in one of Optica's journals, so I'm required to use the osa-article documentclass. I have a very long equation which can't be broken up into several lines. I've tried using the widetext and split environments. My problem is that I like the rules added by widetext (gasp!) but only split works as expected. (Edit: split doesn't work with osa-article either.)

Here are two MWEs using widetext, one using revtex4-1 and one using osa-article, with screenshots of the output:

RevTeX:

\documentclass[reprint]{revtex4-1}

\usepackage{dcolumn}
\usepackage{lipsum}

\begin{document}

\lipsum[1-5]

\begin{widetext}
\begin{equation}
\sum_{n=1}^{20}n=1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20=210.
\end{equation}
\end{widetext}

\lipsum[1-2]

\end{document}

enter image description here

OSA-Article:

\documentclass{osa-article}
\journal{osajournal}

\usepackage{widetext}
\usepackage{lipsum}

\begin{document}
\twocolumn

\lipsum[1-5]

\begin{widetext}
\begin{equation}
\sum_{n=1}^{20}n=1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20=210.
\end{equation}
\end{widetext}

\lipsum[1-2]

\end{document}

enter image description here

(Compilation using osa-article requires a bunch of additional files which can be found on Optica's website. I don't know whether I'm legally allowed to share them here, and I'm too lazy to go looking. It also requires the widetext.sty document to be downloaded and placed in the same folder as the TeX file.)

I've tried this solution (the second one), which didn't work for me; all it did was add a rule under the equation, but otherwise it still looks like the screenshot above.

The revtex4-1 output is what I'd like to have. Is there a workaround?

Best Answer

Maybe using cuted package instead of widetext would help. You can add rules manually if you like.

\documentclass{osa-article}
\journal{osajournal}

\usepackage{cuted}
\usepackage{lipsum}

\begin{document}
\twocolumn

\lipsum[1-2]

\begin{strip}
    \rule{\dimexpr(0.5\textwidth-0.5\columnsep-0.4pt)}{0.4pt}%
    \begin{equation}
        \sum_{n=1}^{20}n=1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20=210.
    \end{equation}
    \par
    \hfill
    \rule[0.5\baselineskip]{\dimexpr(0.5\textwidth-0.5\columnsep-1pt)}{0.4pt}
\end{strip}
          
\lipsum[1-2]

\end{document}