1

I would like to display these equations in an alignment:

\begin{align}
%\setlength{\jot}{20pt}
V_\text{SET} &= min \Bigg( \frac{dV}{dI} \Bigg) &\text{for } V<0 \\[1em]
I_\text{SET} &= I(argmin \Bigg( \frac{dV}{dI} \Bigg) -3 ) &\text{for } V<0\\[1em]
V_\text{RESET} &= V(arg(grad(smooth(I)) \leqslant 0)(0)) &\text{for } V>0\\[1em]
I_\text{RESET} &= I(arg(grad(smooth(I)) \leqslant 0)(0)) &\text{for } V>0\\[1em]
V_\text{SET,stop} &= min(V) \\[1em]
V_\text{RESET,stop} &= max(V) \\[1em]
I_\text{cc} &= min(I) \\[1em]
Lin &= I(V=\pm 0.4)/I(V=\pm 0.2)
\end{align}

I already tried setting the length of jot and using [1em]. However due to the fractions the spacing between the lines is not equal and I can not get it to be equal. This is what it looks like now:

enter image description here

Also due to [1em] the equations are now longer than the page and are over the page number, as you can see on the right bottom (13). I am relatively new to Latex so I hope this not very obvious. Any help is appreciated. Thanks so much in advance :)

Nils
  • 155
  • 5
  • 1
    To allow page breaks in a multi-line display math environment provided by the amsmath package, insert \allowdisplaybreaks before the align environment in question. – Mico Aug 17 '20 at 09:12
  • @campa - This query is not a duplicate of the earlier posting you provided a link to. The accepted & most-upvoted answer of the earlier posting recommended inserted tall typographic struts (constructed with \vphantom directives) in the rows that don't natively contain "tall" material. For the case at hand, this approach would create a rather suboptimal outcome. As I argue in my answer, it would be much better to use \smash[b] and \smash directives in the first two rows than it is to make the remaining six rows gratuitously and unnecessarily tall via \vphantom directives. – Mico Aug 17 '20 at 09:36
  • @Mico Uhm, I trust your judgment, but while I agree that the answers in the linked question are sub-optimal for the present case, the question title is basically the same... – campa Aug 17 '20 at 09:42

1 Answers1

2

In the case of your equations, it suffices to change \Bigg to \Big and to \smash the expressions involving tall parentheses in order to get a more compact display in the vertical dimension. With this change, one can dispense with the [1em] spacing directives. To get more compactness in the horizontal dimension as well, it's a good idea to employ an alignat environment rather than an align environment.

A separate comment: the terms "max", "min", "arg" etc are math operators; to typeset them using an upright font face, input them as \max, \min, \arg, etc.

enter image description here

\documentclass{article}
\usepackage{amsmath,amssymb,array}
\DeclareMathOperator{\argmin}{arg\,min}
\DeclareMathOperator{\grad}{grad}
\DeclareMathOperator{\smooth}{smooth}
\begin{document}

\begin{alignat}{2} V_{\textrm{SET}} &= \min \smash[b]{\Bigl( \frac{dV}{dI} \Bigr)} &\quad&\text{for $V<0$} \[1em] I_{\textrm{SET}} &= I\smash{\Bigl(\argmin \Bigl( \frac{dV}{dI} \Bigr) -3 \Bigr)} &&\text{for $V<0$}\[1em] V_{\textrm{RESET}} &= V\bigl(\arg(\grad(\smooth(I)) \leqslant 0)(0)\bigr) &&\text{for $V>0$}\[1em] I_{\textrm{RESET}} &= I\bigl(\arg(\grad(\smooth(I)) \leqslant 0)(0)\bigr) &&\text{for $V>0$}\[1em] V_{\textrm{SET,stop}} &= \min(V) \[1em] V_{\textrm{RESET,stop}} &= \max(V) \[1em] I_{\textrm{cc}} &= \min(I) \[1em] L_{\textrm{in}} &= I(V=\pm 0.4)\big/I(V=\pm 0.2) \end{alignat} \end{document}

Mico
  • 506,678
  • Thanks a lot. It works just as I wanted it to be. Would you care to explain what difference the alignat environment makes? Is it the spacing between the equations and the condition? – Nils Aug 17 '20 at 09:55
  • Also, do you happen to know how to align the Variables before the equal signs at the left? – Nils Aug 17 '20 at 09:59
  • 1
    @Nils - The align environment doesn't allow you to exert direct control over the horizontal space between the groups of columns; in practice, you may get more horizontal space than what's optimal. With alignat, you are in charge of telling LaTeX how much horizontal whitespace (here: \quad) should be inserted. – Mico Aug 17 '20 at 10:28
  • 1
    @Nils - I would not left-align the variable names. However, if you absolutely must, change alignat{2} to alignat{3}, prefix a & character at the start of all 8 rows, and change all 8 instances of &= to &&=. – Mico Aug 17 '20 at 11:11
  • 1
    Thanks so much for the heads up :) – Nils Aug 17 '20 at 12:14