summaryrefslogtreecommitdiff
path: root/tex/context/base/core-pos.tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2001-03-27 00:00:00 +0200
committerHans Hagen <pragma@wxs.nl>2001-03-27 00:00:00 +0200
commit2a2e86e6c2022e3925e0ee62f5c7b66bbec03338 (patch)
treee02a419ec09c32da024db4855f46de2b1fa85ead /tex/context/base/core-pos.tex
parente78478392e9717499b101d0fed642c945c104097 (diff)
downloadcontext-2a2e86e6c2022e3925e0ee62f5c7b66bbec03338.tar.gz
stable 2001.03.27
Diffstat (limited to 'tex/context/base/core-pos.tex')
-rw-r--r--tex/context/base/core-pos.tex38
1 files changed, 26 insertions, 12 deletions
diff --git a/tex/context/base/core-pos.tex b/tex/context/base/core-pos.tex
index 761acf08d..11d7ef1d2 100644
--- a/tex/context/base/core-pos.tex
+++ b/tex/context/base/core-pos.tex
@@ -327,7 +327,7 @@
%D The macros \type {\lpos} and \type {\rpos} share some code.
\def\lrpos#1#2%
- {\dontleavehmode\vadjust
+ {\dontleavehmode\vadjust % may disappear if buried
{\setbox0=\hbox{\raise\dp\strutbox\hbox{\hpos{#1}{\strut}}}%
\smashbox0
\rlap{#2\box0}}}
@@ -430,7 +430,7 @@
%D \defineoverlay [sample] [\positionoverlay{sample}]
%D
%D \startpositionoverlay{sample}
-%D \setMPpositiongraphic{A-1}{connectcenter}{from=A-1m,to=A-2}
+%D \setMPpositiongraphic{A-1}{connectcenter}{from=A-1,to=A-2}
%D \stoppositionoverlay
%D \stopbuffer
%D
@@ -439,8 +439,8 @@
%D \startbuffer[graphic]
%D \startMPpositiongraphic{connectcenter}
%D path pa, pb ; pair ca, cb ;
-%D initialize_box(\MPvar{from}) ; pa := pxy ; ca := cxy ;
-%D initialize_box(\MPvar{to}) ; pb := pxy ; cb := cxy ;
+%D initialize_box(\MPpos{\MPvar{from}}) ; pa := pxy ; ca := cxy ;
+%D initialize_box(\MPpos{\MPvar{to}}) ; pb := pxy ; cb := cxy ;
%D draw pa withcolor red ;
%D draw pb withcolor red ;
%D draw ca -- cb withcolor blue ;
@@ -661,6 +661,10 @@
linewidth=\linewidth,
backgroundcolor=lightgray]
+\startuseMPgraphic{mpos:par:shape}
+ draw_par ;
+\stopuseMPgraphic
+
\startMPpositionmethod{mpos:par}
\ifnum\MPp{b:\MPvar{self}}=\MPp{e:\MPvar{self}}\relax
\startMPpositiongraphic{mpos:par}{backgroundcolor,linecolor}
@@ -668,25 +672,35 @@
\MPpos{r:\MPvar{self}},\MPpos{e:\MPvar{self}}) ;
boxfillcolor := \MPvar{backgroundcolor} ;
boxlinecolor := \MPvar{linecolor} ;
- draw_par ;
+ \includeMPgraphic{mpos:par:shape} ;
+if not (\MPx{head:\realfolio}=\MPx{head:\MPp{l:\MPvar{self}}}) :
+ LoadPageState ; currentpicture := currentpicture shifted
+ if odd \realfolio : - fi (PaperWidth-MakeupWidth-2BackSpace,0) ;
+fi ;
anchor_par(\MPanchor{b:\MPvar{self}}) ;
\stopMPpositiongraphic
\MPpositiongraphic{mpos:par}{}%
- \else
+ \else\ifnum\MPp{b:\MPvar{self}}<\MPp{e:\MPvar{self}}\relax
\startMPpositiongraphic{mpos:par}{backgroundcolor,linecolor}
initialize_par(\MPpos{b:\MPvar{self}},\MPpos{l:\MPvar{self}},
\MPpos{r:\MPvar{self}},\MPpos{tail:\realfolio}) ;
boxfillcolor := \MPvar{backgroundcolor} ;
boxlinecolor := \MPvar{linecolor} ;
- draw_par ;
+ \includeMPgraphic{mpos:par:shape} ;
+if not (\MPx{head:\realfolio}=\MPx{head:\MPp{l:\MPvar{self}}}) :
+ LoadPageState ; currentpicture := currentpicture shifted
+ if odd \realfolio : - fi (PaperWidth-MakeupWidth-2BackSpace,0) ;
+fi ;
anchor_par(\MPanchor{b:\MPvar{self}}) ;
\stopMPpositiongraphic
\MPpositiongraphic{mpos:par}{}%
- \advance\realpageno by 1
- \dosetpositionaction{head:\realfolio}%
- {\copyposition{b:\MPvar{self}}{head:\realfolio}%
- \doshowpositionpar{\MPvar{self}}}%
- \fi
+ \ifnum\MPp{e:\MPvar{self}}>\realpageno
+ \bgroup
+ \advance\realpageno by 1
+ \copyposition{b:\MPvar{self}}{head:\realfolio}%
+ \egroup
+ \fi
+ \fi\fi
\stopMPpositionmethod
% lelijk, aanpassen