diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/mkii/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/mkii/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/colo-ini.mkiv | 35 | ||||
-rw-r--r-- | tex/context/base/mkiv/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/font-pre.mkiv | 33 | ||||
-rw-r--r-- | tex/context/base/mkiv/page-flt.lua | 4 | ||||
-rw-r--r-- | tex/context/base/mkiv/page-sid.mkiv | 202 | ||||
-rw-r--r-- | tex/context/base/mkiv/status-files.pdf | bin | 25753 -> 25710 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/status-lua.pdf | bin | 426092 -> 426091 bytes | |||
-rw-r--r-- | tex/context/interface/mkiv/i-context.pdf | bin | 818485 -> 818486 bytes | |||
-rw-r--r-- | tex/context/interface/mkiv/i-readme.pdf | bin | 60766 -> 60766 bytes | |||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
13 files changed, 191 insertions, 93 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii index 4ac67aef0..57b49b8a1 100644 --- a/tex/context/base/mkii/cont-new.mkii +++ b/tex/context/base/mkii/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2017.10.01 14:32} +\newcontextversion{2017.10.02 10:34} %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/mkii/context.mkii b/tex/context/base/mkii/context.mkii index 29f91651b..56884db5e 100644 --- a/tex/context/base/mkii/context.mkii +++ b/tex/context/base/mkii/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2017.10.01 14:32} +\edef\contextversion{2017.10.02 10:34} %D For those who want to use this: diff --git a/tex/context/base/mkiv/colo-ini.mkiv b/tex/context/base/mkiv/colo-ini.mkiv index 54ad1e9f9..34b43a947 100644 --- a/tex/context/base/mkiv/colo-ini.mkiv +++ b/tex/context/base/mkiv/colo-ini.mkiv @@ -1415,6 +1415,41 @@ \definetransparency [color] [15] \definetransparency [luminosity] [16] +%D Some common ones: + +\definecolor[trace:0][s=.4] +\definecolor[trace:1][r=.6] +\definecolor[trace:2][g=.6] +\definecolor[trace:3][b=.6] +\definecolor[trace:4][r=.6,g=.6] +\definecolor[trace:5][r=.6,b=.6] +\definecolor[trace:6][g=.6,b=.6] +\definecolor[trace:7][r=.8,g=.4] +\definecolor[trace:8][r=.8,b=.4] +\definecolor[trace:9][g=.4,b=.8] + +\definecolor[trace:w][s=1] +\definecolor[trace:r][r=.75,t=.5,a=1] +\definecolor[trace:g][g=.75,t=.5,a=1] +\definecolor[trace:b][b=.75,t=.5,a=1] +\definecolor[trace:c][c=.75,t=.5,a=1] +\definecolor[trace:m][m=.75,t=.5,a=1] +\definecolor[trace:y][y=.75,t=.5,a=1] +\definecolor[trace:s][s=.75,t=.5,a=1] +\definecolor[trace:d][s=.25,t=.5,a=1] +\definecolor[trace:o][r=1,g=.6,b=.1,t=.5,a=1] + +\definecolor[trace:dw][s=1] +\definecolor[trace:dr][r=.75,t=.75,a=1] +\definecolor[trace:dg][g=.75,t=.75,a=1] +\definecolor[trace:db][b=.75,t=.75,a=1] +\definecolor[trace:dc][c=.75,t=.75,a=1] +\definecolor[trace:dm][m=.75,t=.75,a=1] +\definecolor[trace:dy][y=.75,t=.75,a=1] +\definecolor[trace:ds][s=.75,t=.75,a=1] +\definecolor[trace:dd][s=.25,t=.75,a=1] +\definecolor[trace:do][r=1,g=.6,b=.1,t=.75,a=1] + \setupcolors [\c!state=\v!stop, % color will be enabled later on \c!conversion=\v!yes, diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 79c533955..79b80846a 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{2017.10.01 14:32} +\newcontextversion{2017.10.02 10:34} %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 57ae76dcd..2a8d1ab60 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -41,7 +41,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2017.10.01 14:32} +\edef\contextversion{2017.10.02 10:34} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/font-pre.mkiv b/tex/context/base/mkiv/font-pre.mkiv index 632cbe29c..c8550d815 100644 --- a/tex/context/base/mkiv/font-pre.mkiv +++ b/tex/context/base/mkiv/font-pre.mkiv @@ -390,17 +390,6 @@ %D We define some colors that are used in tracing (for instance \OPENTYPE\ %D features). We cannot yet inherit because no colors are predefined. -\definecolor[trace:0][s=.4] -\definecolor[trace:1][r=.6] -\definecolor[trace:2][g=.6] -\definecolor[trace:3][b=.6] -\definecolor[trace:4][r=.6,g=.6] -\definecolor[trace:5][r=.6,b=.6] -\definecolor[trace:6][g=.6,b=.6] -\definecolor[trace:7][r=.8,g=.4] -\definecolor[trace:8][r=.8,b=.4] -\definecolor[trace:9][g=.4,b=.8] - \definecolor[font:init][r=.75] \definecolor[font:medi][g=.75] \definecolor[font:fina][b=.75] @@ -408,28 +397,6 @@ \definecolor[font:mark][r=.75,b=.75] % [m=.75] \definecolor[font:rest][b=.75,g=.75] % [c=.75] -\definecolor[trace:w][s=1] -\definecolor[trace:r][r=.75,t=.5,a=1] -\definecolor[trace:g][g=.75,t=.5,a=1] -\definecolor[trace:b][b=.75,t=.5,a=1] -\definecolor[trace:c][c=.75,t=.5,a=1] -\definecolor[trace:m][m=.75,t=.5,a=1] -\definecolor[trace:y][y=.75,t=.5,a=1] -\definecolor[trace:s][s=.75,t=.5,a=1] -\definecolor[trace:d][s=.25,t=.5,a=1] -\definecolor[trace:o][r=1,g=.6,b=.1,t=.5,a=1] - -\definecolor[trace:dw][s=1] -\definecolor[trace:dr][r=.75,t=.75,a=1] -\definecolor[trace:dg][g=.75,t=.75,a=1] -\definecolor[trace:db][b=.75,t=.75,a=1] -\definecolor[trace:dc][c=.75,t=.75,a=1] -\definecolor[trace:dm][m=.75,t=.75,a=1] -\definecolor[trace:dy][y=.75,t=.75,a=1] -\definecolor[trace:ds][s=.75,t=.75,a=1] -\definecolor[trace:dd][s=.25,t=.75,a=1] -\definecolor[trace:do][r=1,g=.6,b=.1,t=.75,a=1] - \definecolor[font:0] [s=1] \definecolor[font:1] [r=.75] \definecolor[font:2] [g=.75] diff --git a/tex/context/base/mkiv/page-flt.lua b/tex/context/base/mkiv/page-flt.lua index 30796f91d..fdfd968d5 100644 --- a/tex/context/base/mkiv/page-flt.lua +++ b/tex/context/base/mkiv/page-flt.lua @@ -13,9 +13,9 @@ local tostring = tostring local insert, remove = table.insert, table.remove local find = string.find -local trace_floats = false trackers.register("graphics.floats", function(v) trace_floats = v end) -- name might change +local trace_floats = false trackers.register("floats.caching", function(v) trace_floats = v end) -- name might change -local report_floats = logs.reporter("structure","floats") +local report_floats = logs.reporter("floats","caching") local C, S, P, lpegmatch = lpeg.C, lpeg.S, lpeg.P, lpeg.match diff --git a/tex/context/base/mkiv/page-sid.mkiv b/tex/context/base/mkiv/page-sid.mkiv index 2f5acaee6..50023c2e8 100644 --- a/tex/context/base/mkiv/page-sid.mkiv +++ b/tex/context/base/mkiv/page-sid.mkiv @@ -78,6 +78,15 @@ \newif\iftracesidefloats % public (might change) +\def\page_sides_floats_legend + {\writestatus\m!floatblocks{anchor: orange, shift: red, box: green, dummy: blue, depth: magenta}% + \glet\page_sides_floats_legenda\relax} + +\installtextracker{floats.anchoring} + {\page_sides_floats_legend + \tracesidefloatstrue} + {\tracesidefloatsfalse} + % end of public variables \def\page_sides_apply_horizontal_shift @@ -184,8 +193,10 @@ \def\page_sides_flush_floats {\par - \ifdim\dimexpr\d_page_sides_vsize-\pagetotal\relax>\zeropoint + \ifdim\dimexpr\d_page_sides_vsize-\d_page_sides_bottomskip-\pagetotal\relax>\zeropoint \page_sides_flush_floats_indeed + \else + % no need as the par just fits next to the previous float \fi % also here if used at all \global\holdinginserts\zerocount \global\d_page_sides_vsize\d_page_sides_vsize_reset @@ -212,48 +223,69 @@ % we don't officially know what kind of float we flush +\def\page_sides_flush_floats_blank#1% we need to deal with the distance + {\ifdim\d_page_sides_bottomskip>\d_page_sides_topskip + \blank[% + \ifnum#1>\zerocount\v!nowhite,\fi + \ifdim\d_page_sides_topskip >\zeropoint-\rootfloatparameter\c!sidespacebefore,\fi % the next one + \ifdim\d_page_sides_bottomskip>\zeropoint \rootfloatparameter\c!sidespaceafter \fi + ]% + \else\ifdim\d_page_sides_bottomskip<\d_page_sides_topskip + \blank[% + \ifnum#1>\zerocount\v!nowhite,\fi + \ifdim\d_page_sides_bottomskip>\zeropoint -\rootfloatparameter\c!sidespaceafter ,\fi + \ifdim\d_page_sides_topskip >\zeropoint \rootfloatparameter\c!sidespacebefore \fi + ]% + \fi\fi} + +\def\page_sides_flush_floats_tracer + {\dontleavehmode + \ruledhpack\bgroup\backgroundline[trace:b]{% + \ifnum\recurselevel=\plusone + \llap{{\smallinfofont\the\scratchdimen}\hskip.5\leftmargindistance}% + \else\ifodd\recurselevel + \llap{{\smallinfofont\recurselevel}\hskip.5\leftmargindistance}% + \fi\fi + \m_pages_strut + \kern\hsize + \egroup}} + \def\page_sides_flush_floats_indeed {% the \d_page_sides_bottomskip == \rootfloatparameter\c!sidespaceafter is embedded % in the progression of the float - \global\advance\d_page_sides_vsize-\d_page_sides_bottomskip\relax - \ifdim\dimexpr\d_page_sides_vsize-\pagetotal\relax>\zeropoint % new per 2017-09-28 - \begingroup - \let\page_sides_flush_floats\relax - \edef\m_pages_strut - {\ifcsname\??sidefloatsteps\rootfloatparameter\c!step\endcsname - \lastnamedcs - \else - \strut - \fi}% - \forgetall - \doloop - {\iftracesidefloats - \dontleavehmode - \ruledhpack{\m_pages_strut\kern\d_page_sides_width}% - \else - \m_pages_strut - \fi - \par - \nointerlineskip - \ifdim\dimexpr\d_page_sides_vsize-\pagetotal\relax>\zeropoint - \ifnum\recurselevel>\plushundred % safeguard, sort of deadcycles - %\writestatus{sidefloats}{\recurselevel\space empty lines forced, quitting}% - \exitloop - \fi - \else - %\writestatus{sidefloats}{\recurselevel\space empty lines forced}% + \begingroup + \let\page_sides_flush_floats\relax + \edef\m_pages_strut + {\ifcsname\??sidefloatsteps\rootfloatparameter\c!step\endcsname + \lastnamedcs + \else + \strut + \fi}% + \forgetall + \doloop + {\scratchdimen\dimexpr\d_page_sides_vsize-\d_page_sides_bottomskip-\pagetotal\relax + \iftracesidefloats + \page_sides_flush_floats_tracer + \else + \m_pages_strut + \fi + \par + \nointerlineskip + \ifdim\scratchdimen>\zeropoint + \ifnum\recurselevel>\plushundred % safeguard, sort of deadcycles \exitloop - \fi}% - \endgroup - \else - % no need as the par just fits next to the previous float - \fi + \fi + \else + \exitloop + \fi}% + \endgroup + % we're going to add top space anyway so .... \ifdim\parskip>\zeropoint % why this test ? \ifdim\d_page_sides_bottomskip>\parskip - \blank[\v!nowhite,\rootfloatparameter\c!sidespaceafter]% + \page_sides_flush_floats_blank\plusone \fi \else - \blank[\rootfloatparameter\c!sidespaceafter]% + \page_sides_flush_floats_blank\zerocount \fi} \def\page_sides_check_floats_after_par @@ -362,6 +394,35 @@ \kern\d_page_sides_rightshift \fi\fi}} +\def\page_sides_apply_vertical_shift_normal + {\global\setbox\floatbox\hpack % why extra box + {\vpack + {\vskip\privatescratchdimen + \nointerlineskip + \box\floatbox + \ifnum\c_page_sides_align=\plusfive \vskip-\lineheight \fi}}} + +\def\page_sides_apply_vertical_shift_traced + {\global\setbox\floatbox\hpack % why extra box + {\backgroundline[trace:r]{\ruledhpack{\vpack + {\hsize\wd\floatbox + \vskip\privatescratchdimen + \nointerlineskip + \backgroundline[trace:g]{\ruledhpack{\box\floatbox}}% + \ifnum\c_page_sides_align=\plusfive \vskip-\lineheight \fi}}}}} + +\def\page_sides_apply_depth_normal + {\global\setbox\floatbox\hpack + {\lower\strutdepth\box\floatbox}} + +\def\page_sides_apply_depth_traced + {\global\setbox\floatbox\hpack + {\scratchdimen\wd\floatbox + \lower\strutdp\box\floatbox + \hskip-\scratchdimen + \color[trace:m] + {\vrule\s!height\zeropoint\s!depth\strutdp\s!width\scratchdimen}}} + \def\page_sides_apply_vertical_shift {\ifnum\c_page_sides_align=\plusfour \getnoflines{\ht\floatbox}% @@ -370,7 +431,11 @@ \advance\privatescratchdimen\noflines\lineheight % todo: maybe rounding problem here % \global\setbox\floatbox\hbox{\lower\lineheight\box\floatbox}% - \global\setbox\floatbox\hpack{\lower\strutdepth\box\floatbox}% + \iftracesidefloats + \page_sides_apply_depth_traced + \else + \page_sides_apply_depth_normal + \fi \ht\floatbox\privatescratchdimen \dp\floatbox\zeropoint \fi @@ -405,12 +470,11 @@ \ifnum\c_page_sides_n_of_lines>\zerocount \advance\privatescratchdimen\c_page_sides_n_of_lines\lineheight \fi - \global\setbox\floatbox\hpack % why extra box - {\vbox - {\vskip\privatescratchdimen - \nointerlineskip - \box\floatbox - \ifnum\c_page_sides_align=\plusfive \vskip-\lineheight \fi}}% + \iftracesidefloats + \page_sides_apply_vertical_shift_traced % uses \privatescratchdimen + \else + \page_sides_apply_vertical_shift_normal % uses \privatescratchdimen + \fi \ifnum\c_page_sides_float_type<\plusfour \global\d_page_sides_topskip\zeropoint \else\ifnum\c_page_sides_float_type>\plusfive @@ -537,9 +601,22 @@ \global\settrue\c_page_floats_room \fi} +% \unexpanded\def\fakenextstrutline +% {\par +% \begingroup +% % overkill, done in \page_sides_inject_dummy_lines +% \triggerpagebuilder +% \reseteverypar +% \forgetall +% \dontleavehmode\hpack to \hsize{\strut\hss}\par +% \clf_removelastline +% % \pagetotal is still one line too much but pagedepth is ok +% % but it seems to work +% \endgroup} + \def\page_sides_prepare_space - {\fakenextstrutline - \inhibitblank} + {%\fakenextstrutline % does more bad than good at page crossing + \inhibitblank} % hm, why here .. gets obscured anyway \def\page_sides_handle_float#1% grid (4) is rather experimental {\page_sides_prepare_space @@ -569,6 +646,14 @@ \let\page_sides_check_floats\page_sides_check_floats_indeed +\unexpanded\def\page_sides_check_floats_tracer + {\begingroup + \hskip-\d_page_sides_width % kern + \color[trace:o]% + {\vrule\s!height.5\points\s!depth.5\points\s!width\d_page_sides_width + \llap{\showstruts\strut\kern.25\bodyfontsize}}% + \endgroup} + \unexpanded\def\page_sides_check_floats_set {\privatescratchdimen\dimexpr\d_page_sides_progress+\strutht-\roundingeps\relax \c_page_sides_n_of_hang\privatescratchdimen @@ -591,15 +676,18 @@ \privatescratchcounter\c_page_sides_n_of_lines \privatescratchdimen\dimexpr\hsize-\d_page_sides_width\relax \dorecurse\c_page_sides_n_of_lines - {\appendtoks \zeropoint \hsize \to \privatescratchtoks}% + %{\appendtoks \zeropoint \hsize \to \privatescratchtoks}% + {\toksapp\privatescratchtoks{\zeropoint\hsize}}% \ifnum\c_page_sides_n_of_hang>\c_page_sides_n_of_lines \advance\c_page_sides_n_of_hang -\c_page_sides_n_of_lines\relax \advance\privatescratchcounter\c_page_sides_n_of_hang \dorecurse\c_page_sides_n_of_hang % weird, shouldn't that be scratchcounter {\ifnum\c_page_sides_float_type>\plusfour - \appendtoks \zeropoint \privatescratchdimen \to \privatescratchtoks + %\appendtoks \zeropoint \privatescratchdimen \to \privatescratchtoks + \toksapp\privatescratchtoks{\zeropoint\privatescratchdimen}% \else - \appendtoks \d_page_sides_width\privatescratchdimen \to \privatescratchtoks + %\appendtoks \d_page_sides_width\privatescratchdimen \to \privatescratchtoks + \toksapp\privatescratchtoks{\d_page_sides_width\privatescratchdimen}% \fi}% \fi \parshape @@ -615,10 +703,7 @@ \fi \global\advance\c_page_sides_checks_done \plusone \iftracesidefloats - \hskip-\d_page_sides_width % kern - \color[darkgray]% - {\vrule\s!height.5\points\s!depth.5\points\s!width\d_page_sides_width - \llap{\showstruts\strut\kern.25\bodyfontsize}}% + \page_sides_check_floats_tracer \fi} \unexpanded\def\page_sides_check_floats_reset @@ -640,15 +725,26 @@ \fi \fi} -\def\page_sides_inject_dummy_lines +\def\page_sides_inject_dummy_lines_normal + {\dorecurse\privatescratchcounter{\hpack to \hsize{\strut\hss}}} + +\def\page_sides_inject_dummy_lines_traced + {\dorecurse\privatescratchcounter{\ruledhpack{\backgroundline[trace:b]{\hpack to \hsize{\strut\hss}}}}} + +\def\page_sides_inject_dummy_lines % so always one {\begingroup \privatescratchcounter\pageshrink \divide\privatescratchcounter \baselineskip \advance\privatescratchcounter \plusone \parskip\zeropoint - \dorecurse\privatescratchcounter{\hpack to \hsize{}}% + \iftracesidefloats + \page_sides_inject_dummy_lines_traced + \else + \page_sides_inject_dummy_lines_normal + \fi \kern-\privatescratchcounter\baselineskip \penalty\zerocount + \triggerpagebuilder \endgroup} \def\adjustsidefloatdisplaylines % public, will change diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex de691e00e..f25ca8f25 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex b4b799b4f..8dcafa533 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf Binary files differindex 44cfc846c..456f9e620 100644 --- a/tex/context/interface/mkiv/i-context.pdf +++ b/tex/context/interface/mkiv/i-context.pdf diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf Binary files differindex 47468dc06..2af2fc801 100644 --- a/tex/context/interface/mkiv/i-readme.pdf +++ b/tex/context/interface/mkiv/i-readme.pdf diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 18c00e569..7cd7b442b 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 : 10/01/17 14:32:33 +-- merge date : 10/02/17 10:34:56 do -- begin closure to overcome local limits and interference |