From fbaf4b2bb7fec1ba72bf646ff65bbb1398478c2a Mon Sep 17 00:00:00 2001 From: Marius Date: Mon, 17 Oct 2011 13:20:14 +0300 Subject: beta 2011.10.17 10:36 --- metapost/context/base/metafun.mp | 7 ++- metapost/context/base/metafun.mpii | 4 +- metapost/context/base/metafun.mpiv | 2 - metapost/context/base/mp-butt.mpii | 2 - metapost/context/base/mp-butt.mpiv | 2 - metapost/context/base/mp-char.mpii | 38 ++++------- metapost/context/base/mp-core.mpii | 4 -- metapost/context/base/mp-core.mpiv | 2 - metapost/context/base/mp-figs.mpii | 2 - metapost/context/base/mp-figs.mpiv | 2 - metapost/context/base/mp-form.mpii | 30 +++------ metapost/context/base/mp-form.mpiv | 4 ++ metapost/context/base/mp-grid.mpii | 2 +- metapost/context/base/mp-grid.mpiv | 2 +- metapost/context/base/mp-grph.mpii | 41 +++++------- metapost/context/base/mp-grph.mpiv | 34 +++++----- metapost/context/base/mp-mlib.mpiv | 10 ++- metapost/context/base/mp-page.mpii | 6 +- metapost/context/base/mp-page.mpiv | 66 +++++++++++++++---- metapost/context/base/mp-shap.mpii | 2 - metapost/context/base/mp-shap.mpiv | 2 - metapost/context/base/mp-spec.mpii | 3 - metapost/context/base/mp-step.mpii | 2 - metapost/context/base/mp-tool.mpii | 4 -- metapost/context/base/mp-tool.mpiv | 30 ++++++--- scripts/context/lua/mtx-tools.lua | 2 +- tex/context/base/anch-pgr.mkii | 7 --- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4096 -> 4096 bytes tex/context/base/context-version.png | Bin 106364 -> 105995 bytes tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/core-con.mkiv | 70 ++------------------- tex/context/base/file-job.mkvi | 2 + tex/context/base/font-con.lua | 4 +- tex/context/base/lang-def.mkiv | 4 +- tex/context/base/m-chart.lua | 11 ++-- tex/context/base/meta-ini.mkii | 12 +--- tex/context/base/mult-de.mkii | 1 + tex/context/base/mult-def.lua | 4 ++ tex/context/base/mult-en.mkii | 1 + tex/context/base/mult-fr.mkii | 1 + tex/context/base/mult-it.mkii | 1 + tex/context/base/mult-mps.lua | 1 + tex/context/base/mult-nl.mkii | 1 + tex/context/base/mult-pe.mkii | 1 + tex/context/base/mult-ro.mkii | 1 + tex/context/base/s-abr-01.tex | 2 + tex/context/base/s-fnt-23.mkiv | 3 +- tex/context/base/status-files.pdf | Bin 23953 -> 23921 bytes tex/context/base/status-lua.pdf | Bin 163514 -> 163589 bytes tex/context/base/strc-def.mkiv | 5 +- tex/context/base/strc-doc.lua | 17 ++++- tex/context/base/strc-doc.mkiv | 19 +++--- tex/context/base/strc-lst.lua | 12 +++- tex/context/base/strc-lst.mkiv | 2 + tex/context/base/strc-ref.lua | 17 ++++- tex/context/base/strc-sec.mkiv | 11 ++-- tex/context/interface/keys-cs.xml | 1 + tex/context/interface/keys-de.xml | 1 + tex/context/interface/keys-en.xml | 1 + tex/context/interface/keys-fr.xml | 1 + tex/context/interface/keys-it.xml | 1 + tex/context/interface/keys-nl.xml | 1 + tex/context/interface/keys-pe.xml | 1 + tex/context/interface/keys-ro.xml | 1 + tex/generic/context/luatex/luatex-fonts-merged.lua | 6 +- 68 files changed, 273 insertions(+), 264 deletions(-) diff --git a/metapost/context/base/metafun.mp b/metapost/context/base/metafun.mp index 3c72356cf..ae0a6d6fd 100644 --- a/metapost/context/base/metafun.mp +++ b/metapost/context/base/metafun.mp @@ -1,5 +1,8 @@ +if known metafunversion : endinput ; fi ; + if known mplib : - input metafun.mpiv ; + input metafun.mpiv else : - input metafun.mpii ; + input metafun.mpii fi ; + diff --git a/metapost/context/base/metafun.mpii b/metapost/context/base/metafun.mpii index 374ad88d0..0de186ed2 100644 --- a/metapost/context/base/metafun.mpii +++ b/metapost/context/base/metafun.mpii @@ -41,7 +41,7 @@ input "mp-char.mpii" ; input "mp-step.mpii" ; input "mp-grph.mpii" ; input "mp-figs.mpii" ; -input "mp-form.mpii" ; +%%%%% "mp-form.mpii" ; input "mp-grid.mpii" ; input "mp-func.mpii" ; @@ -62,4 +62,4 @@ def end = ; message "" ; message metafunversion ; message "" ; normalend ; enddef ; -dump ; endinput . +dump ; diff --git a/metapost/context/base/metafun.mpiv b/metapost/context/base/metafun.mpiv index 13dcc85c8..8466e1d83 100644 --- a/metapost/context/base/metafun.mpiv +++ b/metapost/context/base/metafun.mpiv @@ -52,5 +52,3 @@ def end = enddef ; dump ; % obsolete in mplib - -endinput diff --git a/metapost/context/base/mp-butt.mpii b/metapost/context/base/mp-butt.mpii index a3599b7c0..5c1edd42e 100644 --- a/metapost/context/base/mp-butt.mpii +++ b/metapost/context/base/mp-butt.mpii @@ -75,5 +75,3 @@ def predefinedbutton (expr button_type, button_size, button_linecolor, button_fi enddef ; let some_button = predefinedbutton - -endinput ; diff --git a/metapost/context/base/mp-butt.mpiv b/metapost/context/base/mp-butt.mpiv index a3599b7c0..5c1edd42e 100644 --- a/metapost/context/base/mp-butt.mpiv +++ b/metapost/context/base/mp-butt.mpiv @@ -75,5 +75,3 @@ def predefinedbutton (expr button_type, button_size, button_linecolor, button_fi enddef ; let some_button = predefinedbutton - -endinput ; diff --git a/metapost/context/base/mp-char.mpii b/metapost/context/base/mp-char.mpii index 788099f2c..5e7a31c50 100644 --- a/metapost/context/base/mp-char.mpii +++ b/metapost/context/base/mp-char.mpii @@ -991,28 +991,16 @@ def end_sub_chart = endgroup ; enddef ; -%D done - -endinput ; - -%D testing - -show_shapes(100) ; - -end - -%D more testing - -show_connections ; - -begin_chart (1,4,5) ; - %clip_chart(1,1,1,2) ; - new_shape (1,1,31) ; - new_shape (1,2,3) ; - new_shape (4,4,5) ; - connect_top_left (1,1,0) (4,4,0) ; - connect_bottom_top (1,2,0) (4,4,0) ; - connect_left_right (1,2,0) (1,1,0) ; -end_chart ; - -end +% show_shapes(100) ; +% +% show_connections ; +% +% begin_chart (1,4,5) ; +% %clip_chart(1,1,1,2) ; +% new_shape (1,1,31) ; +% new_shape (1,2,3) ; +% new_shape (4,4,5) ; +% connect_top_left (1,1,0) (4,4,0) ; +% connect_bottom_top (1,2,0) (4,4,0) ; +% connect_left_right (1,2,0) (1,1,0) ; +% end_chart ; diff --git a/metapost/context/base/mp-core.mpii b/metapost/context/base/mp-core.mpii index 4d28cfd17..c07f0976f 100644 --- a/metapost/context/base/mp-core.mpii +++ b/metapost/context/base/mp-core.mpii @@ -1375,10 +1375,6 @@ def ProcessSyncTask(expr p, c) = fill p withcolor c ; enddef ; -endinput ; - -end - % for Jelle Huisman % % \setupcolors[state=start] diff --git a/metapost/context/base/mp-core.mpiv b/metapost/context/base/mp-core.mpiv index 1297802e9..6613c5703 100644 --- a/metapost/context/base/mp-core.mpiv +++ b/metapost/context/base/mp-core.mpiv @@ -1334,5 +1334,3 @@ enddef ; def ProcessSyncTask(expr p, c) = fill p withcolor c ; enddef ; - -endinput ; diff --git a/metapost/context/base/mp-figs.mpii b/metapost/context/base/mp-figs.mpii index c90dc3971..aecdc07e7 100644 --- a/metapost/context/base/mp-figs.mpii +++ b/metapost/context/base/mp-figs.mpii @@ -45,5 +45,3 @@ let figuredimensions = figuresize ; % for old times sake def naturalfigure(expr name) = externalfigure name xyscaled(figuresize(name)) enddef ; - -endinput diff --git a/metapost/context/base/mp-figs.mpiv b/metapost/context/base/mp-figs.mpiv index c90dc3971..aecdc07e7 100644 --- a/metapost/context/base/mp-figs.mpiv +++ b/metapost/context/base/mp-figs.mpiv @@ -45,5 +45,3 @@ let figuredimensions = figuresize ; % for old times sake def naturalfigure(expr name) = externalfigure name xyscaled(figuresize(name)) enddef ; - -endinput diff --git a/metapost/context/base/mp-form.mpii b/metapost/context/base/mp-form.mpii index 60ea4cac2..d1dac32db 100644 --- a/metapost/context/base/mp-form.mpii +++ b/metapost/context/base/mp-form.mpii @@ -15,31 +15,15 @@ boolean mant_font ; mant_font := true ; % signals graph not to load form -if known mplib : - boolean fmt_loaded ; fmt_loaded := true ; - expandafter endinput -fi ; - -if known fmt_loaded : expandafter endinput fi ; - boolean fmt_loaded ; fmt_loaded := true ; +if known context_form : endinput ; fi ; -if unknown fmt_precision : - numeric fmt_precision ; fmt_precision := 3 ; -fi ; - -if unknown fmt_initialize : - boolean fmt_initialize ; fmt_initialize := true ; -fi ; - -if unknown fmt_separator : - string fmt_separator ; fmt_separator := "%" ; -fi ; - -if unknown fmt_zerocheck : - boolean fmt_zerocheck ; fmt_zerocheck := false ; -fi ; +boolean context_form ; context_form := true ; -boolean fmt_metapost ; fmt_metapost := true ; % == use old method +if unknown fmt_metapost : boolean fmt_metapost ; fmt_metapost := true ; fi ; % == use old method +if unknown fmt_precision : numeric fmt_precision ; fmt_precision := 3 ; fi ; +if unknown fmt_initialize : boolean fmt_initialize ; fmt_initialize := true ; fi ; +if unknown fmt_separator : string fmt_separator ; fmt_separator := "%" ; fi ; +if unknown fmt_zerocheck : boolean fmt_zerocheck ; fmt_zerocheck := false ; fi ; % As said, all clever code is from John, the more stupid % extensions are mine. The following string variables are diff --git a/metapost/context/base/mp-form.mpiv b/metapost/context/base/mp-form.mpiv index 8a7ceac16..07b8087e2 100644 --- a/metapost/context/base/mp-form.mpiv +++ b/metapost/context/base/mp-form.mpiv @@ -14,6 +14,10 @@ % The graph package will be replaced by our own variant using % MetaPost 2 features and textext. +if known context_form : endinput ; fi ; + +boolean context_form ; context_form := true ; + % The following function accept a number or string that can be % converted to a number by \LUA. The first argument is a format % where @ can be used instead of %. The number is typeset in math diff --git a/metapost/context/base/mp-grid.mpii b/metapost/context/base/mp-grid.mpii index bfc8dfed6..c49fbeec2 100644 --- a/metapost/context/base/mp-grid.mpii +++ b/metapost/context/base/mp-grid.mpii @@ -22,7 +22,7 @@ numeric fmt_precision ; fmt_precision := 3 ; boolean fmt_initialize ; fmt_initialize := false ; boolean fmt_zerocheck ; fmt_zerocheck := true ; -if unknown fmt_loaded : input mp-form ; fi ; +if unknown fmt_loaded : input "mp-form.mpii" ; fi ; boolean fmt_pictures ; fmt_pictures := true ; diff --git a/metapost/context/base/mp-grid.mpiv b/metapost/context/base/mp-grid.mpiv index 6cb98466e..e7420e4f6 100644 --- a/metapost/context/base/mp-grid.mpiv +++ b/metapost/context/base/mp-grid.mpiv @@ -22,7 +22,7 @@ numeric fmt_precision ; fmt_precision := 3 ; boolean fmt_initialize ; fmt_initialize := false ; boolean fmt_zerocheck ; fmt_zerocheck := true ; -if unknown fmt_loaded : input mp-form ; fi ; +if unknown fmt_loaded : input "mp-form.mpiv" ; fi ; boolean fmt_pictures ; fmt_pictures := true ; diff --git a/metapost/context/base/mp-grph.mpii b/metapost/context/base/mp-grph.mpii index 18183304c..148d9834a 100644 --- a/metapost/context/base/mp-grph.mpii +++ b/metapost/context/base/mp-grph.mpii @@ -290,28 +290,21 @@ def graphictextdirective text t = graphictextstring := graphictextstring & t & CRLF ; enddef ; -endinput - % example - -input mp-grph ; - - graphictextformat := "context" ; -% graphictextformat := "plain" ; -% graphictextformat := "latex" ; graphictextdirective "\documentclass[]{article}" ; - -beginfig (1) ; - graphictext - "\vbox{\hsize10cm \input tufte }" - scaled 8 - withdrawcolor blue - withfillcolor red - withpen pencircle scaled 2pt ; -endfig ; - -beginfig(1) ; - loadfigure "gracht.mp" rotated 20 ; - loadfigure "koe.mp" number 1 scaled 2 ; -endfig ; - -end +% +% % graphictextformat := "context" ; +% % graphictextformat := "plain" ; +% +% beginfig (1) ; +% graphictext +% "\vbox{\hsize10cm \input tufte }" +% scaled 8 +% withdrawcolor blue +% withfillcolor red +% withpen pencircle scaled 2pt ; +% endfig ; +% +% beginfig(1) ; +% loadfigure "gracht.mp" rotated 20 ; +% loadfigure "koe.mp" number 1 scaled 2 ; +% endfig ; diff --git a/metapost/context/base/mp-grph.mpiv b/metapost/context/base/mp-grph.mpiv index 7291103ec..6e450a92a 100644 --- a/metapost/context/base/mp-grph.mpiv +++ b/metapost/context/base/mp-grph.mpiv @@ -238,22 +238,20 @@ def mfun_finish_graphic_text text x_op_x = endgroup ; enddef ; -endinput - % example - -beginfig (1) ; - graphictext - "\vbox{\hsize10cm \input tufte }" - scaled 8 - withdrawcolor blue - withfillcolor red - withpen pencircle scaled 2pt ; -endfig ; - -beginfig(1) ; - loadfigure "gracht.mp" rotated 20 ; - loadfigure "koe.mp" number 1 scaled 2 ; -endfig ; - -end +% +% beginfig (1) ; +% graphictext +% "\vbox{\hsize10cm \input tufte }" +% scaled 8 +% withdrawcolor blue +% withfillcolor red +% withpen pencircle scaled 2pt ; +% endfig ; +% +% beginfig(1) ; +% loadfigure "gracht.mp" rotated 20 ; +% loadfigure "koe.mp" number 1 scaled 2 ; +% endfig ; +% +% end diff --git a/metapost/context/base/mp-mlib.mpiv b/metapost/context/base/mp-mlib.mpiv index fe27bee47..b0b360cee 100644 --- a/metapost/context/base/mp-mlib.mpiv +++ b/metapost/context/base/mp-mlib.mpiv @@ -246,7 +246,7 @@ vardef thetextext@#(expr p,z) = fi enddef ; -vardef textext@#(expr p) = +vardef textext@#(expr p) = % no draw hers thetextext@#(p,origin) enddef ; @@ -262,6 +262,14 @@ def label = % takes two arguments, contrary to textext that takes one draw thelabel enddef ; +vardef anchored@#(expr p, z) = % beware: no "+ mfun_laboff@#" here (never!) + p + if (mfun_labtype@# >= 10) : + shifted (0,ypart center p) + fi + shifted (z + (mfun_labxf@#*lrcorner p + mfun_labyf@#*ulcorner p + (1-mfun_labxf@#-mfun_labyf@#)*llcorner p)) +enddef ; + let normalinfont = infont ; primarydef str infont name = % nasty hack diff --git a/metapost/context/base/mp-page.mpii b/metapost/context/base/mp-page.mpii index 52afacd74..c7542a5f9 100644 --- a/metapost/context/base/mp-page.mpii +++ b/metapost/context/base/mp-page.mpii @@ -401,6 +401,8 @@ enddef ; def StartPage = + begingroup ; + if PageStateAvailable : LoadPageState ; SwapPageState ; @@ -415,6 +417,8 @@ def StopPage = BoundPageAreas ; + endgroup ; + enddef ; def OverlayBox = @@ -653,5 +657,3 @@ def page_marks_add_number(expr width, height, length, offset, n) = % todo: names setbounds currentpicture to page ; enddef ; - -endinput ; diff --git a/metapost/context/base/mp-page.mpiv b/metapost/context/base/mp-page.mpiv index e9e0be5b0..e33324b0e 100644 --- a/metapost/context/base/mp-page.mpiv +++ b/metapost/context/base/mp-page.mpiv @@ -401,31 +401,77 @@ def SetPageAreas = enddef ; def BoundPageAreas = - - % pickup pencircle scaled 0pt ; - - bboxmargin := 0 ; setbounds currentpicture to Page ; - + % pickup pencircle scaled 0pt ; + bboxmargin := 0 ; setbounds currentpicture to Page ; enddef ; def StartPage = - + begingroup ; if PageStateAvailable : LoadPageState ; SwapPageState ; fi ; - SetPageAreas ; BoundPageAreas ; - enddef ; def StopPage = - BoundPageAreas ; + endgroup ; +enddef ; + +% cover pages + +def BoundCoverAreas = + % todo: add cropmarks + bboxmargin := 0 ; setbounds currentpicture to Paper enlarged PaperBleed ; +enddef ; + +def SetCoverAreas = + + if unknown SpineWidth : + SpineWidth := 8mm ; + fi ; + + if unknown PaperBleed : + PaperBleed := 0 ; + fi ; + + FrontPageWidth := PaperWidth ; + BackPageWidth := PaperWidth ; + PaperWidth := 2 * PaperWidth + SpineWidth ; + + FrontPageHeight := PaperHeight ; + BackPageHeight := PaperHeight ; + PaperHeight := PaperHeight ; + SpineHeight := PaperHeight ; + + path Paper ; Paper := unitsquare xscaled PaperWidth yscaled PaperHeight ; + path Spine ; Spine := unitsquare xscaled SpineWidth yscaled PaperHeight shifted (BackPageWidth,0); + path BackPage ; BackPage := unitsquare xscaled BackPageWidth yscaled PaperHeight ; + path FrontPage ; FrontPage := unitsquare xscaled FrontPageWidth yscaled PaperHeight shifted (BackPageWidth+SpineWidth,0) ; enddef ; + +def StartCover = + begingroup ; + if PageStateAvailable : + LoadPageState ; + % SwapPageState ; + fi ; + SetPageAreas ; + SetCoverAreas ; + BoundCoverAreas ; +enddef ; + +def StopCover = + BoundCoverAreas ; + endgroup ; +enddef ; + +% overlays: + def OverlayBox = (unitsquare xyscaled (OverlayWidth,OverlayHeight)) enddef ; @@ -662,5 +708,3 @@ def page_marks_add_number(expr width, height, length, offset, n) = % todo: names setbounds currentpicture to page ; enddef ; - -endinput ; diff --git a/metapost/context/base/mp-shap.mpii b/metapost/context/base/mp-shap.mpii index a551c4419..291506997 100644 --- a/metapost/context/base/mp-shap.mpii +++ b/metapost/context/base/mp-shap.mpii @@ -204,5 +204,3 @@ enddef ; let drawshape = drawpredefinedshape ; let drawline = drawpredefinedline ; - -endinput ; diff --git a/metapost/context/base/mp-shap.mpiv b/metapost/context/base/mp-shap.mpiv index a551c4419..291506997 100644 --- a/metapost/context/base/mp-shap.mpiv +++ b/metapost/context/base/mp-shap.mpiv @@ -204,5 +204,3 @@ enddef ; let drawshape = drawpredefinedshape ; let drawline = drawpredefinedline ; - -endinput ; diff --git a/metapost/context/base/mp-spec.mpii b/metapost/context/base/mp-spec.mpii index 25e435edb..7cb960524 100644 --- a/metapost/context/base/mp-spec.mpii +++ b/metapost/context/base/mp-spec.mpii @@ -47,7 +47,6 @@ %D for instance shading. More information can be found in %D type {supp-mpe.tex}. -if known mplib : endinput ; fi ; if known context_spec : endinput ; fi ; boolean context_spec ; context_spec := true ; @@ -714,8 +713,6 @@ enddef ; % spotcolor is already scaled -endinput ; - % just an exercise (due to a question by Chof on the context mailing list); scaling of % 'special' colors is not possible and the next solution is incomplete (spot colors, % transparency, etc); watch the the tricky chained macro construction diff --git a/metapost/context/base/mp-step.mpii b/metapost/context/base/mp-step.mpii index ad6f7bde0..a8d0df8e0 100644 --- a/metapost/context/base/mp-step.mpii +++ b/metapost/context/base/mp-step.mpii @@ -166,8 +166,6 @@ vardef get_step_table_line (expr i) = fi enddef ; -endinput - %D The older method let \METAPOST\ do the typesetting. The %D macros needed for that are included here for educational %D purposes. diff --git a/metapost/context/base/mp-tool.mpii b/metapost/context/base/mp-tool.mpii index 7b46c4725..96932d58a 100644 --- a/metapost/context/base/mp-tool.mpii +++ b/metapost/context/base/mp-tool.mpii @@ -2562,7 +2562,3 @@ primarydef p snapped s = fi ; ) p enddef ; - -% done - -endinput ; diff --git a/metapost/context/base/mp-tool.mpiv b/metapost/context/base/mp-tool.mpiv index 04d987c8d..79110e752 100644 --- a/metapost/context/base/mp-tool.mpiv +++ b/metapost/context/base/mp-tool.mpiv @@ -507,7 +507,7 @@ bcircle = origin -- (-.5,0) & (-.5,0) {down} .. (0,-.5) .. {up} (+.5,0) -- c lcircle = origin -- (0,+.5) & (0,+.5) {left} .. (-.5,0) .. {right} (0,-.5) -- cycle ; rcircle = origin -- (0,-.5) & (0,-.5) {right} .. (+.5,0) .. {left} (0,+.5) -- cycle ; -path urtriangle, ultriangle, lltriangle, lrtriangle ; +path urtriangle, ultriangle, lltriangle, lrtriangle ; % watch out: it's contrary to what you expect and starts in the origin urtriangle := origin -- (+.5,0) -- (0,+.5) -- cycle ; ultriangle := origin -- (0,+.5) -- (-.5,0) -- cycle ; @@ -1106,6 +1106,15 @@ enddef ; extra_endfig := extra_endfig & " naturalizepaths ; " ; +%D Noce tracer: + +def drawboundary primary p = + draw p dashed evenly withcolor white ; + draw p dashed oddly withcolor black ; + draw (- llcorner p) withpen pencircle scaled 3 withcolor white ; + draw (- llcorner p) withpen pencircle scaled 1.5 withcolor black ; +enddef ; + %D Also handy: extra_beginfig := extra_beginfig & " truecorners := 0 ; " ; % restores @@ -1793,6 +1802,15 @@ enddef ; def [[ = [ [ enddef ; def [[[ = [ [ [ enddef ; def ]] = ] ] enddef ; def ]]] = ] ] ] enddef ; +let == = = ; + +% added + +picture oddly ; % evenly already defined + +evenly := dashpattern(on 3 off 3) ; +oddly := dashpattern(off 3 on 3) ; + % not perfect, but useful since it removes redundant points. vardef mfun_straightened(expr sign, p) = @@ -1871,9 +1889,9 @@ enddef; % also new -vardef anchored@#(expr p, z) = % maybe use the textext variant - p shifted (z + (labxf@#*lrcorner p + labyf@#*ulcorner p + (1-labxf@#-labyf@#)*llcorner p)) -enddef ; +% vardef anchored@#(expr p, z) = % maybe use the textext variant +% p shifted (z + (labxf@#*lrcorner p + labyf@#*ulcorner p + (1-labxf@#-labyf@#)*llcorner p)) +% enddef ; % epsed(1.2345) @@ -2139,7 +2157,3 @@ primarydef p snapped s = ) p enddef ; - -% done - -endinput ; diff --git a/scripts/context/lua/mtx-tools.lua b/scripts/context/lua/mtx-tools.lua index 905b3aa85..45961a639 100644 --- a/scripts/context/lua/mtx-tools.lua +++ b/scripts/context/lua/mtx-tools.lua @@ -112,7 +112,7 @@ function scripts.tools.dirtoxml() local root = environment.argument('root') or "." local outputfile = environment.argument('output') - local recurse = environment.argument('recurse') + local recurse = environment.argument('recurse') or false local stripname = environment.argument('stripname') local longname = environment.argument('longname') diff --git a/tex/context/base/anch-pgr.mkii b/tex/context/base/anch-pgr.mkii index ebcc3fc69..4ceea844c 100644 --- a/tex/context/base/anch-pgr.mkii +++ b/tex/context/base/anch-pgr.mkii @@ -456,13 +456,6 @@ \defineoverlay[\v!text+1][\positionoverlay{\v!text+1}] \defineoverlay[\v!text+2][\positionoverlay{\v!text+2}] -%D The auxiliary \METAPOST\ macros are defined by default, -%D by saying: - -\startMPextensions - if unknown context_core : input mp-core.mp ; fi ; -\stopMPextensions - %D Some of these macros are pretty clever but too complicated %D to be nice. When things are kind of stable I'll clean up %D this mess. diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 6330ed13b..3edc92b36 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.10.14 22:47} +\newcontextversion{2011.10.17 10:36} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index fb6f9bff5..5d451d3c2 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.10.14 22:47} +\newcontextversion{2011.10.17 10:36} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf index d4c655d2d..f0c4f4aee 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png index d9ac91e85..6dea04295 100644 Binary files a/tex/context/base/context-version.png and b/tex/context/base/context-version.png differ diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 90259fc19..a853a81a6 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.10.14 22:47} +\edef\contextversion{2011.10.17 10:36} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index e20300edf..c2f999216 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.10.14 22:47} +\edef\contextversion{2011.10.17 10:36} %D For those who want to use this: diff --git a/tex/context/base/core-con.mkiv b/tex/context/base/core-con.mkiv index 4d81e8a9c..a62e48487 100644 --- a/tex/context/base/core-con.mkiv +++ b/tex/context/base/core-con.mkiv @@ -396,68 +396,6 @@ %D \getbuffer %D \stoplines -% \newtoks \everycurrentdate -% -% \newsignal\datesignal -% -% \def\dobetweendates -% {\ifdim\lastskip=\datesignal\relax\else -% \unskip\space -% \hskip\datesignal\relax -% \fi} -% -% \def\referraldatepattern{j,mm,dd} % jj,mm,dd changed at januari 1-1-2000 -% -% \def\dodobetweendates -% {\let\betweendates\dobetweendates}% -% -% \def\dodocurrentdate#1% -% {\processallactionsinset[#1] -% [ \v!year=>\betweendates -% \convertnumber\v!year\normalyear, -% yy=>\lasttwodigits\normalyear, -% y=>\convertnumber\v!year\normalyear, -% Y=>\number\normalyear, -% \v!month=>\betweendates -% \month\normalmonth, -% mm=>\twodigits\normalmonth, -% m=>\month\normalmonth, -% M=>\number\normalmonth, -% \v!day=>\betweendates -% \convertnumber\v!day\normalday, -% \v!day+=>\betweendates -% \convertnumber\v!day\normalday -% \ordinal\normalday, -% dd=>\twodigits\normalday, -% dd+=>\convertnumber\v!day{\twodigits\normalday}% -% \ordinal\normalday, -% d=>\convertnumber\v!day\normalday, -% d+=>\convertnumber\v!day\normalday -% \ordinal\normalday, -% d=>\number\normalday, -% \v!weekday=>\betweendates -% \convertnumber\v!day{\dayoftheweek\normalday\normalmonth\normalyear}, -% w=>\convertnumber\v!day{\dayoftheweek\normalday\normalmonth\normalyear}, -% W=>\dayoftheweek\normalday\normalmonth\normalyear, -% \v!referral=>\docomplexcurrentdate\referraldatepattern, -% \v!space=>\unskip\ \hskip\datesignal, -% \ =>\unskip\ \hskip\datesignal, -% \s!default=>, -% \s!unknown=>\unskip\commalistelement -% \hskip\datesignal -% \let\betweendates\dodobetweendates]} -% -% \def\docurrentdate[#1]% -% {\begingroup -% \the\everycurrentdate -% \let\betweendates\dodobetweendates -% \doifsomething{#1}{\edef\currentdatespecification{#1}}% -% \normalexpanded{\dodocurrentdate{\currentdatespecification}}% -% \ifdim\lastskip=\datesignal\relax -% \unskip -% \fi -% \endgroup} - %D \starttabulate[|l|l|] %D \HL %D \NC year \NC (\currentdate[year]) \NC\NR @@ -481,10 +419,10 @@ %D \HL %D \NC referral \NC (\currentdate[referral]) \NC\NR %D \HL -%D \NC day+ \NC (\currentdate[day+]) \NC\NR -%D \NC dd+ \NC (\currentdate[dd+]) \NC\NR -%D \NC d+ \NC (\currentdate[d+]) \NC\NR -%D \NC D+ \NC (\currentdate[D+]) \NC\NR +%D \NC day:mnem \NC (\currentdate[day:mnem]) \NC\NR +%D \NC dd:mnem \NC (\currentdate[dd:mnem]) \NC\NR +%D \NC d:mnem \NC (\currentdate[d:mnem]) \NC\NR +%D \NC D:mnem \NC (\currentdate[D:mnem]) \NC\NR %D \HL %D \stoptabulate %D diff --git a/tex/context/base/file-job.mkvi b/tex/context/base/file-job.mkvi index 6f26d26d7..05915ce7c 100644 --- a/tex/context/base/file-job.mkvi +++ b/tex/context/base/file-job.mkvi @@ -257,4 +257,6 @@ [\c!before=\directsetup{document:start}, \c!after=\directsetup{document:stop}] +%S The document: namespace will be used elsewhere too. + \protect \endinput diff --git a/tex/context/base/font-con.lua b/tex/context/base/font-con.lua index 10cfacfcc..75d90f136 100644 --- a/tex/context/base/font-con.lua +++ b/tex/context/base/font-con.lua @@ -426,7 +426,9 @@ function constructors.scale(tfmdata,specification) end end -- - local sharedkerns = { } + local sharedkerns = { } + -- + -- we can have a dumb mode (basemode without math etc) that skips most -- for unicode, character in next, characters do local chr, description, index, touni diff --git a/tex/context/base/lang-def.mkiv b/tex/context/base/lang-def.mkiv index 3c4721338..8c2bec1cf 100644 --- a/tex/context/base/lang-def.mkiv +++ b/tex/context/base/lang-def.mkiv @@ -568,7 +568,7 @@ \c!rightquote=\rightguillemot, \c!leftquotation=\leftguillemot, \c!rightquotation=\rightguillemot, - \c!date={\v!day+,\v!space,\v!month,\v!space,\v!year}] + \c!date={\v!day:mnem,\v!space,\v!month,\v!space,\v!year}] \installlanguage [\s!es] @@ -667,7 +667,7 @@ \installlanguage [portuguese] [\s!pt] \installlanguage [romanian] [\s!ro] -\defineconversion [\s!fr] [\v!day+] [\frordinaldaynumber] +\defineconversion [\s!fr] [\v!day:mnem] [\frordinaldaynumber] % Vietnamese Language diff --git a/tex/context/base/m-chart.lua b/tex/context/base/m-chart.lua index acb41399e..1545e66c5 100644 --- a/tex/context/base/m-chart.lua +++ b/tex/context/base/m-chart.lua @@ -134,6 +134,9 @@ function commands.flow_start_cell(settings) exits = { }, connections = { }, settings = settings, + x = 1, + y = 1, + name = "", } end @@ -285,10 +288,10 @@ function commands.flow_set_location(str) -- handle include differently else y = tonumber(y) end - temp.x = x - temp.y = y - last_x = x - last_y = y + temp.x = x or 1 + temp.y = y or 1 + last_x = x or last_x + last_y = y or last_y end function commands.flow_set_connection(location,displacement,name) diff --git a/tex/context/base/meta-ini.mkii b/tex/context/base/meta-ini.mkii index e7a7441f1..9780fecfa 100644 --- a/tex/context/base/meta-ini.mkii +++ b/tex/context/base/meta-ini.mkii @@ -33,12 +33,6 @@ \def\@@MPG{@MPG@} -\startMPextensions - if unknown context_tool: input mp-tool; fi; - if unknown context_spec: input mp-spec; fi; - if unknown context_grph: input mp-grph; fi; -\stopMPextensions - %D Since we want lables to follow the document settings, we %D also set the font related variables. @@ -464,9 +458,9 @@ \startMPextensions boolean collapse_data; collapse_data:=true; - def data_mpd_file = "\MPdataMPDfile" enddef ; - def data_mpo_file = "\MPdataMPOfile" enddef ; - def data_mpy_file = "\MPdataMPYfile" enddef ; + def data_mpd_file="\MPdataMPDfile"; enddef ; + def data_mpo_file="\MPdataMPOfile"; enddef ; + def data_mpy_file="\MPdataMPYfile"; enddef ; \stopMPextensions \def\getMPdata diff --git a/tex/context/base/mult-de.mkii b/tex/context/base/mult-de.mkii index 8e54cb3a6..845c2272f 100644 --- a/tex/context/base/mult-de.mkii +++ b/tex/context/base/mult-de.mkii @@ -717,6 +717,7 @@ \setinterfaceconstant{inner}{innen} \setinterfaceconstant{innermargin}{innermargin} \setinterfaceconstant{inputfile}{inputfile} +\setinterfaceconstant{insidesection}{insidesection} \setinterfaceconstant{intent}{intent} \setinterfaceconstant{interaction}{interaktion} \setinterfaceconstant{interlinespace}{zeilenabstande} diff --git a/tex/context/base/mult-def.lua b/tex/context/base/mult-def.lua index f31d511f5..d862b80e5 100644 --- a/tex/context/base/mult-def.lua +++ b/tex/context/base/mult-def.lua @@ -6920,6 +6920,10 @@ return { ["en"]="beforesection", ["nl"]="voorsectie", }, + ["insidesection"]={ + ["en"]="insidesection", + ["nl"]="binnensectie", + }, ["beforehead"]={ ["cs"]="predhlavickou", ["de"]="vorkopf", diff --git a/tex/context/base/mult-en.mkii b/tex/context/base/mult-en.mkii index 54419eb3a..f40bcc096 100644 --- a/tex/context/base/mult-en.mkii +++ b/tex/context/base/mult-en.mkii @@ -717,6 +717,7 @@ \setinterfaceconstant{inner}{inner} \setinterfaceconstant{innermargin}{innermargin} \setinterfaceconstant{inputfile}{inputfile} +\setinterfaceconstant{insidesection}{insidesection} \setinterfaceconstant{intent}{intent} \setinterfaceconstant{interaction}{interaction} \setinterfaceconstant{interlinespace}{interlinespace} diff --git a/tex/context/base/mult-fr.mkii b/tex/context/base/mult-fr.mkii index 89efb4bfb..4ae1731c1 100644 --- a/tex/context/base/mult-fr.mkii +++ b/tex/context/base/mult-fr.mkii @@ -717,6 +717,7 @@ \setinterfaceconstant{inner}{interieur} \setinterfaceconstant{innermargin}{margeinterieure} \setinterfaceconstant{inputfile}{fichierentree} +\setinterfaceconstant{insidesection}{insidesection} \setinterfaceconstant{intent}{intent} \setinterfaceconstant{interaction}{interaction} \setinterfaceconstant{interlinespace}{espaceinterligne} diff --git a/tex/context/base/mult-it.mkii b/tex/context/base/mult-it.mkii index 4acba1e28..8832d288a 100644 --- a/tex/context/base/mult-it.mkii +++ b/tex/context/base/mult-it.mkii @@ -717,6 +717,7 @@ \setinterfaceconstant{inner}{interno} \setinterfaceconstant{innermargin}{margineinterno} \setinterfaceconstant{inputfile}{inputfile} +\setinterfaceconstant{insidesection}{insidesection} \setinterfaceconstant{intent}{intent} \setinterfaceconstant{interaction}{interazione} \setinterfaceconstant{interlinespace}{interlinea} diff --git a/tex/context/base/mult-mps.lua b/tex/context/base/mult-mps.lua index 5a78bce8c..cb2994054 100644 --- a/tex/context/base/mult-mps.lua +++ b/tex/context/base/mult-mps.lua @@ -53,6 +53,7 @@ return { "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "greypart", "rgbcolor", "cmykcolor", "greycolor", "graycolor", "colormodel", "graypart", + "expandafter", }, commands = { "arrowhead", diff --git a/tex/context/base/mult-nl.mkii b/tex/context/base/mult-nl.mkii index 361c30db0..de91ef8b3 100644 --- a/tex/context/base/mult-nl.mkii +++ b/tex/context/base/mult-nl.mkii @@ -717,6 +717,7 @@ \setinterfaceconstant{inner}{binnen} \setinterfaceconstant{innermargin}{binnenmarge} \setinterfaceconstant{inputfile}{inputfile} +\setinterfaceconstant{insidesection}{binnensectie} \setinterfaceconstant{intent}{intent} \setinterfaceconstant{interaction}{interactie} \setinterfaceconstant{interlinespace}{interlinie} diff --git a/tex/context/base/mult-pe.mkii b/tex/context/base/mult-pe.mkii index 0ea8547af..61d5b72c7 100644 --- a/tex/context/base/mult-pe.mkii +++ b/tex/context/base/mult-pe.mkii @@ -717,6 +717,7 @@ \setinterfaceconstant{inner}{داخلی} \setinterfaceconstant{innermargin}{حاشیه‌داخلی} \setinterfaceconstant{inputfile}{پرونده‌ورودی} +\setinterfaceconstant{insidesection}{insidesection} \setinterfaceconstant{intent}{intent} \setinterfaceconstant{interaction}{پانل} \setinterfaceconstant{interlinespace}{فضای‌بین‌خط} diff --git a/tex/context/base/mult-ro.mkii b/tex/context/base/mult-ro.mkii index 47a6cd401..72b4f2366 100644 --- a/tex/context/base/mult-ro.mkii +++ b/tex/context/base/mult-ro.mkii @@ -717,6 +717,7 @@ \setinterfaceconstant{inner}{intern} \setinterfaceconstant{innermargin}{innermargin} \setinterfaceconstant{inputfile}{inputfile} +\setinterfaceconstant{insidesection}{insidesection} \setinterfaceconstant{intent}{intent} \setinterfaceconstant{interaction}{interactiune} \setinterfaceconstant{interlinespace}{spatiereinterliniara} diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex index 51e2cb5a2..a180876a5 100644 --- a/tex/context/base/s-abr-01.tex +++ b/tex/context/base/s-abr-01.tex @@ -179,6 +179,7 @@ \logo [OVF] {ovf} \logo [PASCAL] {Pascal} \logo [PCTEX] {pc\TeX} +\logo [PFB] {pfb} \logo [PDF] {pdf} \logo [PDFETEX] {pdfe\TeX} \logo [PDFTEX] {pdf\TeX} @@ -247,6 +248,7 @@ \logo [TPIC] {tpic} \logo [TPM] {tpm} \logo [TRUETYPE] {TrueType} +\logo [TTC] {ttc} \logo [TTF] {ttf} \logo [TUG] {tug} \logo [TUGBOAT] {Tug\-Boat} diff --git a/tex/context/base/s-fnt-23.mkiv b/tex/context/base/s-fnt-23.mkiv index 5be554d21..17fc5463d 100644 --- a/tex/context/base/s-fnt-23.mkiv +++ b/tex/context/base/s-fnt-23.mkiv @@ -262,8 +262,7 @@ \setupcolors [state=start] -% \continueifinputfile{s-fnt-23.mkiv} -\doifnotmode{demo}{\endinput} +\continueifinputfile{s-fnt-23.mkiv} \starttext diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 8cd12cdb8..54df95bb0 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index 341eb81a4..fd1fc48b5 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/context/base/strc-def.mkiv b/tex/context/base/strc-def.mkiv index dc86da902..d3787ba45 100644 --- a/tex/context/base/strc-def.mkiv +++ b/tex/context/base/strc-def.mkiv @@ -63,7 +63,10 @@ %\c!strut=, %\c!style=, %\c!text=, - %\c!tolerance= + %\c!tolerance=, + %\c!beforesection=\directsetup{document:\currenthead:start}, % these might become defaults i.e. acpect document: namespace + %\c!insidesection=\directsetup{document:\currenthead:inside}, % these might become defaults i.e. acpect document: namespace + %\c!aftersection=\directsetup{document:\currenthead:stop}, % these might become defaults i.e. acpect document: namespace ] % \setupsectionblock[appendix][sectionconversionset=appendix] diff --git a/tex/context/base/strc-doc.lua b/tex/context/base/strc-doc.lua index cee649aa5..dec017d6b 100644 --- a/tex/context/base/strc-doc.lua +++ b/tex/context/base/strc-doc.lua @@ -428,7 +428,12 @@ end -- this one will become: return catcode, d (etc) function sections.structuredata(depth,key,default,honorcatcodetable) -- todo: spec table and then also depth - if not depth or depth == 0 then depth = data.depth end + if depth then + depth = levelmap[depth] or tonumber(depth) + end + if not depth or depth == 0 then + depth = data.depth + end local data = data.status[depth] local d = data for k in gmatch(key,"([^.]+)") do @@ -467,7 +472,12 @@ function sections.structuredata(depth,key,default,honorcatcodetable) -- todo: sp end function sections.userdata(depth,key,default) - if not depth or depth == 0 then depth = data.depth end + if depth then + depth = levelmap[depth] or tonumber(depth) + end + if not depth or depth == 0 then + depth = data.depth + end if depth > 0 then local userdata = data.status[depth] userdata = userdata and userdata.userdata @@ -899,3 +909,6 @@ commands.structureuservariable = function(name) sections.userdata commands.structurecatcodedget = function(name) sections.structuredata(nil,name,nil,true) end commands.structuregivencatcodedget = function(name,catcode) sections.structuredata(nil,name,nil,catcode) end commands.structureautocatcodedget = function(name,catcode) sections.structuredata(nil,name,nil,catcode) end + +commands.namedstructurevariable = function(depth,name) sections.structuredata(depth,name) end +commands.namedstructureuservariable = function(depth,name) sections.userdata (depth,name) end diff --git a/tex/context/base/strc-doc.mkiv b/tex/context/base/strc-doc.mkiv index 7813eb7f8..3b3d50048 100644 --- a/tex/context/base/strc-doc.mkiv +++ b/tex/context/base/strc-doc.mkiv @@ -235,12 +235,17 @@ % \stopchapter % \stoptext -\def\structurenumber {\ctxcommand{structurenumber()}} -\def\structuretitle {\ctxcommand{structuretitle()}} -\def\structurevariable #1{\ctxcommand{structurevariable("#1")}} -\def\structureuservariable #1{\ctxcommand{structureuservariable("#1")}} -\def\structurecatcodedget #1{\ctxcommand{structurecatcodedget("#1")}} % bad name -\def\structuregivencatcodedget#1#2{\ctxcommand{structuregivencatcodedget("#1",\number#2)}} % bad name -\def\structureautocatcodedget #1#2{\ctxcommand{structureautocatcodedget ("#1","#2")}} +% todo: #1 => "#1" ... adapt lua code for name and number + +\def\structurenumber {\ctxcommand{structurenumber()}} +\def\structuretitle {\ctxcommand{structuretitle()}} +\def\structurevariable #1{\ctxcommand{structurevariable("#1")}} +\def\structureuservariable #1{\ctxcommand{structureuservariable("#1")}} +\def\structurecatcodedget #1{\ctxcommand{structurecatcodedget("#1")}} % bad name +\def\structuregivencatcodedget #1#2{\ctxcommand{structuregivencatcodedget("#1",\number#2)}} % bad name +\def\structureautocatcodedget #1#2{\ctxcommand{structureautocatcodedget ("#1","#2")}} + +\def\namedstructurevariable #1#2{\ctxcommand{namedstructurevariable ("#1","#2")}} +\def\namedstructureuservariable#1#2{\ctxcommand{namedstructureuservariable("#1","#2")}} \protect \endinput diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua index 5b2297f0f..41f1718a9 100644 --- a/tex/context/base/strc-lst.lua +++ b/tex/context/base/strc-lst.lua @@ -400,17 +400,23 @@ local function filtercollected(names, criterium, number, collected, forced, nest detail = format("depth: %s, number: %s, numbers: %s, startset: %s",depth,number,(#t>0 and concat(t,".",1,depth)) or "?",#collected) end if number > 0 then - local parent = nested and nested.parent and nested.parent.numberdata.numbers -- so local as well as nested + local pnumbers = nil + local pblock = block + local parent = nested and nested.parent + if parent then + pnumbers = parent.numberdata.numbers or pnumbers -- so local as well as nested + pblock = parent.references.block or pblock + end for i=1,#collected do local v = collected[i] local r = v.references - if r then -- block ? + if r and (not block or not r.block or pblock == r.block) then local sectionnumber = sections.collected[r.section] if sectionnumber then local metadata = v.metadata local cnumbers = sectionnumber.numbers if cnumbers then - if (all or names[metadata.name or false]) and #cnumbers >= depth and matchingtilldepth(depth,cnumbers,parent) then + if (all or names[metadata.name or false]) and #cnumbers >= depth and matchingtilldepth(depth,cnumbers,pnumbers) then nofresult = nofresult + 1 result[nofresult] = v end diff --git a/tex/context/base/strc-lst.mkiv b/tex/context/base/strc-lst.mkiv index d24a8b2f5..eb7b699a2 100644 --- a/tex/context/base/strc-lst.mkiv +++ b/tex/context/base/strc-lst.mkiv @@ -200,6 +200,8 @@ \ctxlua{structures.lists.userdata("\currentlist",\currentlistindex,"#1")}% \dostoptagged} +% we also need named ones (of the current parent) + % \appendtoks % \to \everystructurelist diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua index f83301b4e..6eae3bdcf 100644 --- a/tex/context/base/strc-ref.lua +++ b/tex/context/base/strc-ref.lua @@ -1236,7 +1236,7 @@ local function identify_inner_or_outer(set,var,i) -- here we fall back on product data local inner = var.inner if inner and inner ~= "" then - local v = identify_inner(set,copytable(var),prefix,collected,derived,tobesaved) + local v = identify_inner(set,copytable(var),set.prefix,collected,derived,tobesaved) if v.i and not v.error then v.kind = "inner" -- check this if trace_identifying then @@ -1312,6 +1312,21 @@ local function identify_inner_or_outer(set,var,i) return var end +-- local function identify_inner_or_outer(set,var,i) +-- -- we might consider first checking with a prefix prepended and then without +-- -- which is better for fig:oeps +-- local var = do_identify_inner_or_outer(set,var,i) +-- if var.error then +-- local prefix = set.prefix +-- if prefix and prefix ~= "" then +-- var.inner = prefix .. ':' .. var.inner +-- var.error = nil +-- return do_identify_inner_or_outer(set,var,i) +-- end +-- end +-- return var +-- end + local function identify_inner_component(set,var,i) -- we're in a product (maybe ignore when same as component) local component = var.component diff --git a/tex/context/base/strc-sec.mkiv b/tex/context/base/strc-sec.mkiv index d2836d6eb..06df1ae57 100644 --- a/tex/context/base/strc-sec.mkiv +++ b/tex/context/base/strc-sec.mkiv @@ -50,7 +50,7 @@ \def\getsomestructurenumber #1#2{\ctxlua{structures.sections.getnumber(#1,"#2")}} % level, what \def\getfullstructurenumber #1{\ctxlua{structures.sections.fullnumber(#1)}} % level \def\getsomefullstructurenumber#1#2{\ctxlua{structures.sections.fullnumber(#1,"#2")}} -\def\getspecificstructuretitle #1{\ctxlua{structures.sections.structuredata(#1,"titledata.title",nil,"\headparameter\s!catcodes")}}% +\def\getspecificstructuretitle #1{\ctxlua{structures.sections.structuredata("#1","titledata.title",nil,"\headparameter\s!catcodes")}}% % structure heads (like \startchapter) @@ -77,7 +77,7 @@ \let\currentheadparent\currentheaddefault \fi\fi \normalexpanded {% - \setheadparameter{\c!label }{\currenthead}% + \setheadparameter{\c!label}{\currenthead}% \setheadparameter{\c!coupling}{\currenthead}% \setheadparameter{\s!parent}{\??nh\currentheadparent}% \definemarking[\currenthead] [\currentheadsection]% @@ -122,7 +122,7 @@ \appendtoks % \setevalue{\e!next \currenthead}{\donexthead [\currenthead]}% \setevalue{\e!start\currenthead}{\dostarthead[\currenthead]}% - \setevalue{\e!stop \currenthead}{\dostophead[\currenthead]}% + \setevalue{\e!stop \currenthead}{\dostophead [\currenthead]}% \to \everydefinehead \appendtoks @@ -257,9 +257,10 @@ {\setfalse\currentstructureown %\globalpushmacro\currenthead % this does not work out well \xdef\currenthead{#1}% - \headparameter\c!beforesection + \headparameter\c!beforesection % beware, no users vars set yet \the\everybeforehead - \dohandlehead{#1}{#2}{#3}} % name -- -- -- userdata (we might move the tagged to here) + \dohandlehead{#1}{#2}{#3}% name -- -- -- userdata (we might move the tagged to here) + \headparameter\c!insidesection} \unexpanded\def\dostophead[#1]% {\dostoptagged\dostoptagged diff --git a/tex/context/interface/keys-cs.xml b/tex/context/interface/keys-cs.xml index e2e3b985f..924631fe4 100644 --- a/tex/context/interface/keys-cs.xml +++ b/tex/context/interface/keys-cs.xml @@ -723,6 +723,7 @@ + diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml index eb835dd40..1e016113e 100644 --- a/tex/context/interface/keys-de.xml +++ b/tex/context/interface/keys-de.xml @@ -723,6 +723,7 @@ + diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml index 6dc425917..3caeac551 100644 --- a/tex/context/interface/keys-en.xml +++ b/tex/context/interface/keys-en.xml @@ -723,6 +723,7 @@ + diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml index 1c5850603..13e301fb5 100644 --- a/tex/context/interface/keys-fr.xml +++ b/tex/context/interface/keys-fr.xml @@ -723,6 +723,7 @@ + diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml index d8b685e89..a60d20e20 100644 --- a/tex/context/interface/keys-it.xml +++ b/tex/context/interface/keys-it.xml @@ -723,6 +723,7 @@ + diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml index 528446083..4968ee465 100644 --- a/tex/context/interface/keys-nl.xml +++ b/tex/context/interface/keys-nl.xml @@ -723,6 +723,7 @@ + diff --git a/tex/context/interface/keys-pe.xml b/tex/context/interface/keys-pe.xml index d0123485e..867198ff4 100644 --- a/tex/context/interface/keys-pe.xml +++ b/tex/context/interface/keys-pe.xml @@ -723,6 +723,7 @@ + diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml index eb18cef07..4c855cc5e 100644 --- a/tex/context/interface/keys-ro.xml +++ b/tex/context/interface/keys-ro.xml @@ -723,6 +723,7 @@ + diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 5b44a6e0c..be7ae91a6 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 10/14/11 22:47:14 +-- merge date : 10/17/11 10:36:04 do -- begin closure to overcome local limits and interference @@ -3589,7 +3589,9 @@ function constructors.scale(tfmdata,specification) end end -- - local sharedkerns = { } + local sharedkerns = { } + -- + -- we can have a dumb mode (basemode without math etc) that skips most -- for unicode, character in next, characters do local chr, description, index, touni -- cgit v1.2.3