summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/page-sid.mkiv
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2010-05-24 14:05:02 +0000
committerTaco Hoekwater <taco@elvenkind.com>2010-05-24 14:05:02 +0000
commit57ea7dad48fbf2541c04e434c31bde655ada3ac4 (patch)
tree1f8b43bc7cb92939271e1f5bec610710be69097f /Master/texmf-dist/tex/context/base/page-sid.mkiv
parent6ee41e1f1822657f7f23231ec56c0272de3855e3 (diff)
here is context 2010.05.24 13:05
git-svn-id: svn://tug.org/texlive/trunk@18445 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/page-sid.mkiv')
-rw-r--r--Master/texmf-dist/tex/context/base/page-sid.mkiv99
1 files changed, 31 insertions, 68 deletions
diff --git a/Master/texmf-dist/tex/context/base/page-sid.mkiv b/Master/texmf-dist/tex/context/base/page-sid.mkiv
index ecfa195e688..c30204a4e68 100644
--- a/Master/texmf-dist/tex/context/base/page-sid.mkiv
+++ b/Master/texmf-dist/tex/context/base/page-sid.mkiv
@@ -150,39 +150,6 @@
\fi
\fi}
-% \def\setsidefloatskips
-% {\global\sidefloatrightskip\zeropoint
-% \global\sidefloatleftskip \zeropoint
-% \ifcase\sidefloattype
-% \or % backspace
-% \global \sidefloatleftskip \rightorleftpageaction \backspace \cutspace
-% \or % leftedge
-% \global \sidefloatleftskip \rightorleftpageaction \leftmargindistance\rightmargindistance
-% \global\advance\sidefloatleftskip \rightorleftpageaction \leftmarginwidth\rightmarginwidth
-% \global\advance\sidefloatleftskip \rightorleftpageaction \leftedgedistance\rightedgedistance
-% \or % leftmargin
-% \global \sidefloatleftskip \rightorleftpageaction \leftmargindistance\rightmargindistance
-% \or % leftside
-% \or % rightside
-% \or % rightmargin
-% \global \sidefloatrightskip\rightorleftpageaction \rightmargindistance\leftmargindistance
-% \or % rightedge
-% \global \sidefloatrightskip\rightorleftpageaction \rightmargindistance\leftmargindistance
-% \global\advance\sidefloatrightskip\rightorleftpageaction \rightmarginwidth\leftmarginwidth
-% \global\advance\sidefloatrightskip\rightorleftpageaction \rightedgedistance\leftedgedistance
-% \or % cutspace
-% \global \sidefloatrightskip\rightorleftpageaction \cutspace\backspace
-% \fi
-% \ifdim\sidefloatrightskip>\zeropoint
-% \doglobal\advance\sidefloatrightskip\rightskip
-% \fi
-% \ifdim\sidefloatleftskip>\zeropoint
-% \doglobal\advance\sidefloatleftskip\leftskip
-% \fi}
-
-
-% use \outermarginwidth etc here
-
\def\setsidefloatskips
{\global\sidefloatrightskip\zeropoint
\global\sidefloatleftskip \zeropoint
@@ -395,7 +362,7 @@
\ifdim\sidefloatwidth>\zeropoint % new, see prikkels
\noindent
\ifinner\else\vadjust{\penalty\minusone}\fi
- \hskip\sidefloatwidth
+ \hskip\sidefloatwidth\relax
%\else
% we have a margin or edge float
\fi
@@ -467,6 +434,30 @@
%
% keep this ^
+\def\repositionsidefloat#1%
+ {\global\setbox\floatbox\hbox % no \hskip, but \kern here
+ {\ifnum\sidefloattype=\plusfour
+ \hskip\sidefloatleftshift
+ \else\ifnum\sidefloattype=\plusone
+ \hskip\sidefloatleftshift
+ \fi\fi
+ \ifnum\sidefloattype>\plusfour
+ \hskip-\sidefloatextrashift
+ \else
+ \hskip\sidefloatshift
+ \fi
+ \vbox{#1\ifnum\sidefloatalign=\plusfour \removedepth\fi}%
+ \ifnum\sidefloattype>\plusfour
+ \kern\sidefloatshift
+ \else
+ \kern-\sidefloatextrashift
+ \fi
+ \ifnum\sidefloattype=8
+ \kern\sidefloatrightshift
+ \else\ifnum\sidefloattype=\plusfive
+ \kern\sidefloatrightshift
+ \fi\fi}}
+
\def\putsidefloat#1% grid (4) is rather experimental
{\par
\whitespace
@@ -490,28 +481,7 @@
\fi
\previoussidefloat
\stallsidefloat
- \global\setbox\floatbox\hbox % no \hskip, but \kern here
- {\ifnum\sidefloattype=\plusfour
- \hskip\sidefloatleftshift
- \else\ifnum\sidefloattype=\plusone
- \hskip\sidefloatleftshift
- \fi\fi
- \ifnum\sidefloattype>\plusfour
- \hskip-\sidefloatextrashift
- \else
- \hskip\sidefloatshift
- \fi
- \vbox{#1\ifnum\sidefloatalign=\plusfour \removedepth\fi}%
- \ifnum\sidefloattype>\plusfour
- \kern\sidefloatshift
- \else
- \kern-\sidefloatextrashift
- \fi
- \ifnum\sidefloattype=8
- \kern\sidefloatrightshift
- \else\ifnum\sidefloattype=\plusfive
- \kern\sidefloatrightshift
- \fi\fi}%
+ \repositionsidefloat{#1}%
\ifnum\sidefloatalign=\plusfour
\getnoflines{\ht\floatbox}%
\scratchdimen\noflines\lineheight
@@ -576,17 +546,6 @@
\fi
\setsidefloat}
-% \def\progresssidefloat
-% {\sidefloatprogress\sidefloatvsize
-% \iffloatflag
-% \advance\sidefloatprogress -\sidefloatpagetotal
-% \global\floatflagfalse
-% \else
-% \advance\sidefloatprogress -\pagetotal
-% \fi}
-%
-% more compact:
-
\def\progresssidefloat
{\sidefloatprogress\sidefloatvsize
\advance\sidefloatprogress-\iffloatflag\sidefloatpagetotal\global\floatflagfalse\else\pagetotal\fi}
@@ -676,6 +635,10 @@
\fi
\egroup
\par
+\ifgridsnapping
+ \getrawnoflines\sidefloatheight
+ \sidefloatheight=\noflines\lineheight
+\fi
\kern-\sidefloatheight
\penalty10001 % oeps, this will change
\normalbaselines
@@ -784,7 +747,7 @@
\def\doadjustsidefloatdisplaylines
{\par
- \vskip-\parskip
+ % not in mkiv: \vskip-\parskip
\noindent
\ignorespaces}