summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/spac-adj.mkiv
diff options
context:
space:
mode:
authorMojca Miklavec <mojca.miklavec@gmail.com>2012-05-14 17:38:55 +0000
committerMojca Miklavec <mojca.miklavec@gmail.com>2012-05-14 17:38:55 +0000
commit15995e10bfc68edf79970c4ea4fbb6678566c46e (patch)
tree2de7ca2a83f2d37ef043ad7429a5cb945bb79ddb /Master/texmf-dist/tex/context/base/spac-adj.mkiv
parentc9a39f716f1e5ec820ed3aab2c9aef25c5a9d730 (diff)
ConTeXt 2012.05.14 16:00
git-svn-id: svn://tug.org/texlive/trunk@26371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/spac-adj.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/spac-adj.mkiv50
1 files changed, 50 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/context/base/spac-adj.mkiv b/Master/texmf-dist/tex/context/base/spac-adj.mkiv
new file mode 100644
index 00000000000..447dd722963
--- /dev/null
+++ b/Master/texmf-dist/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\spac_vadjust_graphic_finish\vbox}
+
+\def\spac_vadjust_graphic_finish
+ {\vadjust
+ {\vbox attr \graphicvadjustattribute \plusone
+ {\unvbox\nextbox
+ % corrects for one line paragraphs
+ \nointerlineskip
+ \kern-\struttotal
+ \nointerlineskip
+ \verticalstrut}}}
+
+\unexpanded\def\fakedvadjust
+ {\dowithnextboxcs\spac_vadjust_faked_finish\vtop}
+
+\def\spac_vadjust_faked_finish
+ {\setbox\nextbox\hbox{\llap{\lower\strutdepth\box\nextbox}}%
+ \smashedbox\nextbox}
+
+\protect \endinput