diff options
author | Marius <mariausol@gmail.com> | 2011-11-17 12:20:13 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-11-17 12:20:13 +0200 |
commit | ae67f36ed753efaa7398f0659b27ed2f1d73cca2 (patch) | |
tree | 34b1d69c2576d071f5f6032afc4e3a22945096e3 /tex | |
parent | 11522bc3fe614d955574729c1236d6bfc5a3d5b2 (diff) | |
download | context-ae67f36ed753efaa7398f0659b27ed2f1d73cca2.tar.gz |
beta 2011.11.17 10:54
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4064 -> 4069 bytes | |||
-rw-r--r-- | tex/context/base/context-version.png | bin | 105911 -> 105969 bytes | |||
-rw-r--r-- | tex/context/base/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/phys-dim.lua | 27 | ||||
-rw-r--r-- | tex/context/base/phys-dim.mkiv | 23 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24021 -> 24017 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 167852 -> 167813 bytes | |||
-rw-r--r-- | tex/context/base/strc-flt.mkvi | 25 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
12 files changed, 55 insertions, 30 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 6338773da..96cf4d33f 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.11.17 09:18} +\newcontextversion{2011.11.17 10:54} %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 95d01d2b3..8edc7c983 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.11.17 09:18} +\newcontextversion{2011.11.17 10:54} %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 Binary files differindex 1828b1acb..fc19b09c1 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 fadb8f369..4785077a1 100644 --- a/tex/context/base/context-version.png +++ b/tex/context/base/context-version.png diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 916b5f19a..42a8e89b2 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.11.17 09:18} +\edef\contextversion{2011.11.17 10:54} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index c4b7279e2..24ea2a31d 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.11.17 09:18} +\edef\contextversion{2011.11.17 10:54} %D For those who want to use this: diff --git a/tex/context/base/phys-dim.lua b/tex/context/base/phys-dim.lua index 18aac2170..37a6ef9aa 100644 --- a/tex/context/base/phys-dim.lua +++ b/tex/context/base/phys-dim.lua @@ -38,9 +38,9 @@ local period = P(".") local semicolon = P(";") local colon = P(":") local signspace = P("/") -local positive = S("p") -local negative = S("n") -local highspace = P("s") +local positive = P("++") -- was p +local negative = P("--") -- was n +local highspace = P("//") -- was s local padding = P("=") local plus = P("+") local minus = P("-") @@ -73,7 +73,7 @@ local dpower = power / "" * ( ) local dpadding = padding / "" / context.digitszeropadding -- todo -local dleader = (dsomesign + dsignspace + dpositive + dnegative + dhighspace)^0 +local dleader = (dpositive + dnegative + dhighspace + dsomesign + dsignspace)^0 local dtrailer = dpower^0 local dfinal = P(-1) + #P(1 - comma - period - semicolon - colon) local dnumber = (ddigitspace + ddigit)^1 @@ -92,9 +92,14 @@ local dfallback = (dtemplate * (dcommanop + dperiodnop)^0)^0 * (dcommayes + local p_c_number = (dcpinternumber)^0 * (dpcfinalnumber)^0 * ddigit + dfallback -- 000.000.000,00 local c_p_number = (dpcinternumber)^0 * (dcpfinalnumber)^0 * ddigit + dfallback -- 000,000,000.00 +-- ony signs before numbers (otherwise we get s / seconds issues) +-- local p_c_dparser = dleader * p_c_number * dtrailer * dfinal local c_p_dparser = dleader * c_p_number * dtrailer * dfinal +-- local p_c_dparser = p_c_number * dtrailer * dfinal +-- local c_p_dparser = c_p_number * dtrailer * dfinal + function commands.digits(str,p_c) if p_c == v_reverse then matchlpeg(p_c_dparser,str) @@ -265,6 +270,7 @@ local short_units_to_long = { g = "Gram", n = "Newton", v = "Volt", + l = "Liter", Litre = "Liter", Metre = "Meter", @@ -345,8 +351,8 @@ local combination = P { "start", + V("s_prefix") * V("l_unit"), } ---~ inspect(s_prefix) ---~ inspect(s_unit) +-- inspect(s_prefix) +-- inspect(s_unit) -- square kilo meter -- square km @@ -435,9 +441,10 @@ end -- todo 0x -> rm -- pretty large lpeg (maybe do dimension lookup otherwise) +-- not ok yet ... we have this p n s problem -local dimension = ((l_suffix * combination) * Carg(1)) / dimspu - + ((combination * s_suffix) * Carg(1)) / dimpus +local dimension = ((l_suffix * combination) * Carg(1)) / dimspu + + ((combination * s_suffix) * Carg(1)) / dimpus local number = lpeg.patterns.number / unitsN local operator = C((l_operator + s_operator) * Carg(1)) / dimop -- weird, why is the extra C needed here local whatever = (P(1)^0) / unitsU @@ -453,8 +460,8 @@ local unitparser = dimension^1 * (operator * dimension^1)^-1 + whatever + P(-1) local p_c_unitdigitparser = (Cc(nil)/unitsNstart) * p_c_dparser * (Cc(nil)/unitsNstop) -- local c_p_unitdigitparser = (Cc(nil)/unitsNstart) * c_p_dparser * (Cc(nil)/unitsNstop) -- -local p_c_combinedparser = (p_c_unitdigitparser + number)^-1 * unitparser -local c_p_combinedparser = (c_p_unitdigitparser + number)^-1 * unitparser +local p_c_combinedparser = dleader * (p_c_unitdigitparser + number)^-1 * unitparser +local c_p_combinedparser = dleader * (c_p_unitdigitparser + number)^-1 * unitparser function commands.unit(str,wherefrom,p_c) if p_c == v_reverse then diff --git a/tex/context/base/phys-dim.mkiv b/tex/context/base/phys-dim.mkiv index 4df9d3ad9..25a988798 100644 --- a/tex/context/base/phys-dim.mkiv +++ b/tex/context/base/phys-dim.mkiv @@ -84,18 +84,17 @@ %D the grouped call. %D %D \starttabulate[|l|l|l|] -%D \NC \type{.} \NC , . \NC comma or period \NC \NR -%D \NC \type{,} \NC , . \NC comma or period \NC \NR -%D \NC \type{@} \NC \NC invisible space \NC \NR -%D \NC \type{_} \NC \NC invisible space \NC \NR -%D \NC \type{/} \NC \NC invisible sign \NC \NR -%D \NC \type{-} \NC $-$ \NC minus sign \NC \NR -%D \NC \type{+} \NC $+$ \NC plus sign \NC \NR -%D \NC \type{s} \NC \NC invisible high sign \NC \NR -%D \NC \type{p} \NC $\positive$ \NC high plus sign \NC \NR -%D \NC \type{m} \NC $\negative$ \NC high minus sign \NC \NR -%D \NC \type{n} \NC $\negative$ \NC high minus (negative) sign \NC \NR -%D \NC \type{=} \NC $\zeroamount$ \NC zero padding \NC \NR +%D \NC \type{.} \NC , . \NC comma or period \NC \NR +%D \NC \type{,} \NC , . \NC comma or period \NC \NR +%D \NC \type{@} \NC \NC invisible space \NC \NR +%D \NC \type{_} \NC \NC invisible space \NC \NR +%D \NC \type{/} \NC \NC invisible sign \NC \NR +%D \NC \type{-} \NC $-$ \NC minus sign \NC \NR +%D \NC \type{+} \NC $+$ \NC plus sign \NC \NR +%D \NC \type{//} \NC \NC invisible high sign \NC \NR +%D \NC \type{--} \NC $\negative$ \NC high minus sign \NC \NR +%D \NC \type{++} \NC $\positive$ \NC high plus sign \NC \NR +%D \NC \type{=} \NC $\zeroamount$ \NC zero padding \NC \NR %D \stoptabulate %D %D These triggers are used in the following examples. diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex d64097b5e..11381ea9b 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 e25ff5098..4fa0cafdb 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/strc-flt.mkvi b/tex/context/base/strc-flt.mkvi index 6196ae1ba..f6e1753b6 100644 --- a/tex/context/base/strc-flt.mkvi +++ b/tex/context/base/strc-flt.mkvi @@ -410,6 +410,16 @@ \setupcurrentfloatcaption[\c!reference={#reference},\c!title={#caption},\c!marking=,\c!list=,\c!bookmark=]% \doifinsetelse\v!split\floatlocation\place_next_float_box_split\place_next_float_box_normal} +\unexpanded\def\placefloat + {\flushnotes + \flushsidefloats % here ! + \float_begin_group + \dotripleempty\float_place_float} + +\def\float_place_float[#tag]% + {\float_set_current_tag{#tag}% + \float_place_indeed} + % start-stop \unexpanded\def\float_start_place#tag% @@ -435,6 +445,18 @@ {\removeunwantedspaces \egroup} +\unexpanded\def\startplacefloat + {\flushnotes + \flushsidefloats % here ! + \float_begin_group + \dodoubleempty\float_start_place_float} + +\def\float_start_place_float[#tag]% + {\float_set_current_tag{#tag}% + \float_start_place_indeed} + +\let\stopplacefloat\float_stop_place + % reserve \unexpanded\def\float_reserve#tag% @@ -884,9 +906,6 @@ \doifnot{\floatparameter\c!location}\v!right\hss}}}% \fi}} -\unexpanded\def\placefloat - {\dotripleempty\docomplexplacefloat} - \unexpanded\def\placefloats {\doflushfloats} diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 431ad16cf..614d75dea 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/17/11 09:18:11 +-- merge date : 11/17/11 10:54:57 do -- begin closure to overcome local limits and interference |