summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/metapost
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-05-08 22:36:52 +0000
committerKarl Berry <karl@freefriends.org>2015-05-08 22:36:52 +0000
commit5dc3418fd91c83782dce77f0b65549e14f118f51 (patch)
tree9b4ec94c1bb0be9831fd3b887de69df098d46211 /Master/texmf-dist/metapost
parentb810c0301dd20283addb956384210b7926eef35d (diff)
context
git-svn-id: svn://tug.org/texlive/trunk@37284 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/metapost')
-rw-r--r--Master/texmf-dist/metapost/context/base/mp-page.mpiv29
1 files changed, 19 insertions, 10 deletions
diff --git a/Master/texmf-dist/metapost/context/base/mp-page.mpiv b/Master/texmf-dist/metapost/context/base/mp-page.mpiv
index 7a6e576bd98..a6fa3fba366 100644
--- a/Master/texmf-dist/metapost/context/base/mp-page.mpiv
+++ b/Master/texmf-dist/metapost/context/base/mp-page.mpiv
@@ -267,29 +267,38 @@ vardef PaperBleed = lua.mp.PaperBleed () enddef ;
boolean mfun_swapped ;
def SwapPageState =
- mfun_swapped := true ;
+ mfun_swapped := true ; % eventually this will go !
enddef ;
extra_beginfig := extra_beginfig & "mfun_swapped := false ;" ;
-vardef BackSpace = if (mfun_swapped and not OnRightPage) : PaperWidth - MakeupWidth - fi lua.mp.BackSpace() enddef ;
-vardef CutSpace = if (mfun_swapped and not OnRightPage) : PaperWidth - MakeupWidth - fi lua.mp.CutSpace () enddef ;
-
vardef LeftMarginWidth = if mfun_swapped and not OnRightPage : lua.mp.RightMarginWidth () else : lua.mp.LeftMarginWidth () fi enddef ;
vardef RightMarginWidth = if mfun_swapped and not OnRightPage : lua.mp.LeftMarginWidth () else : lua.mp.RightMarginWidth () fi enddef ;
vardef LeftMarginDistance = if mfun_swapped and not OnRightPage : lua.mp.RightMarginDistance() else : lua.mp.LeftMarginDistance () fi enddef ;
vardef RightMarginDistance = if mfun_swapped and not OnRightPage : lua.mp.LeftMarginDistance () else : lua.mp.RightMarginDistance() fi enddef ;
+
vardef LeftEdgeWidth = if mfun_swapped and not OnRightPage : lua.mp.RightEdgeWidth () else : lua.mp.LeftEdgeWidth () fi enddef ;
vardef RightEdgeWidth = if mfun_swapped and not OnRightPage : lua.mp.LeftEdgeWidth () else : lua.mp.RightEdgeWidth () fi enddef ;
vardef LeftEdgeDistance = if mfun_swapped and not OnRightPage : lua.mp.RightEdgeDistance () else : lua.mp.LeftEdgeDistance () fi enddef ;
vardef RightEdgeDistance = if mfun_swapped and not OnRightPage : lua.mp.LeftEdgeDistance () else : lua.mp.RightEdgeDistance () fi enddef ;
-% vardef Margin = if OnRightPage : lua.mp.RightMarginWidth else : lua.mp.LeftMarginWidth fi enddef ;
-% vardef Edge = if OnRightPage : lua.mp.RightEdgeWidth else : lua.mp.LeftEdgeWidth fi enddef ;
-% vardef InnerMargin = if OnRightPage : lua.mp.LeftMarginWidth else : lua.mp.RightMarginWidth fi enddef ;
-% vardef InnerEdge = if OnRightPage : lua.mp.LeftEdgeWidth else : lua.mp.RightEdgeWidth fi enddef ;
-% vardef OuterMargin = if OnRightPage : lua.mp.RightMarginWidth else : lua.mp.LeftMarginWidth fi enddef ;
-% vardef OuterEdge = if OnRightPage : lua.mp.RightEdgeWidth else : lua.mp.LeftEdgeWidth fi enddef ;
+vardef BackSpace = if mfun_swapped and not OnRightPage : PaperWidth - MakeupWidth - fi lua.mp.BackSpace() enddef ;
+vardef CutSpace = if mfun_swapped and not OnRightPage : PaperWidth - MakeupWidth - fi lua.mp.CutSpace () enddef ;
+
+% better use:
+
+vardef OuterMarginWidth = if not OnRightPage : lua.mp.LeftMarginWidth () else : lua.mp.RightMarginWidth () fi enddef ;
+vardef InnerMarginWidth = if not OnRightPage : lua.mp.RightMarginWidth () else : lua.mp.LeftMarginWidth () fi enddef ;
+vardef OuterMarginDistance = if not OnRightPage : lua.mp.LeftMarginDistance () else : lua.mp.RightMarginDistance() fi enddef ;
+vardef InnerMarginDistance = if not OnRightPage : lua.mp.RightMarginDistance() else : lua.mp.leftMarginDistance () fi enddef ;
+
+vardef OuterEdgeWidth = if not OnRightPage : lua.mp.LeftEdgeWidth () else : lua.mp.RightEdgeWidth () fi enddef ;
+vardef InnerEdgeWidth = if not OnRightPage : lua.mp.RightEdgeWidth () else : lua.mp.LeftEdgeWidth () fi enddef ;
+vardef OuterEdgeDistance = if not OnRightPage : lua.mp.LeftEdgeDistance () else : lua.mp.RightEdgeDistance () fi enddef ;
+vardef InnerEdgeDistance = if not OnRightPage : lua.mp.RightEdgeDistance () else : lua.mp.leftEdgeDistance () fi enddef ;
+
+vardef OuterSpaceWidth = if not OnRightPage : lua.mp.BackSpace () else : lua.mp.CutSpace () fi enddef ;
+vardef InnerSpaceWidth = if not OnRightPage : lua.mp.CutSpace () else : lua.mp.BackSpace () fi enddef ;
% vardef CurrentLayout = lua.mp.CurrentLayout () enddef ;