jeslago / optidef

A Latex library for optimization problems
57 stars 3 forks source link

Extra alignment issue #23

Closed AndBerna closed 5 years ago

AndBerna commented 5 years ago

Hi,

when i am using the extra alignment feature the equation (number) jumps to the next line even though there is still enough space on the line.

I am using the constraint style 2 and the nocomma paramenter when importing the package.

Thanks for all

AndBerna commented 5 years ago

Example:

\addConstraint{q^{hp}_{t,n}}{=COPn p^{hp}{t,n}, \label{eq:base_HP_n_COP}}{\forall \ t \ \forall \ n}

AndBerna commented 5 years ago

Any update?

Thanks in advance

jeslago commented 5 years ago

Hi,

can you provide a full example? Does it only occur when using the extra alignment feature?

The numbering of the equations is managed by a third library (the subequations). In principle, this library moves the numbering down whenever the space between equation and number is small.

Can you provide an example so I can help you better?

AndBerna commented 5 years ago

Hi,

I made a quick solution it by adding a \vspace{} meanwhile.

I was working with the "long" format (mimize, subject to) but I had to change it to the short version. And I have just checked that the problem does not happen when I when working in such format.

I tried to change the format to the long style and now it doesnt have the problem there either . "Unfortunately" I am not able to reproduce it any more. =D

Maybe there was a package that was crashing.

Sorry for taking part of your time (dont know what happened)

Thanks =) =)