summaryrefslogtreecommitdiff
path: root/metapost
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-04-26 15:13:00 +0200
committerHans Hagen <pragma@wxs.nl>2013-04-26 15:13:00 +0200
commit9a215b83b9b1ba7d2389ae324e838ae145d9d7da (patch)
treef41adc1563f5253ba4d8b9940be41ee76995ee13 /metapost
parentc34c2f8a578e27af9b715aa0ccf48c7e365ab1e5 (diff)
downloadcontext-9a215b83b9b1ba7d2389ae324e838ae145d9d7da.tar.gz
beta 2013.04.26 15:13
Diffstat (limited to 'metapost')
-rw-r--r--metapost/context/base/mp-core.mpii29
-rw-r--r--metapost/context/base/mp-core.mpiv3
2 files changed, 19 insertions, 13 deletions
diff --git a/metapost/context/base/mp-core.mpii b/metapost/context/base/mp-core.mpii
index c07f0976f..33e9b386e 100644
--- a/metapost/context/base/mp-core.mpii
+++ b/metapost/context/base/mp-core.mpii
@@ -346,6 +346,9 @@ boolean check_multi_par_chain ; check_multi_par_chain := true ; % extra page
boolean multi_column_first_page_hack; multi_column_first_page_hack := true ; % seems to work ok
+if unknown NOfTextColumns : numeric NOfTextColumns ; NOfTextColumns := 0 ; fi ;
+if unknown NOfTextAreas : numeric NOfTextAreas ; NOfTextAreas := 0 ; fi ;
+
def simplify_multi_pars = % boundingbox ipv shape als optie
for i := 1 upto nofmultipars :
multipars[i] := boundingbox multipars[i] ;
@@ -365,15 +368,15 @@ def prepare_multi_pars (expr fn,fx,fy,fw,fh,fd,
pn,px,py,pw,ph,pd,
rw,rl,rr,rh,ra,ri) =
- if span_multi_column_pars :
- begingroup ;
- save TextAreas ; path TextAreas[] ;
- save NOfTextAreas ; numeric NOfTextAreas ;
- for i=1 upto NOfTextColumns :
- TextAreas[i] := TextColumns[i] ;
- endfor ;
- NOfTextAreas := NOfTextColumns ;
- fi ;
+% if span_multi_column_pars :
+% begingroup ;
+% save TextAreas ; path TextAreas[] ;
+% save NOfTextAreas ; numeric NOfTextAreas ;
+% for i=1 upto NOfTextColumns :
+% TextAreas[i] := TextColumns[i] ;
+% endfor ;
+% NOfTextAreas := NOfTextColumns ;
+% fi ;
last_multi_par_shift := origin ;
@@ -894,7 +897,7 @@ enddef ;
save_multipar (i,3,multipar) ;
- elseif multi_column_first_page_hack and ((nxy[fpos]=RealPageNumber) and (nxy[tpos]>=RealPageNumber) and (NOfTextColumns>1)) :
+ elseif multi_column_first_page_hack and ((nxy[fpos]=RealPageNumber) and (nxy[tpos]>=RealPageNumber) : % and (NOfTextColumns>1)) :
save_multipar (i,2,multipar) ;
@@ -943,9 +946,9 @@ enddef ;
fi ;
- if span_multi_column_pars :
- endgroup ;
- fi ;
+% if span_multi_column_pars :
+% endgroup ;
+% fi ;
% potential safeguard:
diff --git a/metapost/context/base/mp-core.mpiv b/metapost/context/base/mp-core.mpiv
index 3dba4a004..9b7182908 100644
--- a/metapost/context/base/mp-core.mpiv
+++ b/metapost/context/base/mp-core.mpiv
@@ -17,6 +17,9 @@ boolean context_core ; context_core := true ;
%D Copied to here .. not used any more.
+if unknown NOfTextColumns : numeric NOfTextColumns ; NOfTextColumns := 1 ; fi ;
+if unknown NOfTextAreas : numeric NOfTextAreas ; NOfTextAreas := 1 ; fi ;
+
def SaveTextAreas =
path SavedTextAreas [] ;
path SavedTextColumns[] ;