24

The use of \noalign is quite common.

For example here \noalign is used with \vskip{}to control the height of a table cell.


How does \noalign work in general, and how does it work with \vskip?

What is the logic behind the use of \noalign{\vskip}?

5
  • 2
    I wouldn't say that \noalign is common, if you are talking LaTeX. Indeed it's a low level TeX command (a primitive, actually). Cave canem or Hic sunt leones apply.
    – egreg
    Commented Nov 14, 2013 at 23:22
  • 4
    @egreg it's more or less common, depending who is answering the question:-) Commented Nov 15, 2013 at 0:15
  • Have you studied the TeXbook or TeX by Topic? Commented Nov 15, 2013 at 7:44
  • I think it's a nice mnemonic name meant to be used inside alignment whose content doesn't align (no align).
    – morbusg
    Commented Nov 15, 2013 at 8:41
  • 2
    Martin: No I haven't, but I'm afraid that an answer to a simple question from those huge manuals would require a lot of understanding beforehand. I asked the question here also to provide an answer to others. Before asked the question I tried to search an answer from Google (and here), and did not get any solutions. Also, after your comment, tried to search Texbook from Google, and did find only a .tex -file, which refused to compile.
    – Niko Fohr
    Commented Nov 15, 2013 at 9:33

1 Answer 1

22

Basically \noalign (which is a TeX primitive and not a supported LaTeX command) has to come as the first thing in a table row and its argument is evaluated as vertical mode material that is placed between rather than in the table rows. So \vspace just inserts vertical space. (If the table had vertical rules from | they would be broken by this additional space.)

2
  • Thank you for your answer. Ok, so basically \noalign is a low-level Tex command. But what do you mean by saying that it is "no a supported LaTeX command"? So does \noalign mean, that the argument is placed above the next row you write?
    – Niko Fohr
    Commented Nov 15, 2013 at 9:39
  • 2
    Yes it comes above the next (and it is often used internally for doing calculations which need to be done before \multicolumn) by not supported I mean, like all tex primitives it is not hidden in latex2e but it is not a documented latex command, latex tabular environments do not have eto support its use (although in practice they do) same is true if you use \cr instead of \\ for example Commented Nov 15, 2013 at 10:35

You must log in to answer this question.

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