summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-11-28 19:36:00 +0100
committerHans Hagen <pragma@wxs.nl>2013-11-28 19:36:00 +0100
commitb8fc467825a38e03f9d0f01c367870e3a02f5d1c (patch)
treeb28eb6bbfbab87a663ec02e3ca96353f50a98c67 /tex
parent57aa5d3def74918153b53ce9dd46b3f36d383423 (diff)
downloadcontext-b8fc467825a38e03f9d0f01c367870e3a02f5d1c.tar.gz
beta 2013.11.28 19:36
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/attr-ini.mkiv1
-rw-r--r--tex/context/base/bibl-tra.lua5
-rw-r--r--tex/context/base/bibl-tra.mkiv2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4133 -> 4133 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/mult-mes.lua4
-rw-r--r--tex/context/base/page-brk.mkiv20
-rw-r--r--tex/context/base/page-mix.lua42
-rw-r--r--tex/context/base/page-mix.mkiv21
-rw-r--r--tex/context/base/page-mul.mkiv29
-rw-r--r--tex/context/base/page-one.mkiv6
-rw-r--r--tex/context/base/page-otr.mkvi4
-rw-r--r--tex/context/base/status-files.pdfbin24686 -> 24707 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin227366 -> 227349 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
16 files changed, 95 insertions, 45 deletions
diff --git a/tex/context/base/attr-ini.mkiv b/tex/context/base/attr-ini.mkiv
index ac210c98e..e82ab6467 100644
--- a/tex/context/base/attr-ini.mkiv
+++ b/tex/context/base/attr-ini.mkiv
@@ -102,6 +102,7 @@
\definesystemattribute [internal] [public]
\definesystemattribute [ruled] [public]
\definesystemattribute [shifted] [public]
+\definesystemattribute [checkedbreak] [public]
\unexpanded\def\showattributes{\ctxcommand{showattributes()}}
diff --git a/tex/context/base/bibl-tra.lua b/tex/context/base/bibl-tra.lua
index 39eae3bcd..c879c1cf4 100644
--- a/tex/context/base/bibl-tra.lua
+++ b/tex/context/base/bibl-tra.lua
@@ -59,8 +59,9 @@ function hacks.process(settings)
local database = settings.database or ""
local jobname = tex.jobname
if database ~= "" then
- interfaces.showmessage("publications",3)
- io.savedata(file.addsuffix(jobname,"aux"),format(template,style,database))
+ local targetfile = file.addsuffix(jobname,"aux")
+ interfaces.showmessage("publications",3,targetfile)
+ io.savedata(targetfile,format(template,style,database))
if trace_bibtex then
report_tex("processing bibtex file %a using %a",jobname,bibtexbin)
end
diff --git a/tex/context/base/bibl-tra.mkiv b/tex/context/base/bibl-tra.mkiv
index 174bc8e25..06af7e11d 100644
--- a/tex/context/base/bibl-tra.mkiv
+++ b/tex/context/base/bibl-tra.mkiv
@@ -721,7 +721,7 @@
{\preloadbiblist
\doifdefinedelse{pbd:#1}
\firstoftwoarguments
- {\showmessage\m!publications{5}{#1}\secondoftwoarguments}}
+ {\showmessage\m!publications{5}{#1,\the\inputlineno}\secondoftwoarguments}}
%D \macros{bib@crossref}
%D
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 46681c7f4..24760c4b6 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{2013.11.28 17:55}
+\newcontextversion{2013.11.28 19:36}
%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 9db754454..27f395740 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index cc1bfa7a3..2b9460211 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{2013.11.28 17:55}
+\edef\contextversion{2013.11.28 19:36}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mult-mes.lua b/tex/context/base/mult-mes.lua
index aed417c92..d9ee151a8 100644
--- a/tex/context/base/mult-mes.lua
+++ b/tex/context/base/mult-mes.lua
@@ -982,13 +982,13 @@ return {
en = "file %a not found, waiting for bibtex",
},
["publications:3"] = {
- en = "wrote a new auxiliary file \\jobname.aux",
+ en = "wrote a new auxiliary file %a",
},
["publications:4"] = {
en = "loading database from %a",
},
["publications:5"] = {
- en = "warning: unknown cite argument %a on line \\the\\inputlineno",
+ en = "warning: unknown cite argument %a on line %a",
},
["publications:6"] = {
en = "loading formatting style from %a",
diff --git a/tex/context/base/page-brk.mkiv b/tex/context/base/page-brk.mkiv
index d1520b6ce..139dee1cd 100644
--- a/tex/context/base/page-brk.mkiv
+++ b/tex/context/base/page-brk.mkiv
@@ -387,26 +387,12 @@
%D Test column breaks.
-\def\testcolumn
+\unexpanded\def\testcolumn
{\dodoubleempty\page_tests_columns_test}
\def\page_tests_columns_test[#1][#2]%
- {\endgraf
- \ifdim\pagegoal<\maxdimen
- \ifdim\pagetotal<\pagegoal
- \d_page_tests_test\dimexpr
- \pagegoal
- -\pagetotal
- \ifdim\lastskip<\parskip+\parskip\fi
- \ifsecondargument+#2\fi
- \relax
- \getrawnoflines\d_page_tests_test % (raw)
- \ifnum#1>\noflines
- \column
- \fi
- \else
- \penalty-\plustenthousand % (untested)
- \fi
+ {\ifdefined\page_otr_command_test_column
+ \page_otr_command_test_column[#1][#2]%
\fi}
\protect \endinput
diff --git a/tex/context/base/page-mix.lua b/tex/context/base/page-mix.lua
index f8f4c8378..220972caf 100644
--- a/tex/context/base/page-mix.lua
+++ b/tex/context/base/page-mix.lua
@@ -59,7 +59,8 @@ pagebuilders = pagebuilders or { }
pagebuilders.mixedcolumns = pagebuilders.mixedcolumns or { }
local mixedcolumns = pagebuilders.mixedcolumns
-local forcedbreak = -123
+local a_checkedbreak = attributes.private("checkedbreak")
+local forcedbreak = -123
-- initializesplitter(specification)
-- cleanupsplitter()
@@ -466,24 +467,35 @@ local function setsplit(specification) -- a rather large function
lastlocked = nil
lastcurrent = nil
elseif penalty == forcedbreak then
- lastlocked = nil
- lastcurrent = nil
- local okay, skipped = gotonext()
- if okay then
+ local needed = current[a_checkedbreak]
+ local proceed = not checked or checked == 0
+ if not proceed then
+ local available = target - height
+ proceed = needed >= available
if trace_state then
- report_state("cycle: %s, forced column break, same page",cycle)
- if skipped ~= 0 then
- report_state("%-7s > column %s, discarded %p","penalty",column,skipped)
- end
+ report_state("cycle: %s, column %s, available %p, needed %p, %s break",cycle,column,available,needed,proceed and "forcing" or "ignoring")
end
- else
- if trace_state then
- report_state("cycle: %s, forced column break, next page",cycle)
- if skipped ~= 0 then
- report_state("%-7s > column %s, discarded %p","penalty",column,skipped)
+ end
+ if proceed then
+ lastlocked = nil
+ lastcurrent = nil
+ local okay, skipped = gotonext()
+ if okay then
+ if trace_state then
+ report_state("cycle: %s, forced column break, same page",cycle)
+ if skipped ~= 0 then
+ report_state("%-7s > column %s, discarded %p","penalty",column,skipped)
+ end
end
+ else
+ if trace_state then
+ report_state("cycle: %s, forced column break, next page",cycle)
+ if skipped ~= 0 then
+ report_state("%-7s > column %s, discarded %p","penalty",column,skipped)
+ end
+ end
+ return true
end
- return true
end
elseif penalty < 0 then
-- we don't care too much
diff --git a/tex/context/base/page-mix.mkiv b/tex/context/base/page-mix.mkiv
index 897046dea..5d1c54a71 100644
--- a/tex/context/base/page-mix.mkiv
+++ b/tex/context/base/page-mix.mkiv
@@ -256,7 +256,8 @@
{\goodbreak}
\installcolumnbreakmethod \s!mixedcolumn \v!yes
- {\penalty\c_page_mix_break_forced\relax}
+ {\par
+ \penalty\c_page_mix_break_forced\relax}
%D As we operate in grid snapping mode, we use a dedicated macro to enable this
%D mechamism.
@@ -781,6 +782,21 @@
\unexpanded\def\page_mix_command_next_page_and_inserts
{\page_otr_eject_page_and_flush_inserts}
+%D Moved here and dedicated:
+
+\unexpanded\def\page_mix_command_test_column
+ {\dodoubleempty\page_mix_command_test_column_indeed}
+
+\unexpanded\def\page_mix_command_test_column_indeed[#1][#2]% works on last column
+ {\par
+ \begingroup
+ \scratchdimen\dimexpr#1\lineheight\ifsecondargument+#2\fi\relax
+ \ifdim\scratchdimen>\zeropoint
+ \attribute\checkedbreakattribute\number\scratchdimen
+ \penalty\c_page_mix_break_forced\relax
+ \fi
+ \endgroup}
+
%D We need to hook some handlers into the output routine and we define
%D a dedicated one:
@@ -804,8 +820,9 @@
\s!page_otr_command_side_float_output =\page_mix_command_side_float_output,
\s!page_otr_command_flush_floats =\page_mix_command_flush_floats,
\s!page_otr_command_flush_side_floats =\page_mix_command_flush_side_floats,
- \s!page_otr_command_flush_saved_floats =\page_mix_command_flush_saved_floats
+ \s!page_otr_command_flush_saved_floats =\page_mix_command_flush_saved_floats,
% \s!page_otr_command_flush_margin_blocks =\page_mix_command_flush_margin_blocks, % not used
+ \s!page_otr_command_test_column =\page_mix_command_test_column
]
%D Only a few float placement options are supported:
diff --git a/tex/context/base/page-mul.mkiv b/tex/context/base/page-mul.mkiv
index 24286106a..a874cd116 100644
--- a/tex/context/base/page-mul.mkiv
+++ b/tex/context/base/page-mul.mkiv
@@ -1765,6 +1765,32 @@
{\directdummyparameter\c!distance}%
{\directdummyparameter\c!n}}
+%D Moved here:
+
+\unexpanded\def\page_mul_command_test_column
+ {\dodoubleempty\page_mul_command_test_column_indeed}
+
+\unexpanded\def\page_mul_command_test_column_indeed[#1][#2]% works on last column
+ {\page_otr_command_flush_top_insertions\endgraf
+ \ifdim\pagegoal<\maxdimen
+ \ifdim\pagetotal<\pagegoal
+ \d_page_tests_test\dimexpr
+ \pagegoal
+ -\pagetotal
+ \ifdim\lastskip<\parskip+\parskip\fi
+ \ifsecondargument+#2\fi
+ \relax
+ \getrawnoflines\d_page_tests_test % (raw)
+ \ifnum#1>\noflines
+ \column
+ \fi
+ \else
+ \penalty-\plustenthousand % (untested)
+ \fi
+ \fi}
+
+%D but fragile anyway.
+
\let\page_mul_command_package_contents\page_one_command_package_contents
\let\page_mul_command_flush_float_box \page_one_command_flush_float_box
@@ -1788,8 +1814,9 @@
\s!page_otr_command_side_float_output =\page_mul_command_side_float_output,
\s!page_otr_command_flush_floats =\page_mul_command_flush_floats,
\s!page_otr_command_flush_side_floats =\page_mul_command_flush_side_floats,
- \s!page_otr_command_flush_saved_floats =\page_mul_command_flush_saved_floats
+ \s!page_otr_command_flush_saved_floats =\page_mul_command_flush_saved_floats,
% \s!page_otr_command_flush_margin_blocks =\page_mul_command_flush_margin_blocks, % not used
+ \s!page_otr_command_test_column =\page_mul_command_test_column
]
\protect \endinput
diff --git a/tex/context/base/page-one.mkiv b/tex/context/base/page-one.mkiv
index 941828688..3f9dcd7c6 100644
--- a/tex/context/base/page-one.mkiv
+++ b/tex/context/base/page-one.mkiv
@@ -587,6 +587,9 @@
\unexpanded\def\page_one_command_synchronize_side_floats
{\page_sides_synchronize_floats}
+\unexpanded\def\page_one_command_test_page
+ {\testpage}
+
\defineoutputroutine
[\s!singlecolumn]
[\s!page_otr_command_routine =\page_one_command_routine,
@@ -608,7 +611,8 @@
\s!page_otr_command_flush_floats =\page_one_command_flush_floats,
\s!page_otr_command_flush_side_floats =\page_one_command_flush_side_floats,
\s!page_otr_command_flush_saved_floats =\page_one_command_flush_saved_floats,
- \s!page_otr_command_flush_margin_blocks =\page_one_command_flush_margin_blocks
+ \s!page_otr_command_flush_margin_blocks =\page_one_command_flush_margin_blocks,
+ \s!page_otr_command_test_column =\page_one_command_test_page
]
% \setupoutputroutine
diff --git a/tex/context/base/page-otr.mkvi b/tex/context/base/page-otr.mkvi
index e5433c866..e146d99b7 100644
--- a/tex/context/base/page-otr.mkvi
+++ b/tex/context/base/page-otr.mkvi
@@ -256,6 +256,7 @@
\definesystemconstant{page_otr_command_flush_side_floats}
\definesystemconstant{page_otr_command_flush_saved_floats}
\definesystemconstant{page_otr_command_flush_margin_blocks}
+\definesystemconstant{page_otr_command_test_column}
\definesystemconstant{singlecolumn}
\definesystemconstant{multicolumn} % will move
@@ -281,7 +282,8 @@
\s!page_otr_command_flush_floats,
\s!page_otr_command_flush_side_floats,
\s!page_otr_command_flush_saved_floats,
- \s!page_otr_command_flush_margin_blocks]
+ \s!page_otr_command_flush_margin_blocks,
+ \s!page_otr_command_test_column]
\appendtoks
\setupoutputroutine[\s!singlecolumn]%
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 5c49499cd..491e7e0b7 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 87fc656bb..b954e5736 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 60dcdba74..1cb7bb1c1 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 : 11/28/13 17:55:10
+-- merge date : 11/28/13 19:36:42
do -- begin closure to overcome local limits and interference