From 7874dbe9834f98579d88719fc4fbe3a67c042492 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Sun, 31 Jan 2016 12:15:06 +0100 Subject: 2016-01-31 11:45:00 --- tex/context/base/context-version.pdf | Bin 4175 -> 4177 bytes tex/context/base/mkiv/buff-ver.lua | 49 ++++- tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/status-files.pdf | Bin 9092 -> 9117 bytes tex/context/base/mkiv/status-lua.pdf | Bin 270265 -> 270266 bytes tex/context/base/mkiv/strc-flt.mkvi | 8 +- tex/context/base/mkiv/syst-ini.mkiv | 10 +- tex/context/interface/common/i-en-xml.xml | 216 ++++++++++----------- tex/context/modules/mkiv/x-set-11.mkiv | 152 +++++++++------ tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 11 files changed, 264 insertions(+), 177 deletions(-) diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf index 04f9a3448..26ee303c9 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/mkiv/buff-ver.lua b/tex/context/base/mkiv/buff-ver.lua index 0168c551d..448d1a60c 100644 --- a/tex/context/base/mkiv/buff-ver.lua +++ b/tex/context/base/mkiv/buff-ver.lua @@ -627,6 +627,17 @@ local function getstrip(lines,first,last) return first, last, last - first + 1 end +-- we look for text (todo): +-- +-- "foo" : start after line with "foo" +-- "=" : ignore first blob +-- "=foo" : start at "foo" +-- "!foo" : maybe a not "foo" + +-- % - # lines start a comment + +local comment = "^[%%%-#]" + local function getrange(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere local noflines = #lines local first = first or 1 @@ -634,7 +645,7 @@ local function getrange(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere if last < 0 then last = noflines + last end - local what = settings_to_array(range) + local what = settings_to_array(range) -- maybe also n:m local r_first = what[1] local r_last = what[2] local f = tonumber(r_first) @@ -644,11 +655,26 @@ local function getrange(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere if f > first then first = f end - else + elseif r_first == "=" then for i=first,last do - if find(lines[i],r_first) then + if find(lines[i],comment) then first = i + 1 + else + break + end + end + elseif r_first ~= "" then + local exact, r_first = match(r_first,"^([=]?)(.*)") + for i=first,last do + if find(lines[i],r_first) then + if exact == "=" then + first = i + else + first = i + 1 + end break + else + first = i end end end @@ -664,11 +690,24 @@ local function getrange(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere if l < last then last = l end - else + elseif r_first == "=" then + for i=first,last do + if find(lines[i],comment) then + break + else + last = i + end + end + elseif r_last ~= "" then + local exact, r_last = match(r_last,"^([=]?)(.*)") for i=first,last do if find(lines[i],r_last) then - last = i - 1 + if exact == "=" then + last = i + end break + else + last = i end end end diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index e9dddbb0f..9edb260fc 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2016.01.29 19:00} +\newcontextversion{2016.01.31 11:42} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 727363db8..cd310cd07 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2016.01.29 19:00} +\edef\contextversion{2016.01.31 11:42} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index 35df55af7..5c70adcd8 100644 Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf index 8d31b4caa..2fde12e0f 100644 Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ diff --git a/tex/context/base/mkiv/strc-flt.mkvi b/tex/context/base/mkiv/strc-flt.mkvi index fb621c997..48f264319 100644 --- a/tex/context/base/mkiv/strc-flt.mkvi +++ b/tex/context/base/mkiv/strc-flt.mkvi @@ -1913,13 +1913,19 @@ % these could be \??floatpreparesidecaption +% \setupfloat[figure][location=left] +% \setupcaption[figure][width=max] +% +% \placefigure{my figure caption my figure caption}{\framed[width=4cm,height=1cm]{}} \input tufte +% \placefigure{my figure caption} {\framed[width=4cm,height=1cm]{}} \input tufte + \def\strc_floats_prepare_side_caption_max {\setbox\b_strc_floats_caption\vbox {\strc_floats_caption_set_align \hsize\wd\b_strc_floats_content \strc_floats_make_complete_caption}} -\def\strc_floats_prepare_side_caption_fit +\def\strc_floats_prepare_side_caption_fit % or center when smaller {\ifdim\wd\b_strc_floats_caption>\wd\b_strc_floats_content\relax \setbox\b_strc_floats_caption\vbox {\forgetall % needed? diff --git a/tex/context/base/mkiv/syst-ini.mkiv b/tex/context/base/mkiv/syst-ini.mkiv index 37ffc5768..a99f6f0da 100644 --- a/tex/context/base/mkiv/syst-ini.mkiv +++ b/tex/context/base/mkiv/syst-ini.mkiv @@ -452,17 +452,17 @@ %D Some expected plain variants follow. We don't reuse registers because we %D don't want clashes. -\newdimen\p@ \p@ \onepoint -\newcount\m@ne \m@ne \minusone -\newdimen\z@ \z@ \zeropoint +\let \p@ \onepoint +\let \m@ne \minusone +\let \z@ \zeropoint \let \@ne \plusone \let \tw@ \plustwo \let \thr@@ \plusthree \let \sixt@@n \plussixteen \let \@cclv \pluscclv \let \@cclvi \pluscclvi -\newbox \voidb@x -\newtoks \toks@ +\let \voidb@x \voidbox +\newtoks \toks@ % \scratchtoks %D We define \type {\newif} a la plain \TEX, but will redefine it later. As %D Knuth says: diff --git a/tex/context/interface/common/i-en-xml.xml b/tex/context/interface/common/i-en-xml.xml index 441ff07d2..f37a15976 100644 --- a/tex/context/interface/common/i-en-xml.xml +++ b/tex/context/interface/common/i-en-xml.xml @@ -5,25 +5,25 @@ - + - + - - + + - + - - + + @@ -32,7 +32,7 @@ - + @@ -109,14 +109,14 @@ - + - + @@ -129,30 +129,30 @@ - + - + - - - + + + - + @@ -187,70 +187,70 @@ - + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + @@ -273,22 +273,22 @@ - + - - + + - + @@ -297,30 +297,30 @@ - + - - + + - + - - + + @@ -344,103 +344,103 @@ - + - - - + + + - + - - + + - - + + - + - + - + - + - - + + - - + + - - + + - - + + - - - + + + - - - + + + @@ -449,15 +449,15 @@ - - + + - + @@ -533,96 +533,96 @@ - - + + - - + + - - + + - - + + - + - - - + + + - - - + + + - - + + - + - + - + - + - + @@ -631,7 +631,7 @@ - + @@ -671,13 +671,13 @@ - + - + @@ -685,15 +685,15 @@ - - + + - - + + diff --git a/tex/context/modules/mkiv/x-set-11.mkiv b/tex/context/modules/mkiv/x-set-11.mkiv index 3e9dfed8c..e2de3e9b8 100644 --- a/tex/context/modules/mkiv/x-set-11.mkiv +++ b/tex/context/modules/mkiv/x-set-11.mkiv @@ -628,18 +628,6 @@ \stopluacode -% \startxmlsetups xml:setups:basics -% \xmlinclude{#1}{include}{filename}% -% \xmlsetsetup {#1} {*} {-} -% \xmlsetsetup {#1} { -% sequence|string|variable|assignments|keywords|content|displaymath|index|math|argument| -% nothing|file|position|reference|csname|destination|triplet|word| -% resolve|define| -% parameter|constant|inherit|parameter -% } {xml:setups:*} -% \xmlfunction{#1}{setups_define} -% \stopxmlsetups - \startxmlsetups xml:setups:basics \xmlinclude{#1}{include}{filename}% \xmlsetsetup {#1} {*} {xml:setups:*} @@ -767,7 +755,7 @@ \enablemode[setups-pass-one]% \hskip.5em\unknown\hskip.5em \doif {\xmlatt{#1}{generated}} {yes} { - \bssl + \ttbs } \letterbackslash \doifsomethingelse {\xmlatt{#1}{end}} { @@ -902,7 +890,6 @@ \startxmlsetups xml:setups:content \showSETUPcomponent{#1}{content} {content} \stopxmlsetups \startxmlsetups xml:setups:displaymath \showSETUPcomponent{#1}{displaymath}{display math}\stopxmlsetups -\startxmlsetups xml:setups:argument \showSETUPcomponent{#1}{argument} {argument} \stopxmlsetups \startxmlsetups xml:setups:index \showSETUPcomponent{#1}{index} {index} \stopxmlsetups \startxmlsetups xml:setups:math \showSETUPcomponent{#1}{math} {math} \stopxmlsetups \startxmlsetups xml:setups:nothing \showSETUPcomponent{#1}{nothing} {nothing} \stopxmlsetups @@ -913,6 +900,13 @@ \startxmlsetups xml:setups:destination \showSETUPcomponent{#1}{destination}{destination} \stopxmlsetups \startxmlsetups xml:setups:triplet \showSETUPcomponent{#1}{triplet} {triplet} \stopxmlsetups \startxmlsetups xml:setups:word \showSETUPcomponent{#1}{word} {word} \stopxmlsetups +\startxmlsetups xml:setups:template \showSETUPcomponent{#1}{template} {template} \stopxmlsetups +\startxmlsetups xml:setups:angles \showSETUPcomponent{#1}{angles} {angles} \stopxmlsetups +\startxmlsetups xml:setups:apply \showSETUPcomponent{#1}{apply} {apply} \stopxmlsetups +\startxmlsetups xml:setups:twowords \showSETUPcomponent{#1}{twowords} {twowords} \stopxmlsetups +\startxmlsetups xml:setups:threewords \showSETUPcomponent{#1}{threewords} {threewords} \stopxmlsetups +\startxmlsetups xml:setups:text \showSETUPcomponent{#1}{text} {text} \stopxmlsetups +\startxmlsetups xml:setups:to \showSETUPcomponent{#1}{to} {to} \stopxmlsetups \unexpanded\def\showSETUPcomponent#1#2#3% {\doifelsemode{setups-pass-one} @@ -1108,15 +1102,10 @@ \c!setup!definereserved {cd:false} {\c!setup!internal!{\getmessage{setup}{false}}} \c!setup!definereserved {cd:category} {\c!setup!internal!{\getmessage{setup}{category}}} -\c!setup!definereserved {cd:noargument} {\c!setup!command! {\texescape}} -\c!setup!definereserved {cd:oneargument} {\c!setup!command! {\texescape\texthash1}} -\c!setup!definereserved {cd:twoarguments} {\c!setup!command! {\texescape\texthash1\texthash2}} -\c!setup!definereserved {cd:threearguments} {\c!setup!command! {\texescape\texthash1\texthash2\texthash3}} - -\c!setup!definereserved {cd:noargumentwrapped} {\c!setup!command! {\texescape...}} -\c!setup!definereserved {cd:oneargumentwrapped} {\c!setup!command! {\texescape...\texthash1}} -\c!setup!definereserved {cd:twoargumentswrapped} {\c!setup!command! {\texescape...\texthash1\texthash2}} -\c!setup!definereserved {cd:threeargumentswrapped} {\c!setup!command! {\texescape...\texthash1\texthash2\texthash3}} +%c!setup!definereserved {cd:noargument} {\c!setup!command! {}} +\c!setup!definereserved {cd:oneargument} {\c!setup!command! {\texthash1}} +\c!setup!definereserved {cd:twoarguments} {\c!setup!command! {\texthash1\texthash2}} +\c!setup!definereserved {cd:threearguments} {\c!setup!command! {\texthash1\texthash2\texthash3}} \c!setup!definereserved {cd:sign} {[-+]} @@ -1129,7 +1118,7 @@ {\doifelse{\xmlatt{#1}{list}}{yes}{#3}{#2}}% \setbox2=\hbox to \wd0 {\hss - \raise\exheight\hbox + \raise1.25\exheight\hbox {\tx\ifcase\maximumSETUPargument\relax \or*\else\currentSETUPargument \fi}% @@ -1167,41 +1156,94 @@ \fi \hss}} -\unexpanded\def\showSETUPassignment#1% - {\ifcase\kindofsetup - \showSETUPline{[.=.]}% - \else - \showSETUP{#1} - {[.=.]} - {[..,.=.,..]}% - \fi} - -\unexpanded\def\showSETUPkeyword#1% - {\ifcase\kindofsetup - \showSETUPline{[...]}% - \else - \showSETUP{#1} - {[...]} - {[...,...]}% - \fi} - -\unexpanded\def\showSETUPargument#1% - {\ifcase\kindofsetup - \showSETUPline{% - \letterleftbrace - \xmlfilter{#1}{/cd:constant/command(xml:setups:constant:value)}% always one - \letterrightbrace - } - \else - \showSETUP{#1} - {\letterleftbrace..\letterrightbrace} - {\letterleftbrace..,...,..\letterrightbrace}% - \fi} +% assignments + +\xmlmapvalue {setups:assignment} {braces} {\showSETUPassignmentbraces} +\xmlmapvalue {setups:assignment} {brackets} {\showSETUPassignmentbrackets} + +\starttexdefinition unexpanded showSETUPassignmentbraces #1 + \ifcase\kindofsetup + \showSETUPline{\letterleftbrace.=.\letterrightbrace} + \else + \showSETUP{#1} + {\letterleftbrace.=.\letterrightbrace} + {\letterleftbrace.=.,.=.\letterrightbrace} + \fi +\stoptexdefinition + +\starttexdefinition unexpanded showSETUPassignmentbrackets #1 + \ifcase\kindofsetup + \showSETUPline{[.=.]} + \else + \showSETUP{#1} + {[.=.]} + {[.=.,.=.]} + \fi +\stoptexdefinition + +\starttexdefinition unexpanded showSETUPassignment #1 + \xmlvalue + {setups:assignment} + {\xmlattdef{#1}{delimiters}{brackets}} + {\showSETUPkeywordbrackets} + {#1} +\stoptexdefinition + +% we could also add specifying separatos (default comma) but let's do +% this stepwise + +% keywords + +\xmlmapvalue {setups:keyword} {braces} {\showSETUPkeywordbraces} +\xmlmapvalue {setups:keyword} {brackets} {\showSETUPkeywordbrackets} + +\starttexdefinition unexpanded showSETUPkeywordbraces #1 + \ifcase\kindofsetup + \showSETUPline{\letterleftbrace...\letterrightbrace} + \else + \showSETUP{#1} + {\letterleftbrace...\letterrightbrace} + {\letterleftbrace...,...\letterrightbrace} + \fi +\stoptexdefinition + +\starttexdefinition unexpanded showSETUPkeywordbrackets #1 + \ifcase\kindofsetup + \showSETUPline{[...]} + \else + \showSETUP{#1} + {[...]} + {[...,...]} + \fi +\stoptexdefinition + +\starttexdefinition unexpanded showSETUPkeyword #1 + \xmlvalue + {setups:keyword} + {\xmlattdef{#1}{delimiters}{brackets}} + {\showSETUPkeywordbrackets} + {#1} +\stoptexdefinition + +% arguments + +% \unexpanded\def\showSETUPargument#1% +% {\ifcase\kindofsetup +% \showSETUPline{% +% \letterleftbrace +% \xmlfilter{#1}{/cd:constant/command(xml:setups:constant:value)}% always one +% \letterrightbrace +% } +% \else +% \showSETUP{#1} +% {\letterleftbrace..\letterrightbrace} +% {\letterleftbrace..,...,..\letterrightbrace}% +% \fi} \unexpanded\def\showSETUPdisplaymath#1% {\showSETUP{#1} {\letterdollar\letterdollar...\letterdollar\letterdollar} - {\letterdollar\letterdollar...\$\$}} + {\letterdollar\letterdollar...\letterdollar\letterdollar}} \unexpanded\def\showSETUPindex#1% {\showSETUP{#1} diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 836470ca2..ba99dcce3 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 01/29/16 19:00:08 +-- merge date : 01/31/16 11:42:23 do -- begin closure to overcome local limits and interference -- cgit v1.2.3