summaryrefslogtreecommitdiff
path: root/metapost/context/base/mpxl/mp-abck.mpxl
diff options
context:
space:
mode:
Diffstat (limited to 'metapost/context/base/mpxl/mp-abck.mpxl')
-rw-r--r--metapost/context/base/mpxl/mp-abck.mpxl22
1 files changed, 22 insertions, 0 deletions
diff --git a/metapost/context/base/mpxl/mp-abck.mpxl b/metapost/context/base/mpxl/mp-abck.mpxl
index 7566ae4e4..ebcd2eeb6 100644
--- a/metapost/context/base/mpxl/mp-abck.mpxl
+++ b/metapost/context/base/mpxl/mp-abck.mpxl
@@ -55,9 +55,31 @@ def boxdashtype = (runscript mfid_mpvarn "dashtype") enddef ;
def boxalternative = (runscript mfid_mpvarn "alternative") enddef;
def boxdistance = (runscript mfid_mpvard "distance") enddef;
+def boxlocation = (runscript mfid_mpvarn "location") enddef ;
def boxtopoffset = (runscript mfid_mpvard "topoffset") enddef;
def boxbottomoffset = (runscript mfid_mpvard "bottomoffset") enddef;
+vardef boxatright =
+ save b ; b := boxlocation ;
+ if b = 1 :
+ false
+ elseif b = 2 :
+ true
+ elseif OnRightPage :
+ if b = 4 : % outer
+ true
+ else : % inner
+ false
+ fi
+ else :
+ if b = 4 : % inner
+ false
+ else : % inner
+ true
+ fi
+ fi
+enddef ;
+
def boxgridoptions = withcolor boxgridcolor enddef ;
def boxlineoptions = withcolor boxlinecolor enddef ;
def boxfilloptions = withcolor boxfillcolor enddef ;