5

The length \jot controlling the vertical space in align, etc. envs can be assigned only after \begin{document}. Can I do the assignment in some my sty-package file or in preamble?

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • In standard article class it can be set in the preamble. Can you post a minimal working example (MWE) showing what you are trying to do. – Andrew Swann Nov 19 '13 at 09:05
  • 1
    \jot is set to 3pt by the LaTeX format, even before the document class is read in; you're free to reset it whenever you want. There might be packages or classes that set it \AtBeginDocument, so without an example it's difficult to say something else. – egreg Nov 19 '13 at 09:08
  • Yes, you right. I forgot to mention that the problem comes from amsart-class. –  Nov 19 '13 at 09:14
  • Thanks to egreg! Your hint with AtBeginDocument solved the problem –  Nov 19 '13 at 09:23
  • I did like this

    \AtBeginDocument{\setlength{\jot}{1.5ex}}

    inside my package style file

    –  Nov 21 '13 at 12:00

1 Answers1

6

For the standard classes the parameter \jot has the value 3pt, which is assigned in latex.ltx. However, the amsart class adds the command \@adjustvertspacing to what's done by the size changing commands \normalsize, \Small, \small, \large and \Large.

This command does, among other things

\jot=\baselineskip \divide\jot by 4

So, since \normalsize is issued as part of \begin{document} actions, setting a value of \jot in the preamble will do nothing.

However, also issuing

\AtBeginDocument{\jot=5pt}

will not guarantee the setting is obeyed for the duration of the document, because a \normalsize declaration will change it again to the value set by the class. It's probably better to hook into \@adjustvertspacing. Say you want to set \jot to half the baselineskip instead of one fourth:

\usepackage{etoolbox}
\makeatletter
\patchcmd{\@adjustvertspacing}
  {\jot\baselineskip \divide\jot 4}
  {\jot=.5\baselineskip}
  {}{}
\makeatother

If one third is preferred, use \jot=.33333\baselineskip.

egreg
  • 1,121,712