From 8e9d274c8a72b93fb1ab1a98d404b396ec8eae22 Mon Sep 17 00:00:00 2001 From: Marius Date: Sat, 31 Dec 2011 17:00:24 +0200 Subject: beta 2011.12.31 15:44 --- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4075 -> 4083 bytes tex/context/base/context-version.png | Bin 101989 -> 102345 bytes tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/mult-dim.mkvi | 9 +- tex/context/base/mult-low.lua | 4 +- tex/context/base/pack-mrl.mkiv | 133 +++++++++++---------- tex/context/base/spac-ali.mkiv | 2 +- tex/context/base/status-files.pdf | Bin 24490 -> 24515 bytes tex/context/base/status-lua.pdf | Bin 170135 -> 170138 bytes tex/context/base/syst-ini.mkiv | 3 +- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 14 files changed, 87 insertions(+), 74 deletions(-) (limited to 'tex') diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 62231b388..7b3648816 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{2011.12.31 13:16} +\newcontextversion{2011.12.31 15:44} %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 e6f938585..7b0598078 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{2011.12.31 13:16} +\newcontextversion{2011.12.31 15:44} %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 481fbd3e9..bce83add9 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 cddb71cf5..b2b3c484b 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 2140c36b3..f3c1bd3a5 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{2011.12.31 13:16} +\edef\contextversion{2011.12.31 15:44} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index b608a1a59..3885f396f 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -23,7 +23,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2011.12.31 13:16} +\edef\contextversion{2011.12.31 15:44} %D For those who want to use this: diff --git a/tex/context/base/mult-dim.mkvi b/tex/context/base/mult-dim.mkvi index 1b49017f4..3110e8f8b 100644 --- a/tex/context/base/mult-dim.mkvi +++ b/tex/context/base/mult-dim.mkvi @@ -112,9 +112,12 @@ \newbox\b_assign_width -\setvalue{\??dimensionwidth }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\wd\b_assign_width\b_assign_width\emptybox} -\setvalue{\??dimensionwidth\v!fit }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\wd\b_assign_width\b_assign_width\emptybox} -\setvalue{\??dimensionwidth\v!broad }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\dimexpr\wd\b_assign_width+#extra\relax\b_assign_width\emptybox} +\setvalue{\??dimensionwidth }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\wd\b_assign_width + \setbox\b_assign_width\emptybox} +\setvalue{\??dimensionwidth\v!fit }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\wd\b_assign_width + \setbox\b_assign_width\emptybox} +\setvalue{\??dimensionwidth\v!broad }#value#dimension#content#extra{\setbox\b_assign_width\hbox{#content}#dimension\dimexpr\wd\b_assign_width+#extra\relax + \setbox\b_assign_width\emptybox} \setvalue{\??dimensionwidth\v!unknown}#value#dimension#content#extra{#dimension=#value\relax} \unexpanded\def\assignwidth#value% diff --git a/tex/context/base/mult-low.lua b/tex/context/base/mult-low.lua index 51d0da537..8c39350f2 100644 --- a/tex/context/base/mult-low.lua +++ b/tex/context/base/mult-low.lua @@ -1,4 +1,4 @@ -ctxlatecommandif not modules then modules = { } end modules ['mult-low'] = { +if not modules then modules = { } end modules ['mult-low'] = { version = 1.001, comment = "companion to mult-ini.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", @@ -112,7 +112,7 @@ return { -- "nextbox", "dowithnextbox", "dowithnextboxcs", "dowithnextboxcontent", "dowithnextboxcontentcs", -- - "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", + "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", -- "scratchcounterone", "scratchcountertwo", "scratchcounterthree", "scratchdimenone", "scratchdimentwo", "scratchdimenthree", diff --git a/tex/context/base/pack-mrl.mkiv b/tex/context/base/pack-mrl.mkiv index bc6fec2bb..7e053ef6f 100644 --- a/tex/context/base/pack-mrl.mkiv +++ b/tex/context/base/pack-mrl.mkiv @@ -18,7 +18,7 @@ \unprotect %D \macros -%D {setupblackrules} +%D {setupblackrules,blackrule} %D %D The graphic capabilities of \TEX\ do not go beyond simple %D filled rules, except of course when using specials. Let's @@ -28,12 +28,6 @@ %D characteristics of these rule drawing command can be set by: %D %D \showsetup{setupblackrules} - -\unexpanded\def\setupblackrules - {\dodoubleargument\getparameters[\??bj]} - -%D \macros -%D {blackrule} %D %D The simple command draws only one rule. Its optional %D argument can be used to specify the dimensions. By setting @@ -42,24 +36,39 @@ %D %D \showsetup{blackrule} -\definecomplexorsimple\blackrule +\installcorenamespace{blackrules} -\unexpanded\def\complexblackrule[#1]% - {\hbox\bgroup\getparameters[\??bj][#1]\domakeblackrule\egroup} +\installsimplecommandhandler \??blackrules {blackrules} -\unexpanded\def\simpleblackrule - {\hbox\bgroup\domakeblackrule\egroup} +\unexpanded\def\blackrule + {\hbox\bgroup + \doifnextoptionalelse\pack_black_rule_pickup\pack_black_rule_indeed} + +\def\pack_black_rule_pickup[#1]% + {\setupcurrentblackrules[#1]% + \pack_black_rule_indeed} + +\def\pack_black_rule_indeed + {\edef\p_width {\directblackrulesparameter\c!width }% + \edef\p_height{\directblackrulesparameter\c!height}% + \edef\p_depth {\directblackrulesparameter\c!depth }% + \ifx\p_height\v!max + \setstrut + \else\ifx\p_depth\v!max + \setstrut + \fi\fi + \useblackrulesstyleandcolor\c!style\c!color + \vrule + \!!width \ifx\p_width \v!max\emwidth\else\p_width \fi + \!!height\ifx\p_height\v!max\strutht\else\p_height\fi + \!!depth \ifx\p_depth \v!max\strutdp\else\p_depth \fi + \egroup} -\def\domakeblackrule - {\doif\@@bjwidth \v!max{\def\@@bjwidth {1em}}% - \doif\@@bjheight\v!max{\setstrut\let\setstrut\relax\def\@@bjheight{\strutht}}% - \doif\@@bjdepth \v!max{\setstrut\def\@@bjdepth {\strutdp}}% - \startcolor[\@@bjcolor]% can be made faster, just direct attr - \vrule - \!!width \@@bjwidth - \!!height\@@bjheight - \!!depth \@@bjdepth - \stopcolor} +\setupblackrules + [\c!width=\emwidth, + \c!height=\exheight, + \c!depth=\zeropoint, + \c!color=] %D \macros %D {blackrules} @@ -88,33 +97,43 @@ %D \type{\leaders}, but this would probably have taken more %D tokens. -\def\doblackrules[#1]% +\unexpanded\def\blackrules % probably never used {\hbox\bgroup - \getparameters[\??bj][#1]% - \!!widtha\@@bjwidth - \!!widthb\@@bjdistance - \doif\@@bjalternative\c!b - {\scratchcounter\@@bjn - \ifnum\scratchcounter=\plusone - \!!widthb\zeropoint - \else - \advance\scratchcounter \minusone - \advance\!!widtha -\scratchcounter\!!widthb - \divide \!!widtha \@@bjn - \fi}% - \startcolor[\@@bjcolor]% - \dorecurse\@@bjn - {\vrule - \!!width \!!widtha - \!!height\@@bjheight - \!!depth \@@bjdepth - \hskip\!!widthb}% - \unskip - \stopcolor + \doifnextoptionalelse\pack_black_rules_pickup\pack_black_rules_indeed} + +\def\pack_black_rules_pickup[#1]% + {\setupcurrentblackrules[#1]% + \pack_black_rules_indeed} + +\def\pack_black_rules_indeed % no max handling here + {\scratchwidth \directblackrulesparameter\c!width + \scratchheight \directblackrulesparameter\c!height + \scratchdepth \directblackrulesparameter\c!depth + \scratchdistance\directblackrulesparameter\c!distance + \scratchcounter \directblackrulesparameter\c!n + \edef\p_alternative{\blackrulesparameter\c!alternative}% + \ifx\p_alternative\c!b + \ifnum\scratchcounter=\plusone + \scratchdistance\zeropoint + \else + \scratchwidth\dimexpr(\scratchwidth-\scratchcounter\scratchdistance+\scratchdistance)/\scratchcounter\relax + \fi + \fi + \useblackrulesstyleandcolor\c!style\c!color + \dorecurse\scratchcounter % a typical case of where we can use a simple loop + {\vrule + \!!width \scratchwidth + \!!height\scratchheight + \!!depth \scratchdepth + \hskip\scratchdistance}% + \unskip \egroup} -\unexpanded\def\blackrules - {\dosingleempty\doblackrules} +\setupblackrules + [\c!n=3, + \c!alternative=\c!a, + \c!distance=.25\emwidth, + \c!color=] %D The next commands can be used to draw margin rules. We %D support two methods: \marginrule{one for in||line use} and @@ -246,7 +265,7 @@ %D \showsetup{vl} %D \showsetup{hl} -\def\dovlwdhtdp#1#2#3% +\unexpanded\def\dovlwdhtdp#1#2#3% used elsewhere {\bgroup \setbox\scratchbox\hbox {\vrule @@ -264,12 +283,12 @@ \def\complexhl[#1]% {\hbox {\vrule - \!!width #1\s!em + \!!width #1\emwidth \!!height\linewidth \!!depth \zeropoint}} -\definecomplexorsimple\vl \def\simplevl{\complexvl[1]} -\definecomplexorsimple\hl \def\simplehl{\complexhl[1]} +\definecomplexorsimple\vl \def\simplevl{\complexvl[\plusone]} +\definecomplexorsimple\hl \def\simplehl{\complexhl[\plusone]} %D \macros %D {hairline, thinrule, thinrules, setupthinrules} @@ -570,8 +589,8 @@ \doifsomething{#1} {\doifelse\@@tllocation\v!inmargin {\llap - {\dousestyleparameter\@tlstyle - \dousecolorparameter\@tlcolor + {\dousestyleparameter\@@tlstyle + \dousecolorparameter\@@tlcolor #1% \hskip\leftmargindistance}} {\color[\@@tlrulecolor] @@ -797,16 +816,6 @@ %D Will move up: - -\setupblackrules - [\c!n=3, - \c!width=1em, - \c!height=1ex, - \c!depth=\!!zeropoint, - \c!alternative=\c!a, - \c!distance=.25ex, - \c!color=] - \setupmarginrules [\c!level=0, \c!rulethickness=\@@kadefaultwidth\linewidth] diff --git a/tex/context/base/spac-ali.mkiv b/tex/context/base/spac-ali.mkiv index 16fdddea6..34cddf952 100644 --- a/tex/context/base/spac-ali.mkiv +++ b/tex/context/base/spac-ali.mkiv @@ -534,7 +534,7 @@ \c_spacing_state_direction \zerocount % what is default ? \c_spacing_state_page \zerocount \ifcsname\??aligncommand\askedraggedalign\endcsname - \csname\??aligncommand\askedraggedalign\endcsname + \csname\??aligncommand\askedraggedalign\endcsname % not much gain in new method \else \rawprocesscommacommand[\askedraggedalign]\spacing_set_text_align_collect \fi diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index b3dea543c..d751c9c39 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 97eb83beb..90853d062 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/syst-ini.mkiv b/tex/context/base/syst-ini.mkiv index 05002f3f9..ab70126df 100644 --- a/tex/context/base/syst-ini.mkiv +++ b/tex/context/base/syst-ini.mkiv @@ -338,7 +338,7 @@ \newbox \scratchboxone \newbox \scratchboxtwo \newbox \scratchboxthree %D \macros -%D {scratchwidth, scratchheight, scratchdepth, scratchoffset} +%D {scratchwidth, scratchheight, scratchdepth, scratchoffset, scratchdistance} %D %D A few more scratch dimensions: @@ -346,6 +346,7 @@ \newdimen\scratchheight \newdimen\scratchdepth \newdimen\scratchoffset +\newdimen\scratchdistance %D More allocations: diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 9763c8c59..5c5666d9d 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 : 12/31/11 13:16:01 +-- merge date : 12/31/11 15:44:57 do -- begin closure to overcome local limits and interference -- cgit v1.2.3