From bc608dc7157ffbb10f2901a8eca115d03641f7a2 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Mon, 5 Jan 2015 23:15:04 +0100 Subject: 2015-01-05 22:26:00 --- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4384 -> 4383 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/publ-imp-aps.lua | 5 +- tex/context/base/publ-imp-aps.mkvi | 53 +++++++++++---------- tex/context/base/status-files.pdf | Bin 24927 -> 24943 bytes tex/context/base/status-lua.pdf | Bin 356715 -> 356820 bytes tex/context/base/tabl-ntb.mkiv | 10 ++-- tex/context/base/tabl-xtb.lua | 28 +++++++---- tex/context/base/tabl-xtb.mkvi | 11 ++++- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 11 files changed, 68 insertions(+), 45 deletions(-) (limited to 'tex') diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 5cd37e506..38ca75c44 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{2015.01.05 13:06} +\newcontextversion{2015.01.05 22:24} %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/context-version.pdf b/tex/context/base/context-version.pdf index ef148d573..ac84004b0 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.mkiv b/tex/context/base/context.mkiv index 91c8b9b5f..e32ab9575 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -28,7 +28,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2015.01.05 13:06} +\edef\contextversion{2015.01.05 22:24} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/publ-imp-aps.lua b/tex/context/base/publ-imp-aps.lua index 3e63c6d88..1530bc09d 100644 --- a/tex/context/base/publ-imp-aps.lua +++ b/tex/context/base/publ-imp-aps.lua @@ -492,15 +492,14 @@ categories.other = { categories.literal = { sets = { - author = { "key" }, + author = { "key" }, -- need to check this! doi = generic.doi, }, required = { - "author", "text" }, optional = { - "collaboration", + "author", "doi", "note" }, virtual = false, diff --git a/tex/context/base/publ-imp-aps.mkvi b/tex/context/base/publ-imp-aps.mkvi index 60fb43ed8..bd07a9a55 100644 --- a/tex/context/base/publ-imp-aps.mkvi +++ b/tex/context/base/publ-imp-aps.mkvi @@ -33,8 +33,8 @@ \setupbtxlistvariant [\c!namesep={,\space}, - \c!lastnamesep={,\nobreakspace\textampersand\space}, - \c!finalnamesep={,\nobreakspace\textampersand\space}, + \c!lastnamesep={,\space and\space}, + \c!finalnamesep={,\space and\space}, \c!firstnamesep=\space, \c!otherstext={\space\btxlabeltext{\currentbtxspecification:others}}, \c!juniorsep=\space, @@ -49,7 +49,7 @@ \c!etaldisplay=\btxlistvariantparameter\c!etallimit, %\c!journalconversion=\v!normal, \c!monthconversion=\v!month, - \c!authorconversion=short] + \c!authorconversion=normalshort] \definebtxlistvariant [author] @@ -123,6 +123,10 @@ \c!finalnamesep={\space\btxlabeltext{\currentbtxspecification:and}\space}, % no comma! \c!authorconversion=\v!name] +\setupbtxrendering + [sorttype=, % num ? + numbering=yes] + % Should the following be loaded by default? %D In order to be able to get journals expanded (or normalized or abbreviated) you need @@ -360,10 +364,12 @@ \starttexdefinition btx:aps:author \btxflush{author} - \btxdoif {collaboration} { + \btxdoifelse {collaboration} { \btxleftparenthesis \btxflush{collaboration} - \btxrightparenthesis + \btxrightparenthesiscomma + } { + \btxcomma } \stoptexdefinition @@ -401,7 +407,7 @@ \starttexdefinition btx:aps:editionset \btxdoifelse {edition} { - \btxleftparenthesis + \btxspace \doif {\currentbtxcategory} {techreport} { \btxdoifelse {type} { \btxflush{Word -> type} @@ -449,7 +455,7 @@ \btxspace \btxflush{pages} } - \btxrightparenthesisperiod + \btxperiod } { \doif {\currentbtxcategory} {techreport} { \btxleftparenthesis @@ -461,14 +467,12 @@ \starttexdefinition btx:aps:journal-volumeset-year \btxdoif {journal} { - \btxcomma % expandedjournal abbreviatedjournal \btxflush{expandedjournal -> journal} % A newspaper may not have a volume but may have a number! \btxdoifelse {volume} { - \doif {\btxfoundname{volume}} {volume} { - \texdefinition{btx:aps:bold}{volume} - } + \btxspace + \texdefinition{btx:aps:bold}{volume} \btxdoif {number} { \removeunwantedspaces( \btxflush{number} @@ -476,11 +480,15 @@ } } { \btxdoif {number} { + \btxspace \btxflush{number} \btxcomma } } - \btxflush{pages} + \btxdoif {number} { + \btxspace + \btxflush{pages} + } \btxleftparenthesis \btxdoifelse {year} { \btxflush{year} @@ -547,9 +555,8 @@ \starttexdefinition btx:aps:note % grouping could indeed be useful for note. \btxdoif {note} { - \btxleftparenthesis + \btxspace {\btxflush{note}} - \btxrightparenthesis } \stoptexdefinition @@ -636,8 +643,8 @@ \startsetups btx:aps:book \texdefinition{btx:aps:author} \texdefinition{btx:aps:title} - \texdefinition{btx:aps:editionset} \texdefinition{btx:aps:publisher-wherefrom-year} + \texdefinition{btx:aps:editionset} \texdefinition{btx:aps:url-note-doi} \stopsetups @@ -654,8 +661,8 @@ \btxspace } \texdefinition{btx:aps:editor-in-}{title} - \texdefinition{btx:aps:editionset} \texdefinition{btx:aps:publisher-wherefrom-year} + \texdefinition{btx:aps:editionset} \texdefinition{btx:aps:url-note-doi} \stopsetups @@ -669,8 +676,8 @@ \texdefinition{btx:aps:author} \texdefinition{btx:aps:title} \texdefinition{btx:aps:editor-in-}{booktitle} - \texdefinition{btx:aps:editionset} \texdefinition{btx:aps:publisher-wherefrom-year} + \texdefinition{btx:aps:editionset} \texdefinition{btx:aps:url-note-doi} \stopsetups @@ -682,7 +689,6 @@ \startsetups btx:aps:proceedings \texdefinition{btx:aps:author} \texdefinition{btx:aps:title} - \texdefinition{btx:aps:editionset} \btxdoif {editor} { \btxdoif {organization} { \btxspace @@ -691,6 +697,7 @@ } } \texdefinition{btx:aps:publisher-wherefrom-year} + \texdefinition{btx:aps:editionset} \texdefinition{btx:aps:url-note-doi} \stopsetups @@ -703,13 +710,13 @@ \texdefinition{btx:aps:author} \texdefinition{btx:aps:title} \texdefinition{btx:aps:editor-in-}{booktitle} - \texdefinition{btx:aps:editionset} \btxdoif {organization} { \btxspace \btxflush{organization} \btxcomma } \texdefinition{btx:aps:publisher-wherefrom-year} + \texdefinition{btx:aps:editionset} \texdefinition{btx:aps:url-note-doi} \stopsetups @@ -778,8 +785,8 @@ \startsetups btx:aps:manual \texdefinition{btx:aps:author} \texdefinition{btx:aps:title} - \texdefinition{btx:aps:editionset} \texdefinition{btx:aps:publisher-wherefrom-year} + \texdefinition{btx:aps:editionset} \texdefinition{btx:aps:url-note-doi} \stopsetups @@ -790,8 +797,8 @@ \startsetups btx:aps:techreport \texdefinition{btx:aps:author} \texdefinition{btx:aps:title} - \texdefinition{btx:aps:editionset} \texdefinition{btx:aps:publisher-wherefrom-year} + \texdefinition{btx:aps:editionset} \texdefinition{btx:aps:url-note-doi} \stopsetups @@ -915,10 +922,6 @@ % If all else fails to match: \startsetups btx:aps:literal - %\btxleftparenthesis - \removeunwantedspaces( - \btxflush{key} - \btxrightparenthesis \btxdoif {text} { \btxflush{text} } diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 62908124d..af02b31e0 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 7c35afdce..e46c23463 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/tabl-ntb.mkiv b/tex/context/base/tabl-ntb.mkiv index 2f5dd5566..f9a1593cf 100644 --- a/tex/context/base/tabl-ntb.mkiv +++ b/tex/context/base/tabl-ntb.mkiv @@ -333,7 +333,7 @@ \unexpanded\def\tabl_ntb_set_txt_process#1#2#3#4#5#6% {\expandafter\def\csname\??naturaltabletxt\m_tabl_tbl_level:\number#1:\number#2\endcsname - {\tabl_ntb_cell_process{#3}{#4}[#5]{\tabl_ntb_next_level#6\tabl_ntb_prev_level}}} + {\tabl_ntb_cell_process{#3}{#4}[#5,\c!option=\v!tight]{\tabl_ntb_next_level#6\tabl_ntb_prev_level}}} \def\tabl_ntb_get_txt#1#2% {\csname\??naturaltabletxt\m_tabl_tbl_level:\number#1:\number#2\endcsname} @@ -1777,11 +1777,15 @@ \unexpanded\def\tabl_ntb_cell_process_a#1#2[#3]#4% grouping added ! ! ! {\bgroup - \tabl_ntb_setup_cell{#1}{#2}% \letnaturaltablelocalparameter\c!option\empty + \tabl_ntb_setup_cell{#1}{#2}% \setupcurrentnaturaltablelocal[#3]% \letnaturaltablelocalparameter\c!background\empty \letnaturaltablelocalparameter\c!frame\v!off +\scratchcounter\tabl_ntb_get_col{#1}{#2}\relax +\ifnum\scratchcounter>\plusone + \letnaturaltablelocalparameter\c!width\v!fit % compatible with extreme tables +\fi \setbox\scratchbox\hbox {\scratchdimen\naturaltablelocalparameter\c!distance\relax \ifdim\scratchdimen>\tabl_ntb_get_dis{#2}\relax @@ -1803,7 +1807,7 @@ \donetrue \fi \ifdone % brr, 0 - \ifnum\tabl_ntb_get_col{#1}{#2}>\plusone \tabl_ntb_set_spn\c_tabl_ntb_col\fi + \ifnum\scratchcounter>\plusone \tabl_ntb_set_spn\c_tabl_ntb_col\fi \fi \fi \tabl_ntb_spn_doifelse\c_tabl_ntb_col diff --git a/tex/context/base/tabl-xtb.lua b/tex/context/base/tabl-xtb.lua index 7569b303a..d8c5f78c9 100644 --- a/tex/context/base/tabl-xtb.lua +++ b/tex/context/base/tabl-xtb.lua @@ -24,6 +24,7 @@ this mechamism will be improved so that it can replace its older cousin. ]]-- -- todo: use linked list instead of r/c array +-- todo: we can use the sum of previously forced widths for column spans local tonumber, next = tonumber, next @@ -47,6 +48,7 @@ local context_beginvbox = context.beginvbox local context_endvbox = context.endvbox local context_blank = context.blank local context_nointerlineskip = context.nointerlineskip +local context_dummyxcell = context.dummyxcell local variables = interfaces.variables @@ -301,13 +303,11 @@ function xtables.set_reflow_width() local fixedcolumns = data.fixedcolumns local fixedrows = data.fixedrows if dimensionstate == 1 then -if cspan > 1 then - -- ignore width -else - if width > fixedcolumns[c] then -- how about a span here? - fixedcolumns[c] = width - end -end + if cspan > 1 then + -- ignore width + elseif width > fixedcolumns[c] then -- how about a span here? + fixedcolumns[c] = width + end elseif dimensionstate == 2 then fixedrows[r] = height elseif dimensionstate == 3 then @@ -548,9 +548,7 @@ function xtables.reflow_width() showwidths("stage 1",widths,autowidths) end local noffrozen = 0 - --- inspect(data.fixedcspans) - + -- inspect(data.fixedcspans) if options[v_max] then for c=1,nofcolumns do width = width + widths[c] @@ -1182,7 +1180,16 @@ function xtables.next_row(specification) data.currentrow = r data.currentcolumn = 0 data.rowproperties[r] = specification +end +function xtables.finish_row() + local n = data.nofcolumns - data.currentcolumn + if n > 0 then + -- message + for i=1,n do + context_dummyxcell() + end + end end -- eventually we might only have commands @@ -1194,6 +1201,7 @@ commands.x_table_construct = xtables.construct commands.x_table_flush = xtables.flush commands.x_table_cleanup = xtables.cleanup commands.x_table_next_row = xtables.next_row +commands.x_table_finish_row = xtables.finish_row commands.x_table_init_reflow_width = xtables.initialize_reflow_width commands.x_table_init_reflow_height = xtables.initialize_reflow_height commands.x_table_init_construct = xtables.initialize_construct diff --git a/tex/context/base/tabl-xtb.mkvi b/tex/context/base/tabl-xtb.mkvi index 11e926575..35ae79e82 100644 --- a/tex/context/base/tabl-xtb.mkvi +++ b/tex/context/base/tabl-xtb.mkvi @@ -432,7 +432,8 @@ \ctxcommand{x_table_next_row()}} \unexpanded\def\tabl_x_stop_row_construct - {\dostoptagged} + {\ctxcommand{x_table_finish_row()}% + \dostoptagged} \unexpanded\def\stopxrow {\tabl_x_stop_row @@ -444,6 +445,14 @@ \unexpanded\def\stopxcell {\tabl_x_stop_cell} +\unexpanded\def\dummyxcell#1% + {\tabl_x_start_cell_nop + \tabl_x_stop_cell} + +\unexpanded\def\dummyxcell + {\tabl_x_start_cell_nop + \tabl_x_stop_cell} + \unexpanded\def\tabl_x_begin_of_cell {\inhibitblank \everypar{\delayedbegstrut}} diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 2d03f75cb..f95494d6f 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 : 01/05/15 13:06:13 +-- merge date : 01/05/15 22:24:31 do -- begin closure to overcome local limits and interference -- cgit v1.2.3