From 3d9b3d2671f2e3f7f0b77099ecd5fbf677400cf4 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 20 Jul 2012 00:58:00 +0200 Subject: beta 2012.07.20 00:58 --- tex/context/base/bibl-bib.mkiv | 2 +- tex/context/base/bibl-tra.mkiv | 2 +- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4083 -> 4085 bytes tex/context/base/context-version.png | Bin 106343 -> 106594 bytes tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/page-flt.lua | 14 ++++++----- tex/context/base/page-set.mkiv | 3 +++ tex/context/base/status-files.pdf | Bin 24339 -> 24349 bytes tex/context/base/status-lua.pdf | Bin 184336 -> 184338 bytes tex/context/base/strc-flt.mkvi | 10 ++++---- tex/context/base/strc-lst.lua | 1 - tex/context/base/strc-lst.mkvi | 12 ++++----- tex/context/base/syst-aux.mkiv | 26 ++++++++++---------- tex/context/base/tabl-xtb.mkvi | 27 +++++++++++++++------ tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 18 files changed, 62 insertions(+), 45 deletions(-) diff --git a/tex/context/base/bibl-bib.mkiv b/tex/context/base/bibl-bib.mkiv index 56007d21c..7ca6799cf 100644 --- a/tex/context/base/bibl-bib.mkiv +++ b/tex/context/base/bibl-bib.mkiv @@ -626,7 +626,7 @@ \doifelse{\bibtexpublicationsparameter\c!method}\v!local {\ctxlua{bibtex.hacks.reset(1)}}% function can take method {\ctxlua{bibtex.hacks.reset(2)}}% - \doplacestructurelist + \strc_lists_place_current {\currentbibtexsession} {\currentbibtexcriterium} {\namedlistparameter\currentbibtexsession\c!number}% diff --git a/tex/context/base/bibl-tra.mkiv b/tex/context/base/bibl-tra.mkiv index d4cb71166..08d8eb6fe 100644 --- a/tex/context/base/bibl-tra.mkiv +++ b/tex/context/base/bibl-tra.mkiv @@ -755,7 +755,7 @@ \ctxlua{bibtex.hacks.filterall()}} {\doif{\listparameter\c!criterium}\v!cite {\setuplist[pubs][\c!criterium=\v!here]}% - \doplacestructurelist + \strc_lists_place_current {pubs}% {\listparameter\c!criterium}% {\listparameter\c!number}% diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 4307f908b..545963860 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{2012.07.19 22:16} +\newcontextversion{2012.07.20 00:58} %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 0c5a4f121..754b48578 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{2012.07.19 22:16} +\newcontextversion{2012.07.20 00:58} %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 f7e9cc638..58f649c2b 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 2ec566803..5192af42d 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 e3aaf557e..b6fac744d 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{2012.07.19 22:16} +\edef\contextversion{2012.07.20 00:58} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index f79983667..63bd13e3a 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -25,7 +25,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2012.07.19 22:16} +\edef\contextversion{2012.07.20 00:58} %D For those who want to use this: diff --git a/tex/context/base/page-flt.lua b/tex/context/base/page-flt.lua index ecd7004ae..c383380fb 100644 --- a/tex/context/base/page-flt.lua +++ b/tex/context/base/page-flt.lua @@ -243,11 +243,10 @@ local label = P(":") * C((1-S(",*: "))^0) local pattern = method * ( label * position + C("") * position - + label + + label * C("") * C("") + C("") * C("") * C("") ) + C("") * C("") * C("") * C("") - -- inspect { lpegmatch(pattern,"somewhere:blabla,crap") } -- inspect { lpegmatch(pattern,"somewhere:1*2") } -- inspect { lpegmatch(pattern,"somewhere:blabla:1*2") } @@ -262,6 +261,9 @@ end -- interface +local context = context +local setvalue = context.setvalue + commands.flushfloat = floats.flush commands.savefloat = floats.save commands.resavefloat = floats.resave @@ -278,8 +280,8 @@ function commands.doifelsesavedfloat(...) commands.doifelse(floats.nofstacked(.. function commands.analysefloatmethod(str) local method, label, row, column = floats.analysemethod(str) - context.setvalue("floatmethod",method) - context.setvalue("floatlabel", label ) - context.setvalue("floatrow", row ) - context.setvalue("floatcolumn",column) + setvalue("floatmethod",method) + setvalue("floatlabel", label ) + setvalue("floatrow", row ) + setvalue("floatcolumn",column) end diff --git a/tex/context/base/page-set.mkiv b/tex/context/base/page-set.mkiv index 58ec2eb14..fe99080dd 100644 --- a/tex/context/base/page-set.mkiv +++ b/tex/context/base/page-set.mkiv @@ -1019,6 +1019,9 @@ \fi}% \fi} +\let\preferedcolumn\empty +\let\preferedrow \empty + \def\OTRSETsetpreferedcolumnslot#1#2% {\doifsomething{#1}{\edef\preferedcolumn{#1}}% \doifsomething{#2}{\edef\preferedrow {#2}}} diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 889326aeb..8cbe8b533 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 6520200b5..0459fbe75 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-flt.mkvi b/tex/context/base/strc-flt.mkvi index ea0036e6b..c5399fa5b 100644 --- a/tex/context/base/strc-flt.mkvi +++ b/tex/context/base/strc-flt.mkvi @@ -1879,11 +1879,11 @@ \installcorenamespace{floatmethods} -\let\floatmethod \empty -\let\floatlabel \empty -\let\floatcolumn \empty -\let\floatrow \empty -\let\forcedfloatmethod\empty +\let\floatmethod \empty % set by lua +\let\floatlabel \empty % set by lua +\let\floatcolumn \empty % set by lua +\let\floatrow \empty % set by lua +\let\forcedfloatmethod\empty % set by lua \def\setfloatmethodvariables#1% \floatmethod \floatlabel \floatrow \floatcolumn {\ctxcommand{analysefloatmethod("#1")}} diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua index 4666738d5..424e9e05b 100644 --- a/tex/context/base/strc-lst.lua +++ b/tex/context/base/strc-lst.lua @@ -353,7 +353,6 @@ local function filtercollected(names, criterium, number, collected, forced, nest local cnumbers = sectionnumber.numbers local metadata = v.metadata if cnumbers then ---~ print(#cnumbers, depth, concat(cnumbers)) if metadata and not metadata.nolist and (all or names[metadata.name or false]) and #cnumbers >= depth then local ok = true for d=1,depth do diff --git a/tex/context/base/strc-lst.mkvi b/tex/context/base/strc-lst.mkvi index 049051731..ecec2f699 100644 --- a/tex/context/base/strc-lst.mkvi +++ b/tex/context/base/strc-lst.mkvi @@ -241,7 +241,7 @@ \setupcurrentlist[#settings]% \the\everystructurelist % \doif{\listparameter\c!coupling}\v!on{\startlistreferences{#tag}}% - \doplacestructurelist % maybe inline + \strc_lists_place_current % maybe inline {#list}% {\listparameter\c!criterium}% {\listparameter\c!number}% @@ -395,22 +395,22 @@ % TODO: pass extra tag name (contents, figures, bibliography ...) -\unexpanded\def\doplacestructurelist#list#criterium#number#extras#order% beware, not a user command +\unexpanded\def\strc_lists_place_current#list#criterium#number#extras#order% beware, not a user command {\dostarttagged\t!list\empty \ctxcommand{processlist{ names = "#list", criterium = "#criterium", - number = "\number#number", + number = "#number", extras = "#extras", order = "#order" }}% \dostoptagged} -\unexpanded\def\doanalyzestructurelist#list#criterium#number% +\unexpanded\def\strc_lists_analyze#list#criterium#number% {\ctxcommand{analyzelist{ names = "#list", criterium = "#criterium", - number = "\number#number" + number = "#number" }}} \def\firststructureelementinlist#list% @@ -1282,7 +1282,7 @@ \let\listlength\!!zerocount \else \setupcurrentlist[#settings]% - \doanalyzestructurelist{#list}{\listparameter\c!criterium}{\listparameter\c!number}% + \strc_lists_analyze{#list}{\listparameter\c!criterium}{\listparameter\c!number}% \normalexpanded{\endgroup\noexpand\edef\noexpand\listlength{\structurelistsize}}% \fi \strc_lists_set_mode} diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv index bc75789bd..07fa7c7ac 100644 --- a/tex/context/base/syst-aux.mkiv +++ b/tex/context/base/syst-aux.mkiv @@ -5163,7 +5163,7 @@ %D tokens per call. Anyone familiar with the not||values %D ones, can derive their meaning from the definitions. -\def\doifvalue#1#2% +\unexpanded\def\doifvalue#1#2% {\edef\m_syst_string_one{\csname#1\endcsname}% \edef\m_syst_string_two{#2}% \ifx\m_syst_string_one\m_syst_string_two @@ -5172,7 +5172,7 @@ \expandafter\gobbleoneargument \fi} -\def\doifnotvalue#1#2% +\unexpanded\def\doifnotvalue#1#2% {\edef\m_syst_string_one{\csname#1\endcsname}% \edef\m_syst_string_two{#2}% \ifx\m_syst_string_one\m_syst_string_two @@ -5181,7 +5181,7 @@ \expandafter\firstofoneargument \fi} -\def\doifelsevalue#1#2% +\unexpanded\def\doifelsevalue#1#2% {\edef\m_syst_string_one{\csname#1\endcsname}% \edef\m_syst_string_two{#2}% \ifx\m_syst_string_one\m_syst_string_two @@ -5190,7 +5190,7 @@ \expandafter\secondoftwoarguments \fi} -\def\doifnothing#1% +\unexpanded\def\doifnothing#1% {\edef\m_syst_string_one{#1}% \ifx\m_syst_string_one\empty \expandafter\firstofoneargument @@ -5198,7 +5198,7 @@ \expandafter\gobbleoneargument \fi} -\def\doifsomething#1% +\unexpanded\def\doifsomething#1% {\edef\m_syst_string_one{#1}% \ifx\m_syst_string_one\empty \expandafter\gobbleoneargument @@ -5206,7 +5206,7 @@ \expandafter\firstofoneargument \fi} -\def\doifelsenothing#1% +\unexpanded\def\doifelsenothing#1% {\edef\m_syst_string_one{#1}% \ifx\m_syst_string_one\empty \expandafter\firstoftwoarguments @@ -5214,7 +5214,7 @@ \expandafter\secondoftwoarguments \fi} -\def\doifsomethingelse#1% +\unexpanded\def\doifsomethingelse#1% {\edef\m_syst_string_one{#1}% \ifx\m_syst_string_one\empty \expandafter\secondoftwoarguments @@ -5222,7 +5222,7 @@ \expandafter\firstoftwoarguments \fi} -\def\doifvaluenothing#1% +\unexpanded\def\doifvaluenothing#1% {\edef\m_syst_string_one{\csname#1\endcsname}% \ifx\m_syst_string_one\empty \expandafter\firstofoneargument @@ -5230,7 +5230,7 @@ \expandafter\gobbleoneargument \fi} -\def\doifvaluesomething#1% +\unexpanded\def\doifvaluesomething#1% {\edef\m_syst_string_one{\csname#1\endcsname}% \ifx\m_syst_string_one\empty \expandafter\gobbleoneargument @@ -5238,7 +5238,7 @@ \expandafter\firstofoneargument \fi} -\def\doifelsevaluenothing#1% +\unexpanded\def\doifelsevaluenothing#1% {\edef\m_syst_string_one{\csname#1\endcsname}% \ifx\m_syst_string_one\empty \expandafter\firstoftwoarguments @@ -5287,9 +5287,9 @@ \processcommalist[#3]\syst_helpers_do_common_check_all \ifdone\expandafter#1\else\expandafter#2\fi} -\def\doifallcommonelse{\syst_helpers_do_if_all_common_else\firstoftwoarguments\secondoftwoarguments} -\def\doifallcommon {\syst_helpers_do_if_all_common_else\firstofonearguments\gobbleoneargument } -\def\doifnotallcommon {\syst_helpers_do_if_all_common_else\gobbleoneargument \firstofonearguments } +\unexpanded\def\doifallcommonelse{\syst_helpers_do_if_all_common_else\firstoftwoarguments\secondoftwoarguments} +\unexpanded\def\doifallcommon {\syst_helpers_do_if_all_common_else\firstofonearguments\gobbleoneargument } +\unexpanded\def\doifnotallcommon {\syst_helpers_do_if_all_common_else\gobbleoneargument \firstofonearguments } %D \macros %D {DOIF,DOIFELSE,DOIFNOT} diff --git a/tex/context/base/tabl-xtb.mkvi b/tex/context/base/tabl-xtb.mkvi index ae65acdb7..fae4d1615 100644 --- a/tex/context/base/tabl-xtb.mkvi +++ b/tex/context/base/tabl-xtb.mkvi @@ -111,10 +111,10 @@ \to \everysetupxtable \setupxtable[% - \c!nr=1, - \c!nc=1, - \c!nx=1, % slow - \c!ny=1, % slow + \c!nr=\plusone, + \c!nc=\plusone, + \c!nx=\plusone, % slow + \c!ny=\plusone, % slow \c!align=\v!table, % {\v!flushleft,\v!broad,\v!high}, % just as \bTABLE .. \eTABLE \c!frameoffset=.5\linewidth, \c!backgroundoffset=\v!frame, @@ -164,7 +164,9 @@ % These direct buffers can be somewhat faster but it's probably neglectable. % Anyway, no nesting is supported as we then need to catch (e.g.) rows and % keep track of nesting and have a more complex redefinition of nested -% instanced \unknown\ it's not worth the trouble. +% instanced \unknown\ it's not worth the trouble. Only use them when you +% really need them and use the embeddedxtable command when nesting them. +% Implementing nesting would be slower than not using direct buffers. \def\tabl_x_process_buffer_directly[#name]% {\bgroup @@ -179,9 +181,10 @@ \def\tabl_x_process_buffer[#settings]% {\tabl_x_prepare{#settings}% \let\tabl_x_start_table\tabl_x_start_ignore - \gobbleuntil\stopxtable} + \gobbleuntil\stopxtable} % nested xtables are not supported, -%D A bonus: you can use the following construct inside a macro. +%D A bonus: you have to use the following construct inside a macro or +%D direct buffer. \unexpanded\def\startembeddedxtable {\dosingleempty\tabl_x_embedded_start} @@ -244,6 +247,8 @@ \def\tabl_x_get_buffer {\ctxcommand{gettexbuffer("\tabl_x_current_buffer")}} +\let\tabl_x_stop_cell\relax + \unexpanded\def\tabl_x_process {\begingroup % * \doifsomething{\xtableparameter\c!bodyfont} @@ -313,18 +318,26 @@ \resetbuffer[\tabl_x_current_buffer]% \egroup} +% text flow split modes + \installcorenamespace{xtableflushsplit} \def\tabl_x_flush_text_checked {\expandcheckedcsname\??xtableflushsplit{\xtableparameter\c!split}\v!no} +% in text flow: headers and footers only once + \setvalue{\??xtableflushsplit\v!yes}% {\ctxcommand{x_table_flush{ method = "\v!split" }}} +% in text flow: headers and footers only once + \setvalue{\??xtableflushsplit\v!no}% {\dontleavehmode % else no leftskip etc \ctxcommand{x_table_flush{ method = "\v!normal" }}} +% in text flow: headers and footers get repeated + \setvalue{\??xtableflushsplit\v!repeat}% {\doloop {\ctxcommand{x_table_flush{ method = "\v!split", vsize = \number\ifdim\pagegoal=\maxdimen\textheight\else\pagegoal\fi }}% diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index de0aaf5a5..cc93c37db 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 : 07/19/12 22:16:49 +-- merge date : 07/20/12 00:58:15 do -- begin closure to overcome local limits and interference -- cgit v1.2.3