diff options
Diffstat (limited to 'tex')
29 files changed, 165 insertions, 80 deletions
diff --git a/tex/context/base/cldf-com.lua b/tex/context/base/cldf-com.lua index ab20e2e89..a579566f7 100644 --- a/tex/context/base/cldf-com.lua +++ b/tex/context/base/cldf-com.lua @@ -69,7 +69,7 @@ end -- plain variants function context.chardef(cs,u) - context(format([[\chardef\%s=%s\relax]],k)) + context(format([[\chardef\%s=%s\relax]],k)) -- context does already do format end function context.par() diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index 6b002fc4a..d204178fb 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2010.12.21 10:50} +\newcontextversion{2010.12.22 14:07} %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.tex b/tex/context/base/context.tex index 5417ffe44..df01b40e3 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2010.12.21 10:50} +\edef\contextversion{2010.12.22 14:07} %D For those who want to use this: diff --git a/tex/context/base/core-con.mkiv b/tex/context/base/core-con.mkiv index 58dc2f68e..08384a76b 100644 --- a/tex/context/base/core-con.mkiv +++ b/tex/context/base/core-con.mkiv @@ -862,4 +862,17 @@ \mathematics{\ast\ast}, \mathematics{\ast\ast\ast}] +%D Iteration of suggestion by WS on mailinglist 2010.12.22: +%D +%D \starttyping +%D \setupfloatsplitting[conversion=continued] +%D \stoptyping + +\unexpanded\def\continuednumber#1% + {\labeltext{\ifcase#1\or\else\v!continued\fi}} + +\defineconversion + [\v!continued] + [\continuednumber] + \protect \endinput diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index bd20f2d6f..c1231fb81 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -153,7 +153,7 @@ end) function definers.registered(hash) local id = fonts.internalized[hash] - return id, id and fonts.identifiers[id] + return id, id and fontdata[id] end function definers.register(tfmdata,id) @@ -569,6 +569,7 @@ function definers.stage_two(global,cs,str,size,classfeatures,fontfeatures,classf if not tfmdata then report_define("unable to define %s as \\%s",name,cs) texsetcount("global","lastfontid",-1) + context.letvaluerelax(cs) -- otherwise the current definition takes the previous one elseif type(tfmdata) == "number" then if trace_defining then report_define("reusing %s with id %s as \\%s (features: %s/%s, fallbacks: %s/%s, goodies: %s/%s)", @@ -993,3 +994,14 @@ end function fonts.currentid() return currentfont() or 0 end + +-- interfaces + +function commands.doifelsecurrentfonthasfeature(name) -- can be made faster with a supportedfeatures hash + local f = fontdata[currentfont()] + f = f and f.shared + f = f and f.otfdata + f = f and f.luatex + f = f and f.features + commands.doifelse(f and (f.gpos[name] or f.gsub[name])) +end diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua index b9d8c403b..a195fabd1 100644 --- a/tex/context/base/font-def.lua +++ b/tex/context/base/font-def.lua @@ -375,7 +375,7 @@ function tfm.read(specification) end end if not tfmtable then - report_define("font with name %s is not found",specification.name) + report_define("font with asked name '%s' is not found using lookup '%s'",specification.name,specification.lookup) end return tfmtable end diff --git a/tex/context/base/font-ini.mkiv b/tex/context/base/font-ini.mkiv index 70ea02a36..932f471ef 100644 --- a/tex/context/base/font-ini.mkiv +++ b/tex/context/base/font-ini.mkiv @@ -165,9 +165,11 @@ % \newtoks \everydefinedfont % not ot be confused with \everydefinefont +\let\thedefinedfont\relax + \def\dodefinedfont[#1]% {\iffirstargument\definefont[thedefinedfont][#1]\fi % we can speed this one up - \csname thedefinedfont\endcsname + \thedefinedfont \the\everydefinedfont} \unexpanded\def\definedfont @@ -4185,22 +4187,12 @@ \def\dolookupgetkey #1{\ctxlua{tex.write(fonts.names.getlookupkey("#1"))}} \def\cleanfontname #1{\ctxlua{fonts.cleanname("#1")}} -\protect \endinput - -% \startluacode -% function commands.doifelsecurrentfonthasfeature(name) -% local f = fonts.identifiers[font.current()] -% f = f and f.shared -% f = f and f.otfdata -% f = f and f.luatex -% f = f and f.features -% commands.doifelse(f and (f.gpos[name] or f.gsub[name])) -% end -% \stopluacode - -% \def\doifelsecurrentfonthasfeature#1% -% {\ctxlua{commands.doifelsecurrentfonthasfeature("#1")}} - % \doifelsecurrentfonthasfeature{smcp}{YES}{NO} % \doifelsecurrentfonthasfeature{crap}{YES}{NO} % \doifelsecurrentfonthasfeature{kern}{YES}{NO} + +\def\doifelsecurrentfonthasfeature#1% + {\ctxlua{commands.doifelsecurrentfonthasfeature("#1")}} + +\protect \endinput + diff --git a/tex/context/base/lang-ger.tex b/tex/context/base/lang-ger.tex index cfab5e2bc..04551a891 100644 --- a/tex/context/base/lang-ger.tex +++ b/tex/context/base/lang-ger.tex @@ -119,36 +119,36 @@ \s!patterns=\s!af] % was nl \installlanguage - [\s!nb] - [spacing=packed, - lefthyphenmin=2, - righthyphenmin=2, - leftsentence=---, - rightsentence=---, - leftsubsentence=---, - rightsubsentence=---, - leftquote=\upperleftsinglesixquote, - rightquote=\upperrightsingleninequote, - leftquotation=\leftguillemot, - rightquotation=\rightguillemot, - date={day,{.},\ ,month,\ ,year}, - state=stop] + [\s!nb] + [spacing=packed, + lefthyphenmin=2, + righthyphenmin=2, + leftsentence=---, + rightsentence=---, + leftsubsentence=---, + rightsubsentence=---, + leftquote=\upperleftsinglesixquote, + rightquote=\upperrightsingleninequote, + leftquotation=\leftguillemot, + rightquotation=\rightguillemot, + date={day,{.},\ ,month,\ ,year}, + state=stop] \installlanguage - [\s!nn] - [spacing=packed, - lefthyphenmin=2, - righthyphenmin=2, - leftsentence=---, - rightsentence=---, - leftsubsentence=---, - rightsubsentence=---, - leftquote=\upperleftsinglesixquote, - rightquote=\upperrightsingleninequote, - leftquotation=\leftguillemot, - rightquotation=\rightguillemot, - date={day,{.},\ ,month,\ ,year}, - state=stop] + [\s!nn] + [spacing=packed, + lefthyphenmin=2, + righthyphenmin=2, + leftsentence=---, + rightsentence=---, + leftsubsentence=---, + rightsubsentence=---, + leftquote=\upperleftsinglesixquote, + rightquote=\upperrightsingleninequote, + leftquotation=\leftguillemot, + rightquotation=\rightguillemot, + date={day,{.},\ ,month,\ ,year}, + state=stop] \installlanguage [\s!no] [\s!nb] \installlanguage [\s!norwegian] [\s!nb] @@ -620,6 +620,7 @@ \setuplabeltext [\s!nl] [\v!hereafter=hieronder] \setuplabeltext [\s!nl] [\v!see=zie ] \setuplabeltext [\s!nl] [\v!and= en ] +\setuplabeltext [\s!nl] [\v!continued={ (vervolged)}] \setuplabeltext [\s!en] [\v!page=page ] \setuplabeltext [\s!en] [\v!atpage=at page ] @@ -627,6 +628,7 @@ \setuplabeltext [\s!en] [\v!hereafter=as we show below] \setuplabeltext [\s!en] [\v!see=see ] \setuplabeltext [\s!en] [\v!and= and ] +\setuplabeltext [\s!en] [\v!continued={ (continued)}] \setuplabeltext [\s!de] [\v!page=Seite ] \setuplabeltext [\s!de] [\v!atpage=auf Seite ] diff --git a/tex/context/base/lang-grk.tex b/tex/context/base/lang-grk.tex index e4ba781eb..862f3c5f4 100644 --- a/tex/context/base/lang-grk.tex +++ b/tex/context/base/lang-grk.tex @@ -85,10 +85,15 @@ \installlanguage [\s!agr] [\s!default=\s!gr, + \c!leftquote=\upperleftsinglesixquote, + \c!rightquote=\upperrightsingleninequote, + \c!leftquotation=\upperleftdoublesixquote, + \c!rightquotation=\upperrightdoubleninequote, \s!patterns=\s!agr, - \s!mapping=\s!agr, - \s!encoding=\s!agr] + \s!mapping=\s!agr, % not needed for mkiv + \s!encoding=\s!agr] % not needed for mkiv \installlanguage [ancientgreek] [\s!agr] +\installlanguage [grk] [\s!agr] \protect \endinput diff --git a/tex/context/base/m-database.mkiv b/tex/context/base/m-database.mkiv index d89185c10..56aed04de 100644 --- a/tex/context/base/m-database.mkiv +++ b/tex/context/base/m-database.mkiv @@ -18,34 +18,59 @@ \unprotect -% \ifdefined \installparameterhandler \else \input mult-aux.mkiv \fi - \def\c!first {first} \def\c!last {last} \def\c!quotechar {quotechar} \def\c!commentchar {commentchar} -\def\????db{@@@@db} - -\installparameterhandler \????db {database} -\installcommandhandler \????db {database} \????db % #3 == defaultroot -\installattributehandler \????db {database} - -\appendtoks - \getparameters - [\????db\currentdatabase] - [\c!separator={,}, - \c!quotechar=, - \c!commentchar=, - \c!setups=, - \c!before=, - \c!after=, - \c!first=, - \c!last=, - \c!left=, - \c!right=, - \c!command=]% -\to \everypresetdatabase +% \def\????db{@@@@db} +% +% \installparameterhandler \????db {database} +% \installcommandhandler \????db {database} \????db % #3 == defaultroot +% \installattributehandler \????db {database} +% +% or: +% +% \installnamespace{db} \installcommandhandler\????db{database}\????db +% +% \appendtoks +% \getparameters +% [\????db\currentdatabase] +% [\c!separator={,}, +% \c!quotechar=, +% \c!commentchar=, +% \c!setups=, +% \c!before=, +% \c!after=, +% \c!first=, +% \c!last=, +% \c!left=, +% \c!right=, +% \c!command=]% +% \to \everypresetdatabase +% +% or: + +\definenamespace + [db] + [type=module, + comment=database module, + version=1, + name=database, + parent=db, + setup=yes, + command=yes] + +\setupdatabase + [\c!separator={,}, + \c!quotechar=, + \c!commentchar=, + \c!before=, + \c!after=, + \c!first=, + \c!last=, + \c!left=, + \c!right=] % \let\currentdatabase\empty \the\everypresetdatabase % or just: @@ -96,6 +121,10 @@ \def\processseparatedfile[#1][#2]% {\processdatabasefile[#1][#2]} +\def\startseparatedlist[#1]% to be interfaced + {\def\stopseparatedlist{\processdatabasebuffer[#1][#1]}% + \dostartbuffer[#1][startseparatedlist][stopseparatedlist]} + \protect \doifnotmode{demo}{\endinput} @@ -204,4 +233,9 @@ a,b,c,č d,e,f,š \stopCSV +\startseparatedlist[CSV] +a,b,c,č +d,e,f,š +\stopseparatedlist + \stoptext diff --git a/tex/context/base/mult-aux.lua b/tex/context/base/mult-aux.lua index be2d282b6..349250071 100644 --- a/tex/context/base/mult-aux.lua +++ b/tex/context/base/mult-aux.lua @@ -6,6 +6,8 @@ if not modules then modules = { } end modules ['mult-aux'] = { license = "see context related readme files" } +local find = string.find + interfaces.namespaces = interfaces.namespaces or { } local namespaces = interfaces.namespaces local variables = interfaces.variables @@ -50,8 +52,10 @@ function namespaces.define(namespace,settings) if trace_namespaces then report_namespaces("namespace '%s' for '%s' uses parent '%s'",namespace,name,parent) end - parent = "\\" .. prefix .. parent - -- todo: check if defined + if not find(parent,"\\") then + parent = "\\" .. prefix .. parent + -- todo: check if defined + end end context.installparameterhandler(self,name) if trace_namespaces then diff --git a/tex/context/base/mult-de.tex b/tex/context/base/mult-de.tex index a7aaf52f9..0f18b009a 100644 --- a/tex/context/base/mult-de.tex +++ b/tex/context/base/mult-de.tex @@ -126,6 +126,7 @@ \setinterfacevariable{content}{inhalt} \setinterfacevariable{contents}{inhalte} \setinterfacevariable{continue}{fortsetzten} +\setinterfacevariable{continued}{continued} \setinterfacevariable{controls}{controls} \setinterfacevariable{conversion}{konversion} \setinterfacevariable{current}{aktuell} diff --git a/tex/context/base/mult-def.lua b/tex/context/base/mult-def.lua index d503215b4..2214c7eda 100644 --- a/tex/context/base/mult-def.lua +++ b/tex/context/base/mult-def.lua @@ -12465,6 +12465,10 @@ return { ["pe"]="ادامه", ["ro"]="continuu", }, + ["continued"]={ + ["en"]="continued", + ["nl"]="vervolgd", + }, ["controls"]={ ["cs"]="controls", ["de"]="controls", diff --git a/tex/context/base/mult-en.tex b/tex/context/base/mult-en.tex index 3da09fdbf..9263f465c 100644 --- a/tex/context/base/mult-en.tex +++ b/tex/context/base/mult-en.tex @@ -126,6 +126,7 @@ \setinterfacevariable{content}{content} \setinterfacevariable{contents}{contents} \setinterfacevariable{continue}{continue} +\setinterfacevariable{continued}{continued} \setinterfacevariable{controls}{controls} \setinterfacevariable{conversion}{conversion} \setinterfacevariable{current}{current} diff --git a/tex/context/base/mult-fr.tex b/tex/context/base/mult-fr.tex index e8ed2ce99..29adf8314 100644 --- a/tex/context/base/mult-fr.tex +++ b/tex/context/base/mult-fr.tex @@ -126,6 +126,7 @@ \setinterfacevariable{content}{contenu} \setinterfacevariable{contents}{contenus} \setinterfacevariable{continue}{continue} +\setinterfacevariable{continued}{continued} \setinterfacevariable{controls}{controles} \setinterfacevariable{conversion}{conversion} \setinterfacevariable{current}{courant} diff --git a/tex/context/base/mult-it.tex b/tex/context/base/mult-it.tex index 97f3675cd..b1fa81a66 100644 --- a/tex/context/base/mult-it.tex +++ b/tex/context/base/mult-it.tex @@ -126,6 +126,7 @@ \setinterfacevariable{content}{indice} \setinterfacevariable{contents}{indici} \setinterfacevariable{continue}{continua} +\setinterfacevariable{continued}{continued} \setinterfacevariable{controls}{controlli} \setinterfacevariable{conversion}{coversione} \setinterfacevariable{current}{corrente} diff --git a/tex/context/base/mult-nl.tex b/tex/context/base/mult-nl.tex index 2036b9cb7..772e7bb6d 100644 --- a/tex/context/base/mult-nl.tex +++ b/tex/context/base/mult-nl.tex @@ -126,6 +126,7 @@ \setinterfacevariable{content}{inhoud} \setinterfacevariable{contents}{inhouden} \setinterfacevariable{continue}{verder} +\setinterfacevariable{continued}{vervolgd} \setinterfacevariable{controls}{sturing} \setinterfacevariable{conversion}{conversie} \setinterfacevariable{current}{huidige} diff --git a/tex/context/base/mult-pe.tex b/tex/context/base/mult-pe.tex index 94a6c1c11..61de69d6c 100644 --- a/tex/context/base/mult-pe.tex +++ b/tex/context/base/mult-pe.tex @@ -126,6 +126,7 @@ \setinterfacevariable{content}{محتوا} \setinterfacevariable{contents}{محتویات} \setinterfacevariable{continue}{ادامه} +\setinterfacevariable{continued}{continued} \setinterfacevariable{controls}{کنترلها} \setinterfacevariable{conversion}{تبدیل} \setinterfacevariable{current}{جاری} diff --git a/tex/context/base/mult-ro.tex b/tex/context/base/mult-ro.tex index d420db837..33649b07c 100644 --- a/tex/context/base/mult-ro.tex +++ b/tex/context/base/mult-ro.tex @@ -126,6 +126,7 @@ \setinterfacevariable{content}{cuprins} \setinterfacevariable{contents}{cuprinsuri} \setinterfacevariable{continue}{continuu} +\setinterfacevariable{continued}{continued} \setinterfacevariable{controls}{controale} \setinterfacevariable{conversion}{conversie} \setinterfacevariable{current}{curent} diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv index 497520723..9105d5e23 100644 --- a/tex/context/base/syst-aux.mkiv +++ b/tex/context/base/syst-aux.mkiv @@ -2718,7 +2718,9 @@ \long\def\sixthofsixarguments #1#2#3#4#5#6{#6} %D \macros -%D {globalletempty,letempty,letvalueempty,letgvalueempty} +%D {globalletempty,letempty, +%D letvalueempty,letgvalueempty, +%D letvaluerelax,letgvaluerelax} %D %D Trivial: @@ -2727,6 +2729,8 @@ \def\letvalueempty #1{\expandafter\let\csname#1\endcsname\empty} \def\letgvalueempty#1{\global\expandafter\let\csname#1\endcsname\empty} +\def\letvaluerelax #1{\expandafter\let\csname#1\endcsname\relax} +\def\letgvalurelax #1{\global\expandafter\let\csname#1\endcsname\relax} %D \macros %D {wait} diff --git a/tex/context/interface/keys-cs.xml b/tex/context/interface/keys-cs.xml index 9038deb62..01e3a8aa8 100644 --- a/tex/context/interface/keys-cs.xml +++ b/tex/context/interface/keys-cs.xml @@ -129,6 +129,7 @@ <cd:variable name='content' value='obsah'/> <cd:variable name='contents' value='obsah'/> <cd:variable name='continue' value='pokracovat'/> + <cd:variable name='continued' value='continued'/> <cd:variable name='controls' value='controls'/> <cd:variable name='conversion' value='konverze'/> <cd:variable name='current' value='aktualni'/> diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml index bb53fecb6..369c02150 100644 --- a/tex/context/interface/keys-de.xml +++ b/tex/context/interface/keys-de.xml @@ -129,6 +129,7 @@ <cd:variable name='content' value='inhalt'/> <cd:variable name='contents' value='inhalte'/> <cd:variable name='continue' value='fortsetzten'/> + <cd:variable name='continued' value='continued'/> <cd:variable name='controls' value='controls'/> <cd:variable name='conversion' value='konversion'/> <cd:variable name='current' value='aktuell'/> diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml index bc30b0790..725f5b584 100644 --- a/tex/context/interface/keys-en.xml +++ b/tex/context/interface/keys-en.xml @@ -129,6 +129,7 @@ <cd:variable name='content' value='content'/> <cd:variable name='contents' value='contents'/> <cd:variable name='continue' value='continue'/> + <cd:variable name='continued' value='continued'/> <cd:variable name='controls' value='controls'/> <cd:variable name='conversion' value='conversion'/> <cd:variable name='current' value='current'/> diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml index 2cb38889b..fc888363d 100644 --- a/tex/context/interface/keys-fr.xml +++ b/tex/context/interface/keys-fr.xml @@ -129,6 +129,7 @@ <cd:variable name='content' value='contenu'/> <cd:variable name='contents' value='contenus'/> <cd:variable name='continue' value='continue'/> + <cd:variable name='continued' value='continued'/> <cd:variable name='controls' value='controles'/> <cd:variable name='conversion' value='conversion'/> <cd:variable name='current' value='courant'/> diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml index 9dafa4972..2ceb1d797 100644 --- a/tex/context/interface/keys-it.xml +++ b/tex/context/interface/keys-it.xml @@ -129,6 +129,7 @@ <cd:variable name='content' value='indice'/> <cd:variable name='contents' value='indici'/> <cd:variable name='continue' value='continua'/> + <cd:variable name='continued' value='continued'/> <cd:variable name='controls' value='controlli'/> <cd:variable name='conversion' value='coversione'/> <cd:variable name='current' value='corrente'/> diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml index d4072b8bf..8b7bfb4f9 100644 --- a/tex/context/interface/keys-nl.xml +++ b/tex/context/interface/keys-nl.xml @@ -129,6 +129,7 @@ <cd:variable name='content' value='inhoud'/> <cd:variable name='contents' value='inhouden'/> <cd:variable name='continue' value='verder'/> + <cd:variable name='continued' value='vervolgd'/> <cd:variable name='controls' value='sturing'/> <cd:variable name='conversion' value='conversie'/> <cd:variable name='current' value='huidige'/> diff --git a/tex/context/interface/keys-pe.xml b/tex/context/interface/keys-pe.xml index a5417f655..23a7ab4a6 100644 --- a/tex/context/interface/keys-pe.xml +++ b/tex/context/interface/keys-pe.xml @@ -129,6 +129,7 @@ <cd:variable name='content' value='محتوا'/> <cd:variable name='contents' value='محتویات'/> <cd:variable name='continue' value='ادامه'/> + <cd:variable name='continued' value='continued'/> <cd:variable name='controls' value='کنترلها'/> <cd:variable name='conversion' value='تبدیل'/> <cd:variable name='current' value='جاری'/> diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml index b8ca16483..9c983af86 100644 --- a/tex/context/interface/keys-ro.xml +++ b/tex/context/interface/keys-ro.xml @@ -129,6 +129,7 @@ <cd:variable name='content' value='cuprins'/> <cd:variable name='contents' value='cuprinsuri'/> <cd:variable name='continue' value='continuu'/> + <cd:variable name='continued' value='continued'/> <cd:variable name='controls' value='controale'/> <cd:variable name='conversion' value='conversie'/> <cd:variable name='current' value='curent'/> diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 2a496e9cd..b4d2eeeb0 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 : 12/21/10 10:50:53 +-- merge date : 12/22/10 14:07:33 do -- begin closure to overcome local limits and interference @@ -15383,7 +15383,7 @@ function tfm.read(specification) end end if not tfmtable then - report_define("font with name %s is not found",specification.name) + report_define("font with asked name '%s' is not found using lookup '%s'",specification.name,specification.lookup) end return tfmtable end |