2

A weird alignment issue:


\documentclass[fleqn,twocolumn]{article}
\usepackage[short,nocomma]{optidef}
\DeclarePairedDelimiter\abs{\lvert}{\rvert} % abs

\begin{document}

\begin{mini!} { b } { 1 }{}{} \addConstraint{ \abs{s} \le \sum_{ (i, j) \in \tilde{\gamma}c } b{ij} }{ \le \mu \ , \quad }{ \forall c \in \bar{\mathcal{C}}_\text{inner} } \end{mini!}

\end{document}

Zohar Levi
  • 1,237

1 Answers1

3

The columns simply aren't wide enough to express the constraint expansively. Thus, do switch to a more compact display form.

enter image description here

\documentclass[fleqn,twocolumn]{article}
\usepackage[short,nocomma]{optidef}
\DeclarePairedDelimiter\abs{\lvert}{\rvert} % abs
\usepackage{lipsum}

\begin{document} \hrule\smallskip\noindent before: \begin{mini!} { b } { 1}{}{} \addConstraint% { \abs{s} \le \sum_{ (i, j) \in \tilde{\gamma}c } b{ij} } { \le \mu \ , \quad } { \forall c \in \bar{\mathcal{C}}_\text{inner} } \end{mini!}

\hrule\smallskip\noindent after: \begin{mini!} { b } { 1 }{}{} \addConstraint% { \abs{s} \le \sum_{\mathclap{ (i, j) \in \tilde{\gamma}c }} b{ij} \le \mu \quad \forall\ c \in \bar{\mathcal{C}}_{\textrm{inner}} }{}{}{} \end{mini!}

\hrule\smallskip \lipsum

\end{document}

Mico
  • 506,678
  • Why does removing the fleqn fix it? – Zohar Levi Sep 15 '23 at 15:48
  • @ZoharLevi - I'm afraid I don't understand your question. Given that my code example starts with \documentclass[fleqn,twocolumn]{article}, how can it be said that I removed the fleqn option? – Mico Sep 15 '23 at 16:08
  • @ZoharLevi - If you're asking a question about why the designer(s) of the optidef package made various design choices, I'm sadly in no position to answer your question. I'm not the designer or maintainer of the package, and I have zero knowledge of why, or why not, various design choices were made. – Mico Sep 15 '23 at 16:14
  • Sorry, let me clarify. You said that the column width can't accommodate such an expansive constraint. I assume by expensive you mean long. However, if I remove the fleqn option, then everything (my original code) looks fine. fleqn only aligns the eq to the left, which implies that it's not necessarily a space issue. – Zohar Levi Sep 15 '23 at 16:24
  • @ZoharLevi - If you're fine with not imposing the fleqn document class option, that's naturally fine by me too. (Why wouldn't it be fine, right?!) As you didn't indicate in your query that the fleqn option might be ignored, omitting the option was not something that occurred to me as something to be investigated. You also asked, specifically, "Why does removing the fleqn fix it?" [emphasis added] As to why the creator(s) of the package made certain choices (and/or possibly errors...), I'm simply in no position to address that question. – Mico Sep 15 '23 at 16:31
  • I want the fleqn, but I'm just trying to debug the issue. Are you saying that it's not a bug, but intentionally (designer choice) the optidef package decides that if there's an fleqn, then equations are set to be in a longer format, which messes my code? – Zohar Levi Sep 15 '23 at 16:48
  • @ZoharLevi - You asked me, why does omitting a document class option affect the package's behavior in such a major way? I can only repeat myself: I don't know the package's designer, and I have no knowledge of his/her design choices. I'm definitely in no position to answer questions as to why he/she made various design choices, and I have no knowledge regarding whether or not they were aware that setting or omitting the fleqn option would have a rather large effect. May I suggest you contact the passage's author/maintainer to ask your why-type questions? – Mico Sep 15 '23 at 17:24