summaryrefslogtreecommitdiff
path: root/tex/context/base/core-spa.mkii
blob: b3d71699d397a63e0923fd22bcbf21629a48f08d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%D \module
%D   [       file=core-spa,
%D        version=1997.03.31,
%D          title=\CONTEXT\ Core Macros,
%D       subtitle=Spacing,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\unprotect

% Just after we implemented the \MKIV\ code, Thanh posted a patch for
% \PDFTEX. The following code is untested! (\LUATEX\ does not contain
% this code!)

\ifx\pdfkeeplinedimen\undefined

    \let\mksetupgridsnapping  \relax
    \let\mkenablegridsnapping \relax
    \let\mkdisablegridsnapping\relax

\else

    \def\mksetupgridsnapping
      {\pdfeachlineheight  \openstrutheight
       \pdfeachlinedepth   \openstrutdepth
       \pdffirstlineheight \pdfeachlineheight
       \pdflastlinedepth   \pdfeachlinedepth}

    \def\mkenablegridsnapping
      {\pdfkeeplinedimen\maxdimen
       \topskip\strutht
       \offinterlineskip}

    \def\mkdisablegridsnapping
      {\pdfkeeplinedimen\zeropoint
       % reset topskip
       \oninterlineskip}

\fi

\protect \endinput