2

I have some rather long formulas that are not equations, and I would like LaTeX to break them automatically whenever necessary, preferably at the \vee symbol. I currently use the breqn package and the dmath environment, but that insists on breaking my lines on < and =, which is absolutely not what I want.

\begin{dmath}[number={$S_{1,19}$}] p_{19,a} < p_{1,a} \myvee p_{19,a} + p_{19,b} < p_{1,a} + p_{1,b} \myvee p_{19,a} = p_{1,a} \wedge p_{19,a} + p_{19,b} = p_{1,a} + p_{1,b}\end{dmath}

Can I get breqn to stop treating =, < and \leq as special symbols? Can I get it to treat \myvee like a = instead` If not, what other options are there?

I tried the compact option of breqn, but that still prefers = etc. to other breaking points, and, additionally, it makes the formula overlap with its own tag (i.e. the number I specify), which is unacceptable.

I don't mind inserting ‘you may break the line here’ marks, but I'd like to avoid inserting ‘hard’ breaks manually because I have a lot of these formulas.

2

breqn will break at all non hidden relation symbols.

\documentclass{article}
\usepackage{breqn}

\DeclareFlexSymbol{\mywedge}{Rel}{bin}{5E}
\DeclareFlexSymbol{\myvee}{Rel}{bin}{5F}

\begin{document}

\begin{dmath}[number={$S_{1,19}$}]
p_{19,a} \hiderel{<} p_{1,a}
\myvee
p_{19,a} + p_{19,b} \hiderel{<} p_{1,a} + p_{1,b}
\myvee
p_{19,a} \hiderel{=} p_{1,a} \hiderel{\mywedge} p_{19,a} + p_{19,b} \hiderel{=} p_{1,a} + p_{1,b}
\end{dmath}

\end{document}

enter image description here

  • Thanks, that was pretty much exactly what I was looking for! However, do you have any idea how I could get breqn to not align the \myvees in the next line, but just indent by a fixed amount? – Manuel Eberl Apr 21 '16 at 10:13
  • @ManuelEberl I don't know; I find breqn more difficult to manage than manual breaking – egreg Apr 21 '16 at 10:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.