summaryrefslogtreecommitdiff
path: root/tex/context/base/spac-adj.mkiv
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2012-01-05 19:27:55 +0100
committerHans Hagen <pragma@wxs.nl>2012-01-05 19:27:55 +0100
commit551356b39d8dfbf10ed6542aa3281cb08cd36197 (patch)
tree0595a2919995c5196a42b88e997ff6a72b8cfa60 /tex/context/base/spac-adj.mkiv
parent3f0bc32ccee0fa7ce93e842b67136e7de75087c2 (diff)
downloadcontext-551356b39d8dfbf10ed6542aa3281cb08cd36197.tar.gz
beta 2011.12.31 18:06
Diffstat (limited to 'tex/context/base/spac-adj.mkiv')
-rw-r--r--tex/context/base/spac-adj.mkiv50
1 files changed, 50 insertions, 0 deletions
diff --git a/tex/context/base/spac-adj.mkiv b/tex/context/base/spac-adj.mkiv
new file mode 100644
index 000000000..3a72d2a5a
--- /dev/null
+++ b/tex/context/base/spac-adj.mkiv
@@ -0,0 +1,50 @@
+%D \module
+%D [ file=spac-adj, % moved from spac-par.mkiv
+%D version=2009.10.16, % 1997.03.31, was core-spa.tex
+%D title=\CONTEXT\ Spacing Macros,
+%D subtitle=Paragraphs,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Spacing Macros / Adjustments}
+
+\unprotect
+
+% Very nasty but needed for margin stuff inside colored
+% paragraphs. Obsolete anyway.
+
+\registerctxluafile{spac-adj}{1.001}
+
+\definesystemattribute [graphicvadjust] [public]
+
+\unexpanded\def\enablegraphicvadjust
+ {\ctxlua{nodes.tasks.enableaction("finalizers","nodes.handlers.graphicvadjust")}%
+ \glet\enablegraphicvadjust\relax}
+
+\unexpanded\def\graphicvadjust % currently not enabled ... nasty bidi handling
+ {\enablegraphicvadjust % and no longer needed anyway
+ \dowithnextboxcontentcs\forgetall\spacings_graphic_vadjust_finish\vbox}
+
+\def\spacings_graphic_vadjust_finish
+ {\vadjust
+ {\vbox attr \graphicvadjustattribute \plusone
+ {\unvbox\nextbox
+ % corrects for one line paragraphs
+ \nointerlineskip
+ \kern-\struttotal
+ \nointerlineskip
+ \verticalstrut}}}
+
+\unexpanded\def\fakedvadjust
+ {\dowithnextboxcs\spacings_faked_vadjust_finish\vtop}
+
+\def\spacings_faked_vadjust_finish
+ {\setbox\nextbox\hbox{\llap{\lower\strutdepth\box\nextbox}}%
+ \smashedbox\nextbox}
+
+\protect \endinput