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}

1 Answer 1

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}
7
  • Why does removing the fleqn fix it?
    – Zohar Levi
    Sep 15, 2023 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, 2023 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, 2023 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, 2023 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, 2023 at 16:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .