diff options
author | Marius <mariausol@gmail.com> | 2011-05-05 13:20:15 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2011-05-05 13:20:15 +0300 |
commit | 9ab2e8aeda3e1bf1934072144bff60316861890f (patch) | |
tree | 6d7a231d519584fde3e258fd06dd6e672fce7c2c | |
parent | baa03d50225f83baa646c9daa7556f9b2ddf3424 (diff) | |
download | context-9ab2e8aeda3e1bf1934072144bff60316861890f.tar.gz |
beta 2011.05.05 12:10
-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.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/core-def.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/lang-def.mkiv | 4 | ||||
-rw-r--r-- | tex/context/base/math-ali.mkiv | 7 | ||||
-rw-r--r-- | tex/context/base/math-vfu.lua | 2 | ||||
-rw-r--r-- | tex/context/base/s-lan-04.mkiv | 153 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 23521 -> 23530 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 154272 -> 154266 bytes | |||
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 2 |
12 files changed, 168 insertions, 10 deletions
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index b61f3acfb..b4b8b50dc 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.05.04 16:06} +\newcontextversion{2011.05.05 12:10} %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 3f1c2982d..b1745d6ef 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.05.04 16:06} +\newcontextversion{2011.05.05 12:10} %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.mkii b/tex/context/base/context.mkii index c2ed0a1fb..574d9fa39 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.05.04 16:06} +\edef\contextversion{2011.05.05 12:10} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 078e5f55a..39d1f3df4 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.05.04 16:06} +\edef\contextversion{2011.05.05 12:10} %D For those who want to use this: diff --git a/tex/context/base/core-def.mkii b/tex/context/base/core-def.mkii index 840f853a7..ff7283356 100644 --- a/tex/context/base/core-def.mkii +++ b/tex/context/base/core-def.mkii @@ -91,7 +91,7 @@ \def\synctexwarning {\ifdefined\synctex \ifnum\synctex=\zerocount \else \writeline - \writestatus\m!systems{BEWARE: syntex functionality is enabled!}% + \writestatus\m!systems{BEWARE: synctex functionality is enabled!}% \writeline \globallet\synctexwarning\relax \fi \fi} diff --git a/tex/context/base/lang-def.mkiv b/tex/context/base/lang-def.mkiv index 401065adb..cf2ab9730 100644 --- a/tex/context/base/lang-def.mkiv +++ b/tex/context/base/lang-def.mkiv @@ -628,9 +628,9 @@ \c!leftsubsentence=---, \c!rightsubsentence=---, \c!leftquote=\upperleftsinglesixquote, - \c!rightquote=\lowerrightsingleninequote, + \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, - \c!rightquotation=\lowerrightdoubleninequote, + \c!rightquotation=\upperrightdoubleninequote, \c!date={\v!day,\ ,\v!month,\ ,\v!year}] \installlanguage diff --git a/tex/context/base/math-ali.mkiv b/tex/context/base/math-ali.mkiv index cc4986520..54f942f03 100644 --- a/tex/context/base/math-ali.mkiv +++ b/tex/context/base/math-ali.mkiv @@ -857,8 +857,13 @@ %D Preliminary feature: %D %D {\em example code} +%D +%D The intertext commands have to be expandable (in aligment lookahead) so +%D we cannot use \type {\unexpanded}. + +\let\stopintertext\relax -\unexpanded\def\startintertext#1\stopintertext +\def\startintertext#1\stopintertext {\noalign{\dointertext{#1}}} \def\intertext#1% diff --git a/tex/context/base/math-vfu.lua b/tex/context/base/math-vfu.lua index afb4c1be2..894398b14 100644 --- a/tex/context/base/math-vfu.lua +++ b/tex/context/base/math-vfu.lua @@ -380,7 +380,7 @@ function vfmath.define(specification,set,goodies) main = s end local f, id = fonts.constructors.readanddefine(ssname,size) - if not f then + if not f or id == 0 then report_virtual("loading font %s subfont %s with name %s at %s is skipped, not found",name,s,ssname,size) else n = n + 1 diff --git a/tex/context/base/s-lan-04.mkiv b/tex/context/base/s-lan-04.mkiv new file mode 100644 index 000000000..3fb575299 --- /dev/null +++ b/tex/context/base/s-lan-04.mkiv @@ -0,0 +1,153 @@ +%D \module +%D [ file=s-lan-04, +%D version=2011.05.01, +%D title=\CONTEXT\ Style File, +%D subtitle=Language Environment 4, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D For Mojca. + +\startluacode + local a_colormodel = attributes.private('colormodel') + + local nodecodes = nodes.nodecodes + local nodepool = nodes.pool + local disc = nodecodes.disc + local glyph = nodecodes.glyph + local quads = fonts.hashes.quads + local newkern = nodepool.kern + local newrule = nodepool.rule + local newglue = nodepool.glue + + local get_attribute = node.has_attribute + + local tracers = nodes.tracers + local colortracers = tracers and tracers.colors + local setnodecolor = colortracers.set + + local function identify(head,marked) + local current, prev = head, nil + while current do + local id = current.id + local next = current.next + if id == disc then + if prev and next.id == glyph then -- catch other usage of disc + marked[#marked+1] = prev + end + elseif id == glyph then + prev = current + end + current = next + end + end + + local function strip(head,marked) + for i=1,#marked do + local prev = marked[i] + nodes.remove(head,prev.next,true) + end + end + + local function mark(head,marked,what,how) + for i=1,#marked do + local prev = marked[i] + local font = prev.font + local quad = quads[font] + head, prev = node.insert_after(head,prev,newkern(-quad/40)) + if what then + local rule = newrule(quad/20,.75*quad,0) + head, prev = node.insert_after(head,prev,rule) + setnodecolor(rule,how,get_attribute(prev,a_colormodel)) + else + local rule = newrule(quad/20,0,.5*quad) + head, prev = node.insert_after(head,prev,rule) + setnodecolor(rule,how,get_attribute(prev,a_colormodel)) + end + head, prev = node.insert_after(head,prev,newkern(-quad/40)) + head, prev = node.insert_after(head,prev,newglue(0)) + end + end + + local language_one, language_two, tag_one, tag_two + + function nodes.showhyphens(head) + local marked_1, marked_2 = { }, { } + if language_one then + for n in node.traverse_id(glyph,head) do + n.lang = language_one + end + lang.hyphenate(head,node.slide(head)) + identify(head,marked_1) + strip(head,marked_1) + end + if language_two then + for n in node.traverse_id(glyph,head) do + n.lang = language_two + end + lang.hyphenate(head,node.slide(head)) + identify(head,marked_2) + strip(head,marked_2) + end + if tag_one then + mark(head,marked_1,true,"hyphenation:"..tag_one) + end + if tag_two then + mark(head,marked_2,false,"hyphenation:"..tag_two) + end + return head, true + end + + function languages.startcomparepatterns(list) + local list = utilities.parsers.settings_to_array(list) + tag_one = list[1] + tag_two = list[2] + language_one = tag_one and languages.getnumber(tag_one) + language_two = tag_two and languages.getnumber(tag_two) + -- nodes.tasks.appendaction("processors","words","nodes.showhyphens") + nodes.tasks.appendaction("processors","before","nodes.showhyphens") + nodes.tasks.enableaction("processors","nodes.showhyphens") + end + + function languages.stopcomparepatterns() + nodes.tasks.disableaction("processors","nodes.showhyphens") + end + +\stopluacode + +\unprotect + +\def\startcomparepatterns[#1]% + {\bgroup + \language\zerocount + \setupalign[\v!nothyphenated]% + \ctxlua{languages.startcomparepatterns("#1")}} + +\def\stopcomparepatterns + {\ctxlua{languages.stopcomparepatterns()}% + \egroup} + +\protect + +\definecolor[hyphenation:en] [r=.8] +\definecolor[hyphenation:de] [g=.8] +\definecolor[hyphenation:nl] [b=.8] + +\doifnotmode{demo}{\endinput} + +\starttext + + \startcomparepatterns[en,de] + \input tufte\par + \stopcomparepatterns + + \startcomparepatterns[de,nl] + \input tufte\par + \stopcomparepatterns + +\stoptext diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 83d886782..30de4263a 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 44aa6a290..b6a7cce99 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 58435c612..11fc6e347 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 05/04/11 16:06:03 +-- merge date : 05/05/11 12:10:55 do -- begin closure to overcome local limits and interference |