# The output of formulas in the latex format with two columns style

I am writing a paper for a springier journal. The latex style of this journal is based on the two columns format.

I have some equations in my paper and I want to write these equations in paragraphs in the style $equation$ and not in an independent line by applying command $$equation$$.

My problem is that in some cases, equations do not split in a line and continue its rest in the next line.

For example, consider the following code

\documentclass[pdftex,twocolumn,epjc3]{svjour3}
\begin{document}

Therefore, we conclude that
$Reg_i=h(h(ID_i \|R_i \| HPW_i ) \bmod m), A_i=R_i\oplus HPW_i, B_i=h(ID_i \|R_i \|K), C_i=B_i\oplus h(ID_i\oplus R_i\oplus HPW_i)$,
which results in our conditions are satisfied by the assumptions and hence
we can continue other steps.

\end{document}


The output of the mentioned code is in the following form

Thanks for any suggestions.

Edition: Although when we run the code with following form

 \documentclass[twocolumn]{article}


the mentioned problem is solved, while we apply the next command

\documentclass[pdftex,twocolumn,epjc3]{svjour3}


we get the following output

I think the command \linebreak[0] dose not work over svjour3.cls.

• don't change the textwidth or add \fussy to the journal class! that would invalidate the article for journal use. I was just using article and made those settings to approximate the same column width. \linebreak will work but you may need it in slighltly different places. You can use \linebreak rather than \linebreak[0] to force a linebreak rather than suggest it – David Carlisle Jan 23 '19 at 20:10
• @DavidCarlisle You right, It works. Really really Thanks. You are man of Tex. – Amin235 Jan 23 '19 at 20:12
• If it takes more than one line, use display math. – John Kormylo Jan 24 '19 at 4:57

\documentclass[twocolumn]{article}
\fussy
\begin{document}

Therefore, we conclude that
$Reg_i=h(h(ID_i \|R_i \| HPW_i ) \bmod m), A_i=R_i\oplus HPW_i, B_i=h(ID_i \|R_i \|K), C_i=B_i\oplus h(ID_i\oplus R_i\oplus HPW_i)$,
which results in our conditions are satisfied by the assumptions and hence
we can continue other steps.

Therefore, we conclude that
$\mathrm{Reg}% never math italic for multi-letter names _i=h(h(ID_i \|R_i \|\linebreak[0] HPW_i ) \bmod m), A_i=R_i\oplus HPW_i, B_i=h(ID_i \|R_i \|K),\linebreak[0] C_i=B_i\oplus h(ID_i\oplus R_i\oplus HPW_i)$,
which results in our conditions are satisfied by the assumptions and hence
we can continue other steps.

\end{document}

• the preamble settings just to approximate the journal class (looking at your output image) as I don't have it – David Carlisle Jan 23 '19 at 20:07
• I appreciate you taking the time to answer my questions. I edited the question and explain the next problem. Thanks again for your useful answer. – Amin235 Jan 23 '19 at 20:08