summaryrefslogtreecommitdiff
path: root/metapost/context/base/mpxl/mp-abck.mpxl
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-10-28 11:38:54 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-10-28 11:38:54 +0200
commitc0e2193b6c379b34fbc589343d31f71e02513f03 (patch)
tree78e2d71def3ce80cf233c79279dcfddaac18a523 /metapost/context/base/mpxl/mp-abck.mpxl
parenta23982bf3c6cc3c7e34c89a67004e2ef4c6103eb (diff)
downloadcontext-c0e2193b6c379b34fbc589343d31f71e02513f03.tar.gz
2021-10-28 10:19:00
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 ;