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.

In this excellent answer, one of the tools used is to redefine \normallineskiplimit. I cannot find this macro in any reference, although it does show up in this answer. Where is this length originally defined, and what exactly does this macro control?

A good answer may need to address related macros (if they exist) such as \normallineskip.

share|improve this question
1  
LaTeX defines the registers \normalbaselineskip, \normallineskip and \normallineskiplimit to store the standard values (defined by the font size option) in order to have those value still available when \baselineskip, \lineskip and \lineskiplimit change. For instance, in tabular, \baselineskip is set to zero, but you can always refer to \normalbaselineskip for using the normal value in spacing commands. I'd be wary of resetting their values. –  egreg Jul 8 at 14:25
    
Why I set \normallineskiplimit in my macro? Because I traced {align*} macro and I found that there is \vskip-\lineskiplimit immediatelly followed by \vskip\normallineskiplimit. We need zero \vskip as the result. –  wipet Jul 8 at 15:43

1 Answer 1

\normallineskiplimit (and friends) are used in two places in latex,

they are used in \@arrayparboxrestore

\lineskip\normallineskip
\baselineskip\normalbaselineskip

so that inside \parbox and minipage and tabular p columns the baselineskip is restored to a normal state even if used in a context where they ave non standard values.

\displaylines compensates for non standard values of \lineskiplimit

\def\displ@y{\global\dt@ptrue\openup\jot\m@th
  \everycr{\noalign{\ifdt@p \global\dt@pfalse \ifdim\prevdepth>-1000\p@
      \vskip-\lineskiplimit \vskip\normallineskiplimit \fi
      \else \penalty\interdisplaylinepenalty \fi}}}

but that is really a hangover from plain TeX and not used much in LaTeX.

However the AMS alignments all reset this in a similar way amsmath has

\def\@display@init#1{%
    \global\dt@ptrue \spread@equation
    \everycr{%
        \noalign{%
            #1%
            \ifdt@p
                \global\dt@pfalse
                \vskip-\lineskiplimit
                \vskip\normallineskiplimit
            \else
                \penalty\@eqpen \global\dspbrk@lvl\m@ne
            \fi
        }%
    }%
}

to adjust for the difference between the current value of \lineskiplimit and the saved \normallineskiplimit

You can also use \normalbaselines to explicitly reset the values to defaults

\def\normalbaselines{\lineskip\normallineskip
  \baselineskip\normalbaselineskip \lineskiplimit\normallineskiplimit}

but I'm pretty sure I've never needed to do that:-)

share|improve this answer
    
The \normalbaselines macro is very known in plain TeX. It is used in \cases and \matrix macros. –  wipet Jul 8 at 15:46

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.