TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Some time ago David Carlisle wrote an awesome brqalign function in this answer: http://tex.stackexchange.com/a/51543/4011. See the cited code below.

How can I add space between the rows of brqalign?



% Do everything an a box, as you can not remove
% things from the main vertical list.
% Allow \\ for ends of row.
% Use an \halign (I experimented with using one
% of the AMS alignments but they tend to want to 
% be full width, or already in math mode, so just
% use a primitive \halign here with two display math
% entries in its preamble.
% Finish the \halign.
% Now, at this point the vertical list being assembled in
% box0 contains all the rows of the alignment these will be
% a sequence of \hboxes (which will all be forced to be the
% same width) and baselineskip glue. (While testing with the
% AMS alignments there was additional glue and penalties
% as well.
% We will discard all the glue and penalties but assemble
% a horizontal list of the boxes in box1.
% start by making box1 and empty hbox.
% Then loop backwards up the vertical list discarding any glue
% and penalties and grabbing hold of each box.
% This combination removes two adjacent glue items
% or glue followed by penalty, it may be more than needed
% but better be safe than sorry.
% Glue and penalties we discard, but the boxes have the
% formula so remove this one from the current list and
% save it in box 4.
% If there was no box box4 is void and we reached the top
% of the original vertical alignent so stop.
% Otherwise Put this box4 at the front of the horizontal
% list being built in box1, followed by an em of space.
\global\setbox1\hbox{\box4\hskip 1em\unhbox1}%
% Go round the loop again.
% End the group for the working box 0.
% The horizontal list is globally assigned
% to box 1 so will be visible after this group end.
% Now put out all the boxes flush left, the usual paragraph breaker
% will fit as many on a line as it can. As each box is the same width
% vertical alignment is automatic.
\begin{flushleft}\unhbox1 \end{flushleft}%
% Ignore white space after the end of the environment


  x^2 + y^2 &= 1\\
  a + b &= c\\
  r-x &= y+z \\
  f - y &= z\\
  a - b &= 2d\\
  r+x &= 2y-3z

share|improve this question
up vote 3 down vote accepted

Change the last but one line of the definition to

\begin{flushleft}\setlength\baselineskip{1in}\unhbox1 \end{flushleft}%
share|improve this answer
Thanks. However this also added space before the first row so I did something like this: \vspace*{-3ex}\begin{flushleft}\setlength\baselineskip{6ex}\unhbox1\end{flushle‌​ft}. This is sufficient for my purpose but as you see I had to use -3ex and 6ex i.e. different numbers which seems not to be very elegant – student Mar 13 '13 at 20:21
well latex list environments do something similar internally just hide it behind top level parameters for space before item etc. the list is set as a paragraph and at the primitive Tex level baselineskip is always constant for a paragraph (the value at the end is what counts) so to make a nicer top level interface you'd probably always subtract the new \baselineskip at the top and then have a second parameter +3ex in your case documented as the space before the display. – David Carlisle Mar 13 '13 at 20:26
Why doesn't a simple \linespread{1.5} work?? – Hendrik Vogt Mar 13 '13 at 20:29
@HendrikVogt it does, it's just another interface to setting baselineskip \linespread{2}\selectfont\begin{brqalign} will work but you'd need to group it or set it back at the end, or you could set that inside the definition where I set baselineskip directly. – David Carlisle Mar 13 '13 at 20:36
@David: Oh my, \selectfont - smack! (It is a somewhat mean design decision that \selectfont is required here. Am I the only one who always forgets it?) – Hendrik Vogt Mar 13 '13 at 20:44

Your Answer


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.