From 5d294d82a8a41aee6bf2121175c2ad07e5427872 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 8 May 2012 13:45:00 +0200 Subject: beta 2012.05.08 13:45 --- tex/context/base/cont-new.mkii | 2 +- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4074 -> 4076 bytes tex/context/base/context-version.png | Bin 105642 -> 105778 bytes tex/context/base/context.mkii | 2 +- tex/context/base/context.mkiv | 2 +- tex/context/base/font-pre.mkiv | 14 ++++- tex/context/base/m-punk.mkiv | 6 +- tex/context/base/mult-de.mkii | 7 +++ tex/context/base/mult-def.lua | 64 +++++++++++++++++++++ tex/context/base/mult-en.mkii | 7 +++ tex/context/base/mult-fr.mkii | 7 +++ tex/context/base/mult-it.mkii | 7 +++ tex/context/base/mult-nl.mkii | 7 +++ tex/context/base/mult-pe.mkii | 7 +++ tex/context/base/mult-ro.mkii | 7 +++ tex/context/base/status-files.pdf | Bin 24335 -> 24327 bytes tex/context/base/status-lua.pdf | Bin 173400 -> 173423 bytes tex/context/base/typo-cap.lua | 53 ++++++++++++++--- tex/context/base/typo-cap.mkiv | 32 +++++------ tex/context/interface/keys-cs.xml | 7 +++ tex/context/interface/keys-de.xml | 7 +++ tex/context/interface/keys-en.xml | 7 +++ tex/context/interface/keys-fr.xml | 7 +++ tex/context/interface/keys-it.xml | 7 +++ tex/context/interface/keys-nl.xml | 7 +++ tex/context/interface/keys-pe.xml | 7 +++ tex/context/interface/keys-ro.xml | 7 +++ tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 29 files changed, 248 insertions(+), 36 deletions(-) diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 103b9dcc2..8adf91336 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{2012.05.07 23:33} +\newcontextversion{2012.05.08 13:45} %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 b90f0a90b..1e3a5f322 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{2012.05.07 23:33} +\newcontextversion{2012.05.08 13:45} %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 ac28b6b6b..c0a61df16 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 5edc6dfd8..bc3de34f4 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 3c582bdeb..7d71cb376 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{2012.05.07 23:33} +\edef\contextversion{2012.05.08 13:45} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 502a61ef0..b37a01ad7 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{2012.05.07 23:33} +\edef\contextversion{2012.05.08 13:45} %D For those who want to use this: diff --git a/tex/context/base/font-pre.mkiv b/tex/context/base/font-pre.mkiv index 5ccf1a988..9a2c45172 100644 --- a/tex/context/base/font-pre.mkiv +++ b/tex/context/base/font-pre.mkiv @@ -412,9 +412,17 @@ %D We treat {\sc Small Caps} and \cap {Pseudo Caps} a bit %D different. We also provide an \WORD {uppercase} style. -\definealternativestyle [\v!cap,\v!capital] [\smallcapped] [\smallcapped] -\definealternativestyle [\v!smallcaps] [\sc] [\sc] -\definealternativestyle [\v!WORD] [\WORD] [\WORD] +\definealternativestyle [\v!smallcaps] [\sc] [\sc] + +\definealternativestyle [\v!WORD] [{\setcharactercasing[\v!WORD ]}] [{\setcharactercasing[\v!WORD ]}] +\definealternativestyle [\v!word] [{\setcharactercasing[\v!word ]}] [{\setcharactercasing[\v!word ]}] +\definealternativestyle [\v!Word] [{\setcharactercasing[\v!Word ]}] [{\setcharactercasing[\v!Word ]}] +\definealternativestyle [\v!Words] [{\setcharactercasing[\v!Words ]}] [{\setcharactercasing[\v!Words ]}] +\definealternativestyle [\v!capital] [{\setcharactercasing[\v!capital]}] [{\setcharactercasing[\v!capital]}] +\definealternativestyle [\v!Capital] [{\setcharactercasing[\v!Capital]}] [{\setcharactercasing[\v!Capital]}] + +\definealternativestyle [\v!cap] [{\setcharactercasing[\v!cap ]}] [{\setcharactercasing[\v!cap ]}] +\definealternativestyle [\v!Cap] [{\setcharactercasing[\v!Cap ]}] [{\setcharactercasing[\v!Cap ]}] %D \macros %D {tinyfont} diff --git a/tex/context/base/m-punk.mkiv b/tex/context/base/m-punk.mkiv index bae3d4de3..23b477cb6 100644 --- a/tex/context/base/m-punk.mkiv +++ b/tex/context/base/m-punk.mkiv @@ -174,7 +174,7 @@ fonts.definers.methods.install( "punkboldslanted", { { "metafont", "mfplain", "punkfont-boldslanted.mp", 10 }, } ) -typesetters.cases.actions[99] = function(current) +typesetters.cases.register("RandomPunk", function(current) local used = fontdata[current.font].variants if used then local f = math.random(1,#used) @@ -183,7 +183,7 @@ typesetters.cases.actions[99] = function(current) else return current, false end -end +end) metapost.characters.flusher = flusher @@ -206,7 +206,7 @@ statistics.register("metapost font loading",function() end) \stopluacode -\unexpanded\def\EnableRandomPunk {\setcharactercasing[99]} +\unexpanded\def\EnableRandomPunk {\setcharactercasing[RandomPunk]} \unexpanded\def\RandomPunk {\groupedcommand\EnableRandomPunk\donothing} \unexpanded\def\StartRandomPunk {\begingroup\EnableRandomPunk} \unexpanded\def\StopRandomPunk {\endgroup} diff --git a/tex/context/base/mult-de.mkii b/tex/context/base/mult-de.mkii index 50090261b..ecc77ea82 100644 --- a/tex/context/base/mult-de.mkii +++ b/tex/context/base/mult-de.mkii @@ -4,6 +4,8 @@ % \setinterfacevariable{Addition}{Zusatz} \setinterfacevariable{Balloon}{Ballon} +\setinterfacevariable{Cap}{Kap} +\setinterfacevariable{Capital}{Versalien} \setinterfacevariable{Character}{Buchstabe} \setinterfacevariable{Characters}{Buchstaben} \setinterfacevariable{CloseDocument}{SchliesseDokument} @@ -61,6 +63,9 @@ \setinterfacevariable{ViewerHelp}{ViewerHilfe} \setinterfacevariable{WEEKDAY}{WOCHENTAG} \setinterfacevariable{WORD}{WORT} +\setinterfacevariable{WORDS}{WOERTER} +\setinterfacevariable{Word}{Wort} +\setinterfacevariable{Words}{Woerter} \setinterfacevariable{abbreviation}{abkuerzung} \setinterfacevariable{abbreviations}{abkuerzungen} \setinterfacevariable{absolute}{absolut} @@ -521,6 +526,7 @@ \setinterfacevariable{white}{weiss} \setinterfacevariable{wide}{breit} \setinterfacevariable{width}{breite} +\setinterfacevariable{word}{wort} \setinterfacevariable{xml}{xml} \setinterfacevariable{year}{jahr} \setinterfacevariable{yes}{ja} @@ -1044,6 +1050,7 @@ \setinterfaceconstant{values}{values} \setinterfaceconstant{vcommand}{vbefehl} \setinterfaceconstant{vcompact}{vcompact} +\setinterfaceconstant{vector}{vector} \setinterfaceconstant{veroffset}{kopfoffset} \setinterfaceconstant{vfil}{vfil} \setinterfaceconstant{voffset}{voffset} diff --git a/tex/context/base/mult-def.lua b/tex/context/base/mult-def.lua index 9be9f1f19..4ca05c328 100644 --- a/tex/context/base/mult-def.lua +++ b/tex/context/base/mult-def.lua @@ -10828,6 +10828,10 @@ return { ["pe"]="vcommand", ["ro"]="comandav", }, + ["vector"]={ + ["en"]="vector", + ["nl"]="vector", + }, ["veroffset"]={ ["cs"]="offsethlavicky", ["de"]="kopfoffset", @@ -11991,6 +11995,46 @@ return { ["pe"]="کلمه", ["ro"]="CUVANT", }, + ["WORDS"]={ + ["cs"]="SLOVA", + ["de"]="WOERTER", + ["en"]="WORDS", + ["fr"]="MOTS", + ["it"]="PAROLE", + ["nl"]="WOORDEN", + ["pe"]="WORDS", + ["ro"]="CUVINTE", + }, + ["word"]={ + ["cs"]="slovo", + ["de"]="wort", + ["en"]="word", + ["fr"]="mot", + ["it"]="parola", + ["nl"]="woord", + ["pe"]="word", + ["ro"]="cuvant", + }, + ["Word"]={ + ["cs"]="Slovo", + ["de"]="Wort", + ["en"]="Word", + ["fr"]="Mot", + ["it"]="Parola", + ["nl"]="Woord", + ["pe"]="Word", + ["ro"]="Cuvant", + }, + ["Words"]={ + ["cs"]="Slova", + ["de"]="Woerter", + ["en"]="Words", + ["fr"]="Mots", + ["it"]="Parole", + ["nl"]="Woorden", + ["pe"]="Words", + ["ro"]="Cuvinte", + }, ["abbreviation"]={ ["cs"]="zkratka", ["de"]="abkuerzung", @@ -12425,6 +12469,16 @@ return { ["pe"]="cap", ["ro"]="cap", }, + ["Cap"]={ + ["cs"]="Kap", + ["de"]="Kap", + ["en"]="Cap", + ["fr"]="Cap", + ["it"]="Cap", + ["nl"]="Kap", + ["pe"]="Cap", + ["ro"]="Cap", + }, ["capital"]={ ["cs"]="kapitalky", ["de"]="versalien", @@ -12435,6 +12489,16 @@ return { ["pe"]="capital", ["ro"]="majuscula", }, + ["Capital"]={ + ["cs"]="Kapitalky", + ["de"]="Versalien", + ["en"]="Capital", + ["fr"]="Capitale", + ["it"]="Maiuscolo", + ["nl"]="Kapitaal", + ["pe"]="Capital", + ["ro"]="Majuscula", + }, ["center"]={ ["cs"]="center", ["de"]="center", diff --git a/tex/context/base/mult-en.mkii b/tex/context/base/mult-en.mkii index 78bcc3650..1aab52a26 100644 --- a/tex/context/base/mult-en.mkii +++ b/tex/context/base/mult-en.mkii @@ -4,6 +4,8 @@ % \setinterfacevariable{Addition}{Addition} \setinterfacevariable{Balloon}{Balloon} +\setinterfacevariable{Cap}{Cap} +\setinterfacevariable{Capital}{Capital} \setinterfacevariable{Character}{Character} \setinterfacevariable{Characters}{Characters} \setinterfacevariable{CloseDocument}{CloseDocument} @@ -61,6 +63,9 @@ \setinterfacevariable{ViewerHelp}{ViewerHelp} \setinterfacevariable{WEEKDAY}{WEEKDAY} \setinterfacevariable{WORD}{WORD} +\setinterfacevariable{WORDS}{WORDS} +\setinterfacevariable{Word}{Word} +\setinterfacevariable{Words}{Words} \setinterfacevariable{abbreviation}{abbreviation} \setinterfacevariable{abbreviations}{abbreviations} \setinterfacevariable{absolute}{absolute} @@ -521,6 +526,7 @@ \setinterfacevariable{white}{white} \setinterfacevariable{wide}{wide} \setinterfacevariable{width}{width} +\setinterfacevariable{word}{word} \setinterfacevariable{xml}{xml} \setinterfacevariable{year}{year} \setinterfacevariable{yes}{yes} @@ -1044,6 +1050,7 @@ \setinterfaceconstant{values}{values} \setinterfaceconstant{vcommand}{vcommand} \setinterfaceconstant{vcompact}{vcompact} +\setinterfaceconstant{vector}{vector} \setinterfaceconstant{veroffset}{veroffset} \setinterfaceconstant{vfil}{vfil} \setinterfaceconstant{voffset}{voffset} diff --git a/tex/context/base/mult-fr.mkii b/tex/context/base/mult-fr.mkii index 5c7588aa5..fd36c4f8b 100644 --- a/tex/context/base/mult-fr.mkii +++ b/tex/context/base/mult-fr.mkii @@ -4,6 +4,8 @@ % \setinterfacevariable{Addition}{Ajout} \setinterfacevariable{Balloon}{Ballon} +\setinterfacevariable{Cap}{Cap} +\setinterfacevariable{Capital}{Capitale} \setinterfacevariable{Character}{Caratere} \setinterfacevariable{Characters}{Caracteres} \setinterfacevariable{CloseDocument}{FermeDocument} @@ -61,6 +63,9 @@ \setinterfacevariable{ViewerHelp}{AideVisualisateur} \setinterfacevariable{WEEKDAY}{JOURSEMAINE} \setinterfacevariable{WORD}{MOT} +\setinterfacevariable{WORDS}{MOTS} +\setinterfacevariable{Word}{Mot} +\setinterfacevariable{Words}{Mots} \setinterfacevariable{abbreviation}{abreviation} \setinterfacevariable{abbreviations}{abreviations} \setinterfacevariable{absolute}{absolute} @@ -521,6 +526,7 @@ \setinterfacevariable{white}{blanc} \setinterfacevariable{wide}{ample} \setinterfacevariable{width}{largeur} +\setinterfacevariable{word}{mot} \setinterfacevariable{xml}{xml} \setinterfacevariable{year}{annee} \setinterfacevariable{yes}{oui} @@ -1044,6 +1050,7 @@ \setinterfaceconstant{values}{values} \setinterfaceconstant{vcommand}{vcommande} \setinterfaceconstant{vcompact}{vcompact} +\setinterfaceconstant{vector}{vector} \setinterfaceconstant{veroffset}{veroffset} \setinterfaceconstant{vfil}{vfil} \setinterfaceconstant{voffset}{voffset} diff --git a/tex/context/base/mult-it.mkii b/tex/context/base/mult-it.mkii index 5b640cd25..a8f1ff7b6 100644 --- a/tex/context/base/mult-it.mkii +++ b/tex/context/base/mult-it.mkii @@ -4,6 +4,8 @@ % \setinterfacevariable{Addition}{Aggiunta} \setinterfacevariable{Balloon}{Pallone} +\setinterfacevariable{Cap}{Cap} +\setinterfacevariable{Capital}{Maiuscolo} \setinterfacevariable{Character}{Lettera} \setinterfacevariable{Characters}{Lettere} \setinterfacevariable{CloseDocument}{ChiudiDocumento} @@ -61,6 +63,9 @@ \setinterfacevariable{ViewerHelp}{AiutoVisualizzatore} \setinterfacevariable{WEEKDAY}{GIORNOSETTIMANA} \setinterfacevariable{WORD}{PAROLA} +\setinterfacevariable{WORDS}{PAROLE} +\setinterfacevariable{Word}{Parola} +\setinterfacevariable{Words}{Parole} \setinterfacevariable{abbreviation}{abbreviazione} \setinterfacevariable{abbreviations}{abbreviazioni} \setinterfacevariable{absolute}{assoluto} @@ -521,6 +526,7 @@ \setinterfacevariable{white}{bianco} \setinterfacevariable{wide}{ampio} \setinterfacevariable{width}{ampiezza} +\setinterfacevariable{word}{parola} \setinterfacevariable{xml}{xml} \setinterfacevariable{year}{anno} \setinterfacevariable{yes}{si} @@ -1044,6 +1050,7 @@ \setinterfaceconstant{values}{values} \setinterfaceconstant{vcommand}{vcomando} \setinterfaceconstant{vcompact}{vcompact} +\setinterfaceconstant{vector}{vector} \setinterfaceconstant{veroffset}{veroffset} \setinterfaceconstant{vfil}{vfil} \setinterfaceconstant{voffset}{voffset} diff --git a/tex/context/base/mult-nl.mkii b/tex/context/base/mult-nl.mkii index 769f77a96..b199039dd 100644 --- a/tex/context/base/mult-nl.mkii +++ b/tex/context/base/mult-nl.mkii @@ -4,6 +4,8 @@ % \setinterfacevariable{Addition}{Toevoeging} \setinterfacevariable{Balloon}{Ballon} +\setinterfacevariable{Cap}{Kap} +\setinterfacevariable{Capital}{Kapitaal} \setinterfacevariable{Character}{Letter} \setinterfacevariable{Characters}{Letters} \setinterfacevariable{CloseDocument}{SluitDocument} @@ -61,6 +63,9 @@ \setinterfacevariable{ViewerHelp}{ViewerHelp} \setinterfacevariable{WEEKDAY}{WEEKDAG} \setinterfacevariable{WORD}{WOORD} +\setinterfacevariable{WORDS}{WOORDEN} +\setinterfacevariable{Word}{Woord} +\setinterfacevariable{Words}{Woorden} \setinterfacevariable{abbreviation}{afkorting} \setinterfacevariable{abbreviations}{afkortingen} \setinterfacevariable{absolute}{absoluut} @@ -521,6 +526,7 @@ \setinterfacevariable{white}{wit} \setinterfacevariable{wide}{breed} \setinterfacevariable{width}{breedte} +\setinterfacevariable{word}{woord} \setinterfacevariable{xml}{xml} \setinterfacevariable{year}{jaar} \setinterfacevariable{yes}{ja} @@ -1044,6 +1050,7 @@ \setinterfaceconstant{values}{waarden} \setinterfaceconstant{vcommand}{vcommando} \setinterfaceconstant{vcompact}{vcomprimeer} +\setinterfaceconstant{vector}{vector} \setinterfaceconstant{veroffset}{kopoffset} \setinterfaceconstant{vfil}{vfil} \setinterfaceconstant{voffset}{voffset} diff --git a/tex/context/base/mult-pe.mkii b/tex/context/base/mult-pe.mkii index 5bb63d4a0..5f38eb928 100644 --- a/tex/context/base/mult-pe.mkii +++ b/tex/context/base/mult-pe.mkii @@ -4,6 +4,8 @@ % \setinterfacevariable{Addition}{جمع} \setinterfacevariable{Balloon}{بادکنک} +\setinterfacevariable{Cap}{Cap} +\setinterfacevariable{Capital}{Capital} \setinterfacevariable{Character}{Character} \setinterfacevariable{Characters}{Characters} \setinterfacevariable{CloseDocument}{بستن‌نوشتار} @@ -61,6 +63,9 @@ \setinterfacevariable{ViewerHelp}{کمک‌نمایشگر} \setinterfacevariable{WEEKDAY}{روزهفته} \setinterfacevariable{WORD}{کلمه} +\setinterfacevariable{WORDS}{WORDS} +\setinterfacevariable{Word}{Word} +\setinterfacevariable{Words}{Words} \setinterfacevariable{abbreviation}{اختصار} \setinterfacevariable{abbreviations}{اختصارات} \setinterfacevariable{absolute}{قطعی} @@ -521,6 +526,7 @@ \setinterfacevariable{white}{سفید} \setinterfacevariable{wide}{گسترده} \setinterfacevariable{width}{عرض} +\setinterfacevariable{word}{word} \setinterfacevariable{xml}{xml} \setinterfacevariable{year}{سال} \setinterfacevariable{yes}{بله} @@ -1044,6 +1050,7 @@ \setinterfaceconstant{values}{values} \setinterfaceconstant{vcommand}{vcommand} \setinterfaceconstant{vcompact}{vcompact} +\setinterfaceconstant{vector}{vector} \setinterfaceconstant{veroffset}{آفست‌عم} \setinterfaceconstant{vfil}{vfil} \setinterfaceconstant{voffset}{آفست‌ع} diff --git a/tex/context/base/mult-ro.mkii b/tex/context/base/mult-ro.mkii index a18d2d19d..4b05da390 100644 --- a/tex/context/base/mult-ro.mkii +++ b/tex/context/base/mult-ro.mkii @@ -4,6 +4,8 @@ % \setinterfacevariable{Addition}{Adaugare} \setinterfacevariable{Balloon}{Balon} +\setinterfacevariable{Cap}{Cap} +\setinterfacevariable{Capital}{Majuscula} \setinterfacevariable{Character}{Caracter} \setinterfacevariable{Characters}{Caractere} \setinterfacevariable{CloseDocument}{InchideDocument} @@ -61,6 +63,9 @@ \setinterfacevariable{ViewerHelp}{AjutorVizualizator} \setinterfacevariable{WEEKDAY}{ZISAPTAMANA} \setinterfacevariable{WORD}{CUVANT} +\setinterfacevariable{WORDS}{CUVINTE} +\setinterfacevariable{Word}{Cuvant} +\setinterfacevariable{Words}{Cuvinte} \setinterfacevariable{abbreviation}{abreviere} \setinterfacevariable{abbreviations}{abrevieri} \setinterfacevariable{absolute}{absolut} @@ -521,6 +526,7 @@ \setinterfacevariable{white}{alb} \setinterfacevariable{wide}{larg} \setinterfacevariable{width}{latime} +\setinterfacevariable{word}{cuvant} \setinterfacevariable{xml}{xml} \setinterfacevariable{year}{an} \setinterfacevariable{yes}{da} @@ -1044,6 +1050,7 @@ \setinterfaceconstant{values}{values} \setinterfaceconstant{vcommand}{comandav} \setinterfaceconstant{vcompact}{vcompact} +\setinterfaceconstant{vector}{vector} \setinterfaceconstant{veroffset}{veroffset} \setinterfaceconstant{vfil}{vfil} \setinterfaceconstant{voffset}{voffset} diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index cb42c66a9..d8962020f 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 05e2b6410..d5dc702e7 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/typo-cap.lua b/tex/context/base/typo-cap.lua index 3d70ffbfd..3233a6ba2 100644 --- a/tex/context/base/typo-cap.lua +++ b/tex/context/base/typo-cap.lua @@ -41,7 +41,8 @@ local fonthashes = fonts.hashes local fontdata = fonthashes.identifiers local fontchar = fonthashes.characters -local v_reset = interfaces.variables.reset +local variables = interfaces.variables +local v_reset = variables.reset local chardata = characters.data @@ -134,17 +135,34 @@ local function helper(start, codes, special, attribute, once) return start, false end -actions[1] = function(start,attribute) +local registered, n = { }, 0 + +local function register(name,f) + if type(f) == "function" then + n = n + 1 + actions[n] = f + registered[name] = n + return n + else + local n = registered[f] + registered[name] = n + return n + end +end + +cases.register = register + +local function WORD(start,attribute) lastfont = nil return helper(start,uccodes) end -actions[2] = function(start,attribute) +local function word(start,attribute) lastfont = nil return helper(start,lccodes) end -actions[3] = function(start,attribute,attr) +local function Word(start,attribute,attr) lastfont = nil local prev = start.prev if prev and prev.id == kern_code and prev.subtype == kerning_code then @@ -167,7 +185,7 @@ actions[3] = function(start,attribute,attr) end end -actions[4] = function(start,attribute) +local function Words(start,attribute) lastfont = nil local prev = start.prev if prev and prev.id == kern_code and prev.subtype == kerning_code then @@ -180,15 +198,19 @@ actions[4] = function(start,attribute) end end -actions[5] = function(start,attribute) -- 3 +local function capital(start,attribute) -- 3 return helper(start,uccodes,true,attribute,true) end -actions[6] = function(start,attribute) -- 4 +local function Capital(start,attribute) -- 4 return helper(start,uccodes,true,attribute,false) end -actions[8] = function(start) +local function none(start) + return start, false +end + +local function random(start) lastfont = nil local ch = start.char local mr = math.random @@ -220,6 +242,18 @@ actions[8] = function(start) return start, false end +register(variables.WORD, WORD) -- 1 +register(variables.word, word) -- 2 +register(variables.Word, Word) -- 3 +register(variables.Words, Words) -- 4 +register(variables.capital, capital) -- 5 +register(variables.Capital, Capital) -- 6 +register(variables.none, none) -- 7 (dummy) +register(variables.random, random) -- 8 + +register(variables.cap, variables.capital) -- clone +register(variables.Cap, variables.Capital) -- clone + -- node.traverse_id_attr local function process(namespace,attribute,head) -- not real fast but also not used on much data @@ -263,7 +297,7 @@ function cases.set(n) if n == v_reset then n = unsetvalue else - n = tonumber(n) + n = registered[n] or tonumber(n) if n then if not enabled then tasks.enableaction("processors","typesetters.cases.handler") @@ -283,6 +317,7 @@ function cases.set(n) end end texattribute[a_cases] = n + -- return n -- bonus end cases.handler = nodes.installattributehandler { diff --git a/tex/context/base/typo-cap.mkiv b/tex/context/base/typo-cap.mkiv index c18315960..28ced7c42 100644 --- a/tex/context/base/typo-cap.mkiv +++ b/tex/context/base/typo-cap.mkiv @@ -49,22 +49,22 @@ % test \word{test TEST \TeX} test % test \Word{test TEST \TeX} test -\unexpanded\def\setcharactercasing[#1]% mayb eat some point we will introduce names alongside numbers +\unexpanded\def\setcharactercasing[#1]% {\ctxcommand{setcharactercasing("#1")}} % todo: names casings -\unexpanded\def\WORD {\groupedcommand{\setcharactercasing[1]}{}} -\unexpanded\def\word {\groupedcommand{\setcharactercasing[2]}{}} -\unexpanded\def\Word {\groupedcommand{\setcharactercasing[3]}{}} -\unexpanded\def\Words{\groupedcommand{\setcharactercasing[4]}{}} +\unexpanded\def\WORD {\groupedcommand{\setcharactercasing[\v!WORD ]}{}} +\unexpanded\def\word {\groupedcommand{\setcharactercasing[\v!word ]}{}} +\unexpanded\def\Word {\groupedcommand{\setcharactercasing[\v!Word ]}{}} +\unexpanded\def\Words{\groupedcommand{\setcharactercasing[\v!Words]}{}} % This might become: % -% \unexpanded\def\WORD {\bgroup\def\g_word{\setcharactercasing[1]}\afterassignment\g_word\let\nexttoken} -% \unexpanded\def\word {\bgroup\def\g_word{\setcharactercasing[2]}\afterassignment\g_word\let\nexttoken} -% \unexpanded\def\Word {\bgroup\def\g_word{\setcharactercasing[3]}\afterassignment\g_word\let\nexttoken} -% \unexpanded\def\Words{\bgroup\def\g_word{\setcharactercasing[4]}\afterassignment\g_word\let\nexttoken} +% \unexpanded\def\WORD {\bgroup\def\g_word{\setcharactercasing[\v!WORD ]}\afterassignment\g_word\let\nexttoken} +% \unexpanded\def\word {\bgroup\def\g_word{\setcharactercasing[\v!word ]}\afterassignment\g_word\let\nexttoken} +% \unexpanded\def\Word {\bgroup\def\g_word{\setcharactercasing[\v!Word ]}\afterassignment\g_word\let\nexttoken} +% \unexpanded\def\Words{\bgroup\def\g_word{\setcharactercasing[\v!Words]}\afterassignment\g_word\let\nexttoken} % % so no longer {\Word test} and { } mandate (also later \groupedcommands will go) @@ -138,13 +138,13 @@ % % here we keep the \groupedcommand -\unexpanded\def\pseudosmallcapped{\groupedcommand{\setcharactercasing[1]\signalcharacter\tx}{}} % all upper -\unexpanded\def\pseudoSmallcapped{\groupedcommand{\setcharactercasing[5]\signalcharacter\tx}{}} % one upper + font -\unexpanded\def\pseudoSmallCapped{\groupedcommand{\setcharactercasing[6]\signalcharacter\tx}{}} % some upper + font +\unexpanded\def\pseudosmallcapped{\groupedcommand{\setcharactercasing [\v!WORD ]\signalcharacter\tx}{}} % all upper +\unexpanded\def\pseudoSmallcapped{\groupedcommand{\setcharactercasing [\v!capital]\signalcharacter\tx}{}} % one upper + font +\unexpanded\def\pseudoSmallCapped{\groupedcommand{\setcharactercasing [\v!Capital]\signalcharacter\tx}{}} % some upper + font -\unexpanded\def\realsmallcapped {\groupedcommand{\sc\setcharactercasing[1]}{}} % all lower -\unexpanded\def\realSmallcapped {\groupedcommand{\sc\setcharactercasing[3]}{}} % one upper + font -\unexpanded\def\realSmallCapped {\groupedcommand{\sc\setcharactercasing[4]}{}} % some upper +\unexpanded\def\realsmallcapped {\groupedcommand{\sc\setcharactercasing[\v!WORD ]}{}} % all lower +\unexpanded\def\realSmallcapped {\groupedcommand{\sc\setcharactercasing[\v!Word ]}{}} % one upper + font +\unexpanded\def\realSmallCapped {\groupedcommand{\sc\setcharactercasing[\v!Words ]}{}} % some upper \unexpanded\def\typo_capitals_smallcaps {\ifconditional\c_typo_capitals_pseudo @@ -173,7 +173,7 @@ %D As suggested by WS: -\unexpanded\def\notsmallcapped{\groupedcommand{\setcharactercasing[2]\signalcharacter}{}} +\unexpanded\def\notsmallcapped{\groupedcommand{\setcharactercasing[\v!word]\signalcharacter}{}} %D \macros %D {setupcapitals} diff --git a/tex/context/interface/keys-cs.xml b/tex/context/interface/keys-cs.xml index 2553b5fe6..a4206e2f2 100644 --- a/tex/context/interface/keys-cs.xml +++ b/tex/context/interface/keys-cs.xml @@ -7,6 +7,8 @@ + + @@ -64,6 +66,9 @@ + + + @@ -524,6 +529,7 @@ + @@ -1050,6 +1056,7 @@ + diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml index 1166b399f..d0dbf545c 100644 --- a/tex/context/interface/keys-de.xml +++ b/tex/context/interface/keys-de.xml @@ -7,6 +7,8 @@ + + @@ -64,6 +66,9 @@ + + + @@ -524,6 +529,7 @@ + @@ -1050,6 +1056,7 @@ + diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml index c73c18247..e26ee8bec 100644 --- a/tex/context/interface/keys-en.xml +++ b/tex/context/interface/keys-en.xml @@ -7,6 +7,8 @@ + + @@ -64,6 +66,9 @@ + + + @@ -524,6 +529,7 @@ + @@ -1050,6 +1056,7 @@ + diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml index a39b2b78f..bd0276ca3 100644 --- a/tex/context/interface/keys-fr.xml +++ b/tex/context/interface/keys-fr.xml @@ -7,6 +7,8 @@ + + @@ -64,6 +66,9 @@ + + + @@ -524,6 +529,7 @@ + @@ -1050,6 +1056,7 @@ + diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml index 4f10c9dd7..aa846599f 100644 --- a/tex/context/interface/keys-it.xml +++ b/tex/context/interface/keys-it.xml @@ -7,6 +7,8 @@ + + @@ -64,6 +66,9 @@ + + + @@ -524,6 +529,7 @@ + @@ -1050,6 +1056,7 @@ + diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml index 9e89ce8fc..a3110642c 100644 --- a/tex/context/interface/keys-nl.xml +++ b/tex/context/interface/keys-nl.xml @@ -7,6 +7,8 @@ + + @@ -64,6 +66,9 @@ + + + @@ -524,6 +529,7 @@ + @@ -1050,6 +1056,7 @@ + diff --git a/tex/context/interface/keys-pe.xml b/tex/context/interface/keys-pe.xml index ff05c8a30..74afbdba5 100644 --- a/tex/context/interface/keys-pe.xml +++ b/tex/context/interface/keys-pe.xml @@ -7,6 +7,8 @@ + + @@ -64,6 +66,9 @@ + + + @@ -524,6 +529,7 @@ + @@ -1050,6 +1056,7 @@ + diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml index f59eefaa9..4d159ac0a 100644 --- a/tex/context/interface/keys-ro.xml +++ b/tex/context/interface/keys-ro.xml @@ -7,6 +7,8 @@ + + @@ -64,6 +66,9 @@ + + + @@ -524,6 +529,7 @@ + @@ -1050,6 +1056,7 @@ + diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 9828acd40..e2c71a53a 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 : 05/07/12 23:33:30 +-- merge date : 05/08/12 13:45:17 do -- begin closure to overcome local limits and interference -- cgit v1.2.3