Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there a way to insert a blank line between two equations in align environment?

From what I understand a blank line is interpreted as \par and \par is not allowed in align. Can I disable this "feature" in align environment?

Reason:

I like my code to be in 80 column format. So when I hit M-q (fill-paragraph) without blank lines, the code looks like this:

\begin{align}
  \min \sum_{k \in K} \sum_{(i,j) \in A} c_{ij} x_{ij}^k + \sum_{(i,j)
    \in A} f_{ij} y_{ij} \\ \sum_{j \in V_i^+} x_{ij}^k - \sum_{j \in
    V_i^-} x_{ji}^k = \begin{cases} d^k & \text{si } i = O(k) \\ -d^k
    & \text{si } i = D(k) \\ 0 & \text{sinon} \end{cases} & \quad
  \quad \forall i \in V, \; \forall k \in K \\ \sum_{k \in K} x_{ij}^k
  \le u_{ij} y_{ij} & \quad \quad \forall (i,j) \in A
\end{align}

instead of this:

\begin{align}
  \min \sum_{k \in K} \sum_{(i,j) \in A} c_{ij} x_{ij}^k + \sum_{(i,j)
    \in A} f_{ij} y_{ij} \\

  \sum_{j \in V_i^+} x_{ij}^k - \sum_{j \in V_i^-} x_{ji}^k
  = \begin{cases} d^k & \text{si } i = O(k) \\ -d^k & \text{si } i =
    D(k) \\ 0 & \text{sinon} \end{cases} & \quad \quad \forall i \in
  V, \; \forall k \in K \\

  \sum_{k \in K} x_{ij}^k \le u_{ij} y_{ij} & \quad \quad \forall
  (i,j) \in A
\end{align}

which is easier (for me) to read and edit.

share|improve this question
    
Welcome to tex.sx! Note that you don't have to (and in fact shouldn't) sign with your name since it automatically appears in the lower right corner of your post. –  Hendrik Vogt Feb 5 '11 at 21:25

1 Answer 1

up vote 14 down vote accepted

put a % in those lines and everything will be fine for amsmath and for you

share|improve this answer
3  
Or put the "\\" that you already have on the lines that you want to be empty. –  Bruno Le Floch Feb 5 '11 at 20:50
    
which then also will be numbered ... –  Herbert Feb 5 '11 at 20:56
1  
@Herbert: Maybe you misunderstood Bruno? He means moving the existing "\\", not adding new ones. –  Hendrik Vogt Feb 6 '11 at 7:41
    
@Bruno: Does this solve the "M-q-problem"? –  Hendrik Vogt Feb 6 '11 at 7:43
1  
@Hendrik: It depends on the editor. If it is emacs, then my solution does not work (I forgot to test), whereas Herbert's works. –  Bruno Le Floch Feb 6 '11 at 11:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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