summaryrefslogtreecommitdiff
path: root/tex/context/base/spac-grd.mkiv
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-10-19 01:20:13 +0300
committerMarius <mariausol@gmail.com>2012-10-19 01:20:13 +0300
commit69d2352af4b60929b37fc49f3bdb263977016244 (patch)
treedb5eb11398e345dfa23b4c4500fb93575d2afb7c /tex/context/base/spac-grd.mkiv
parentc18f7cbe51449a611ea1819fedd9a4ff18529b7d (diff)
downloadcontext-69d2352af4b60929b37fc49f3bdb263977016244.tar.gz
stable 2012.05.30 11:26
Diffstat (limited to 'tex/context/base/spac-grd.mkiv')
-rw-r--r--tex/context/base/spac-grd.mkiv61
1 files changed, 28 insertions, 33 deletions
diff --git a/tex/context/base/spac-grd.mkiv b/tex/context/base/spac-grd.mkiv
index 7b3ee6d6c..487521f6c 100644
--- a/tex/context/base/spac-grd.mkiv
+++ b/tex/context/base/spac-grd.mkiv
@@ -11,42 +11,41 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-%D This module will be merged into spac-ver.mkiv.
+%D This module will be merged intio spac-ver.mkiv.
\writestatus{loading}{ConTeXt Spacing Macros / Grid Snapping}
-\unprotect
+% buff-ver.mkiv: halfline spacing
+% strc-mat.mkiv: configure math grid (new code needed)
+% page-one.mkiv: to be checked
+% page-mul.mkiv: to be checked and redone
+% page-sid.mkiv: to be checked
+% page-set.mkiv: to be checked
+% strc-not.mkiv: to be checked
+% strc-ren.mkiv: to be checked
+% strc-flt.mkiv: to be checked (captions, probably top/bottom)
+% core-mis.mkiv: to be checked (placement, probbaly harmless)
-%D A rather crappy macro that we need to avoid and as such it will probably
-%D disappear:
+\unprotect
-\installcorenamespace{lastnodepusher}
+%D Helpers:
\let\poplastnode\relax
-\unexpanded\def\pushlastnode
- {\csname\??lastnodepusher
- \ifcsname\??lastnodepusher\the\lastnodetype\endcsname
- \the\lastnodetype
+\def\pushlastnode
+ {\ifdim\lastskip=\zeropoint
+ \ifnum\lastpenalty=\zerocount
+ \ifnum\lastkern=\zerocount
+ \let\poplastnode\relax
+ \else
+ \edef\poplastnode{\kern\the\lastkern\relax}\kern-\lastkern % untested
+ \fi
\else
- \s!unknown
+ \edef\poplastnode{\penalty\the\lastpenalty\relax}\nobreak % untested
\fi
- \endcsname}
-
-\setvalue{\??lastnodepusher\number\kernnodecode}%
- {\unexpanded\edef\poplastnode{\kern\the\lastkern\relax}%
- \kern-\lastkern}
-
-\setvalue{\??lastnodepusher\number\gluenodecode}%
- {\unexpanded\edef\poplastnode{\vskip\the\lastskip\relax}%
- \vskip-\lastskip}
-
-\setvalue{\??lastnodepusher\number\penaltynodecode}%
- {\unexpanded\edef\poplastnode{\penalty\the\lastpenalty\relax}%
- \nobreak}
-
-\setvalue{\??lastnodepusher\s!unknown}%
- {\let\poplastnode\relax}
+ \else
+ \edef\poplastnode{\vskip\the\lastskip\relax}\vskip-\lastskip % \removelastskip
+ \fi}
%D Moved from supp-box:
@@ -134,17 +133,13 @@
% \startlinecorrection \framed{xxx} \stoplinecorrection
% \input ward \par
-% to be redone:
-
\unexpanded\def\dotopbaselinecorrection{\expandafter\blank\expandafter[\the\d_spac_lines_correction_before]}
\unexpanded\def\dobotbaselinecorrection{\expandafter\blank\expandafter[\the\d_spac_lines_correction_after ]}
\def\showbaselinecorrection
{\def\dobaselinecorrection % visualization is not watertight!
{\bgroup
- \ifdim\prevdepth>\zeropoint
- \kern-\prevdepth
- \fi
+\ifdim\prevdepth>\zeropoint\kern-\prevdepth\fi
\setbox\scratchbox\emptyhbox
\wd\scratchbox\hsize
\dp\scratchbox\strutdp
@@ -154,9 +149,9 @@
\egroup
\prevdepth\strutdp}%
\def\dotopbaselinecorrection
- {\hrule\s!height\d_spac_lines_correction_before}%
+ {\hrule\!!height\d_spac_lines_correction_before}%
\def\dobotbaselinecorrection
- {\hrule\s!height\d_spac_lines_correction_after}}
+ {\hrule\!!height\d_spac_lines_correction_after}}
\def\dobaselinecorrection % beware, this one is redefined / used locally elsewhere
{\ifdim\prevdepth>\zeropoint\kern-\prevdepth\fi