diff options
author | Hans Hagen <pragma@wxs.nl> | 2012-01-05 19:27:58 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2012-01-05 19:27:58 +0100 |
commit | 0b16692d7b6129a0a7087b86fe51bbc2d5ce03ce (patch) | |
tree | 201c44b7acd5dc7d9cb5db058f846c2e17a26984 /tex | |
parent | 351a9b8969960cc2a1b795a63de1a5a3d3e6e4d9 (diff) | |
download | context-0b16692d7b6129a0a7087b86fe51bbc2d5ce03ce.tar.gz |
beta 2012.01.02 21:59
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4072 -> 4071 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 104249 -> 104319 bytes | |||
-rw-r--r-- | tex/context/base/spac-ver.lua | 2 | ||||
-rw-r--r-- | tex/context/base/spac-ver.mkiv | 102 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24199 -> 24207 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 170104 -> 170108 bytes | |||
-rw-r--r-- | tex/context/base/status-mkiv.lua | 1 | ||||
-rw-r--r-- | tex/context/base/status-mkiv.tex | 3 | ||||
-rw-r--r-- | tex/context/base/tabl-xtb.mkvi | 6 |
9 files changed, 59 insertions, 55 deletions
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex b3213bb61..2b75912ca 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png Binary files differindex a273c3c82..3f70be95d 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/spac-ver.lua b/tex/context/base/spac-ver.lua index bb5a3f7f8..f9ef14da1 100644 --- a/tex/context/base/spac-ver.lua +++ b/tex/context/base/spac-ver.lua @@ -8,6 +8,8 @@ if not modules then modules = { } end modules ['spac-ver'] = { -- we also need to call the spacer for inserts! +-- todo: directly set skips + -- this code dates from the beginning and is kind of experimental; it -- will be optimized and improved soon -- diff --git a/tex/context/base/spac-ver.mkiv b/tex/context/base/spac-ver.mkiv index 4a37b0a3a..a84b49a18 100644 --- a/tex/context/base/spac-ver.mkiv +++ b/tex/context/base/spac-ver.mkiv @@ -17,19 +17,6 @@ \registerctxluafile{spac-ver}{1.001} -\newskip\blankskip \blankskip=\bigskipamount - -\def\skipfactor {.75} -\def\skipgluefactor{.25} - -\def\normalskipamount - {\openlineheight - \ifgridsnapping \else \ifblankflexible - \!!plus \skipgluefactor\openlineheight - \!!minus\skipgluefactor\openlineheight - \fi \fi - \relax} - %D There are two ways to influence the interline spacing. The %D most general and often most consistent way is using %D @@ -61,7 +48,18 @@ \newif\iflocalinterlinespace -% font-ini +\newskip\s_spac_vspacing_temp \s_spac_vspacing_temp\bigskipamount + +\def\skipfactor {.75} +\def\skipgluefactor{.25} + +\def\normalskipamount + {\openlineheight + \ifgridsnapping \else \ifblankflexible + \!!plus \skipgluefactor\openlineheight + \!!minus\skipgluefactor\openlineheight + \fi \fi + \relax} \ifx\bodyfontinterlinespecs\undefined @@ -70,7 +68,7 @@ \fi -\def\presetnormallineheight % each bodyfont +\unexpanded\def\presetnormallineheight % each bodyfont {\edef\normallineheight{\interlinespaceparameter\c!line}% %done elsewhere : \spacing\!!plusone % new per 10/08/2004, else problems in otr / !! needed \iflocalinterlinespace \else @@ -79,41 +77,43 @@ {\edef\normallineheight{\bodyfontinterlinespace}}}% \fi} -% to be tested: +% check and test: % -% \def\presetnormallineheight % each bodyfont +% \let\m_spac_linespacing_asked\empty +% +% \unexpanded\def\presetnormallineheight % each bodyfont % {\iflocalinterlinespace -% \spac_basics_set_lineheight_regular +% \spac_linespacing_set_lineheight_regular % \else -% \spac_basics_set_lineheight_checked +% \spac_linespacing_set_lineheight_checked % \fi} % -% \def\spac_basics_set_lineheight_regular +% \def\spac_linespacing_set_lineheight_regular % {\edef\normallineheight{\interlinespaceparameter\c!line}} % -% \def\spac_basics_set_lineheight_checked -% {\edef\askedbodyfontinterlinespecs{\bodyfontvariable{\normalizedbodyfontsize\c!interlinespace}}% -% \ifcsname\askedbodyfontinterlinespecs\endcsname -% \spac_basics_set_lineheight_specific +% \def\spac_linespacing_set_lineheight_checked +% {\edef\m_spac_linespacing_asked{\bodyfontvariable{\normalizedbodyfontsize\c!interlinespace}}% +% \ifcsname\m_spac_linespacing_asked\endcsname +% \spac_linespacing_set_lineheight_specific % \else -% \spac_basics_set_lineheight_regular +% \spac_linespacing_set_lineheight_regular % \fi} % -% \def\spac_basics_set_lineheight_specific -% {\edef\askedbodyfontinterlinespace{\csname\bodyfontinterlinespecs\endcsname}% -% \ifx\askedbodyfontinterlinespace\empty -% \spac_basics_set_lineheight_regular +% \def\spac_linespacing_set_lineheight_specific +% {\edef\m_spac_linespacing_asked{\csname\bodyfontinterlinespecs\endcsname}% +% \ifx\m_spac_linespacing_asked\empty +% \spac_linespacing_set_lineheight_regular % \else -% \let\normallineheight\askedbodyfontinterlinespace +% \let\normallineheight\m_spac_linespacing_asked % \fi} \let\currentrelativeinterlinespace\empty \unexpanded\def\setupspecifiedinterlinespace[#1]% {\getparameters[\??it\currentinterlinespace][#1]% - \dosetupspecifiedinterlinespaceindeed} + \spac_linespacing_setup_specified_interline_space} -\def\dosetupspecifiedinterlinespaceindeed +\def\spac_linespacing_setup_specified_interline_space {\edef\strutheightfactor {\interlinespaceparameter\c!height }% \edef\strutdepthfactor {\interlinespaceparameter\c!depth }% \edef\minimumstrutheight {\interlinespaceparameter\c!minheight}% @@ -132,35 +132,37 @@ \installcorenamespace{interlinespacerelative} +\let\setrelativeinterlinespace\relax % used elsewhere + \setvalue{\??interlinespacerelative\v!on }{\oninterlineskip} \setvalue{\??interlinespacerelative\v!off }{\offinterlineskip} \setvalue{\??interlinespacerelative\v!reset}{\let\currentrelativeinterlinespace\empty \let\setrelativeinterlinespace\relax \setfontparameters} -\setvalue{\??interlinespacerelative\v!auto }{\let\setrelativeinterlinespace\dosetrelativeinterlinespace} +\setvalue{\??interlinespacerelative\v!auto }{\let\setrelativeinterlinespace\spac_linespacing_set_relative_interlinespace} -\def\dosetspecifiedrelativeinterlinespace#1% fragile? +\def\spac_linespacing_set_specified_relative_interlinespace#1% fragile? {\doifdimenstringelse{#1} {\setupspecifiedinterlinespace[\c!line=#1]} {\assignvalue{#1}\currentrelativeinterlinespace{1.00}{1.25}{1.50}% \spacing\currentrelativeinterlinespace}} \unexpanded\def\setuprelativeinterlinespace[#1]% - {\processcommalist[#1]\dosetuprelativeinterlinespace} + {\processcommalist[#1]\spac_linespacing_setup_relative_interlinespace} -\def\dosetuprelativeinterlinespace#1% +\def\spac_linespacing_setup_relative_interlinespace#1% {\ifcsname\??interlinespacerelative#1\endcsname \csname\??interlinespacerelative#1\endcsname \else - \dosetspecifiedrelativeinterlinespace{#1}% + \spac_linespacing_set_specified_relative_interlinespace{#1}% \fi} -\def\dosetrelativeinterlinespace +\def\spac_linespacing_set_relative_interlinespace {\ifx\currentrelativeinterlinespace\empty\else \spacing\currentrelativeinterlinespace \fi} -\let\setrelativeinterlinespace\relax +% todo: use command handler here \newtoks\everysetupglobalinterlinespace \newtoks\everysetuplocalinterlinespace @@ -1471,7 +1473,7 @@ \newconditional\someblankdone \appendtoks - \blankskip\zeropoint + \s_spac_vspacing_temp\zeropoint \attribute\skipcategoryattribute\plusone \attribute\skippenaltyattribute \attributeunsetvalue \attribute\skiporderattribute \attributeunsetvalue @@ -1483,11 +1485,11 @@ \to \everybeforeblankhandling \appendtoks - \ifconditional\blankisfixed - \blankskip1\blankskip - \else - \blankskip1\blankskip\!!plus\skipgluefactor\blankskip\!!minus\skipgluefactor\blankskip - \fi + \s_spac_vspacing_temp\plusone\s_spac_vspacing_temp + \ifconditional\blankisfixed \else + \!!plus \skipgluefactor\s_spac_vspacing_temp + \!!minus\skipgluefactor\s_spac_vspacing_temp + \fi \to \everyafterblankhandling % \ifgridsnapping will go @@ -1515,7 +1517,7 @@ \def\addblankskip#1#2#3% {\settrue\someblankdone - \advance\blankskip#1\dimexpr\ifgridsnapping#3\else#2\fi\relax\relax} + \advance\s_spac_vspacing_temp#1\dimexpr\ifgridsnapping#3\else#2\fi\relax\relax} \def\setblankpenalty #1% {\flushblankhandling @@ -1543,14 +1545,14 @@ \unexpanded\def\stopblankhandling {\the\everyafterblankhandling \ifconditional\someblankdone - \vskip\blankskip + \vskip\s_spac_vspacing_temp \fi \endgroup} \def\flushblankhandling {\the\everyafterblankhandling \ifconditional\someblankdone - \vskip\blankskip + \vskip\s_spac_vspacing_temp \fi \setfalse\someblankdone \the\everybeforeblankhandling} @@ -1568,11 +1570,11 @@ \def\addpredefinedblankskip#1#2% {\settrue\someblankdone - \advance\blankskip#1\dimexpr\csname\??vspacingamount#2\endcsname\relax} + \advance\s_spac_vspacing_temp#1\dimexpr\csname\??vspacingamount#2\endcsname\relax} \def\addaskedblankskip#1#2% {\settrue\someblankdone - \advance\blankskip#1\dimexpr#2\relax} + \advance\s_spac_vspacing_temp#1\dimexpr#2\relax} \unexpanded\def\definevspacing {\dodoubleempty\dodefinevspacing} diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 896cfc66a..2450c93b4 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex ead91c158..5c297c1ff 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/status-mkiv.lua b/tex/context/base/status-mkiv.lua index 524f8e602..27e65c475 100644 --- a/tex/context/base/status-mkiv.lua +++ b/tex/context/base/status-mkiv.lua @@ -575,6 +575,7 @@ return { filename = "spac-ver", marktype = "mkiv", status = "unknown", + comment = "update lua code (communicate via register)" }, { filename = "spac-pag", diff --git a/tex/context/base/status-mkiv.tex b/tex/context/base/status-mkiv.tex index 82a737f43..4c764e4f7 100644 --- a/tex/context/base/status-mkiv.tex +++ b/tex/context/base/status-mkiv.tex @@ -92,7 +92,8 @@ local valid = table.tohash { "toks", "attr", "page", "buff", "font", "colo", "phys", "supp", "typo", "strc", "syst", "tabl", "spac", "scrn", "lang", "lxml", "mlib", "java", "pack", "math", - "symb", "grph", "anch", "luat", "mult", "back", "node", "meta", "module", + "symb", "grph", "anch", "luat", "mult", "back", "node", "meta", + "module", } context.startsubject { title = "Valid prefixes" } diff --git a/tex/context/base/tabl-xtb.mkvi b/tex/context/base/tabl-xtb.mkvi index 1f5ce8a18..6ddaf39e0 100644 --- a/tex/context/base/tabl-xtb.mkvi +++ b/tex/context/base/tabl-xtb.mkvi @@ -156,16 +156,14 @@ \buff_pickup{\tabl_x_current_buffer}{startxtable}{stopxtable}\relax\tabl_x_process} \unexpanded\def\processxtablebuffer - {\dosingleempty\tabl_x_process_buffer} - -\let\tabl_x_normal_start\tabl_x_start_table + {\dosingleempty\tabl_x_process_buffer_directly} % 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. -\def\tabl_x_process_buffer[#name]% +\def\tabl_x_process_buffer_directly[#name]% {\bgroup \let\tabl_x_start_table\tabl_x_process_buffer \edef\tabl_x_current_buffer{#name}% |