diff options
author | Hans Hagen <pragma@wxs.nl> | 2010-02-01 11:19:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2010-02-01 11:19:00 +0100 |
commit | 02588d683c22719592a349365068f7320e257bdf (patch) | |
tree | 79f6c5b6b29ace012fc6f31909e28ccbb324b64e /tex | |
parent | 7e1304e44d27b52b78bfaf5cfbc833cd91894182 (diff) | |
download | context-02588d683c22719592a349365068f7320e257bdf.tar.gz |
beta 2010.02.01 11:19
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/back-ini.lua | 1 | ||||
-rw-r--r-- | tex/context/base/back-pdf.mkiv | 3 | ||||
-rw-r--r-- | tex/context/base/bibl-tra.mkiv | 6 | ||||
-rw-r--r-- | tex/context/base/cont-new.tex | 2 | ||||
-rw-r--r-- | tex/context/base/context.tex | 2 | ||||
-rw-r--r-- | tex/context/base/l-os.lua | 4 | ||||
-rw-r--r-- | tex/context/base/lang-bal.tex | 108 | ||||
-rw-r--r-- | tex/context/base/lpdf-fld.lua | 37 | ||||
-rw-r--r-- | tex/context/base/lpdf-wid.lua | 14 | ||||
-rw-r--r-- | tex/context/base/lxml-aux.lua | 23 | ||||
-rw-r--r-- | tex/context/base/lxml-lpt.lua | 24 | ||||
-rw-r--r-- | tex/context/base/lxml-tab.lua | 34 | ||||
-rw-r--r-- | tex/context/base/math-map.lua | 36 | ||||
-rw-r--r-- | tex/context/base/mult-sys.tex | 1 | ||||
-rw-r--r-- | tex/context/base/node-res.lua | 19 | ||||
-rw-r--r-- | tex/context/base/scrn-fld.mkiv | 4 | ||||
-rw-r--r-- | tex/context/base/scrn-int.mkiv | 35 | ||||
-rw-r--r-- | tex/context/base/strc-not.mkiv | 16 | ||||
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 21 |
19 files changed, 312 insertions, 78 deletions
diff --git a/tex/context/base/back-ini.lua b/tex/context/base/back-ini.lua index 7d1754150..12a487dd4 100644 --- a/tex/context/base/back-ini.lua +++ b/tex/context/base/back-ini.lua @@ -56,7 +56,6 @@ backends.codeinjections = { addtransparencygroup = nothing, typesetfield = nothing, - finishfields = nothing, doiffieldelse = nothing, doiffieldgroupelse = nothing, definefield = nothing, diff --git a/tex/context/base/back-pdf.mkiv b/tex/context/base/back-pdf.mkiv index 0a5bbb163..146025716 100644 --- a/tex/context/base/back-pdf.mkiv +++ b/tex/context/base/back-pdf.mkiv @@ -159,8 +159,11 @@ {\dogetobjectreferencepage{#1}{#2}#3% \doPDFgetpagereference{\ifx#3\empty\realfolio\else#3\fi}#3} +\let\lastpredefinedsymbol\empty % some day we can do more at the lua end + \def\predefinesymbol[#1]% {\begingroup + \xdef\lastpredefinedsymbol{#1}% \settightobject{SYM}{#1}\hbox{\symbol[#1]}% to be checked ... maybe only fitting \dogetobjectreference{SYM}{#1}\lastref \ctxlua{backends.codeinjections.registersymbol("#1",\lastref)}% diff --git a/tex/context/base/bibl-tra.mkiv b/tex/context/base/bibl-tra.mkiv index 29a687025..7ea883e52 100644 --- a/tex/context/base/bibl-tra.mkiv +++ b/tex/context/base/bibl-tra.mkiv @@ -803,11 +803,9 @@ {\dobeginoflist % \the\initializebibdefinitions % COMMENTED \edef\currentlist{pubs}% - \doif{\listparameter\c!criterium}\v!cite - {\setuplist[pubs][\c!criterium=\v!here]}% + \doif{\listparameter\c!criterium}\v!cite{\setuplist[pubs][\c!criterium=\v!here]}% \ctxlua{bibtex.hacks.reset(\number\bibtexoncemode)}% - \placestructurelist{pubs}% - {\listparameter\c!criterium}{\listparameter\c!number}% + \placestructurelist{pubs}{\listparameter\c!criterium}{\listparameter\c!number}% \ctxlua{bibtex.hacks.flush("\@@pbsorttype")}% \doendoflist} diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index 6db8e683e..51b99e3fd 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.01.25 11:09} +\newcontextversion{2010.02.01 11:19} %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 3f7110d53..c6c4b7521 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.01.25 11:09} +\edef\contextversion{2010.02.01 11:19} %D For those who want to use this: diff --git a/tex/context/base/l-os.lua b/tex/context/base/l-os.lua index cee0c1082..d94c5b13a 100644 --- a/tex/context/base/l-os.lua +++ b/tex/context/base/l-os.lua @@ -267,8 +267,10 @@ function os.uuid() ) end +local d + function os.timezone(delta) - local d = tonumber(tonumber(os.date("%H")-os.date("!%H"))) + d = d or tonumber(tonumber(os.date("%H")-os.date("!%H"))) if delta then if d > 0 then return format("+%02i:00",d) diff --git a/tex/context/base/lang-bal.tex b/tex/context/base/lang-bal.tex index 9b0528a27..394e9d93c 100644 --- a/tex/context/base/lang-bal.tex +++ b/tex/context/base/lang-bal.tex @@ -1,9 +1,9 @@ %D \module -%D [ file=lang--bal, -%D version=1997.09.03, +%D [ file=lang-bal, +%D version=2010.01.21, %D title=\CONTEXT\ Language Macros, %D subtitle=Baltic Languages, -%D author=Hans Hagen / Tobias Burnus, +%D author=Marius Aleknevičius, %D date=\currentdate, %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C @@ -14,13 +14,105 @@ \writestatus{loading}{ConTeXt Language Macros / Baltic Languages} %D The framework of this module is set up by Hans Hagen while -%D many of the first translations were done by Tobias. Later -%D on, corrections were made by users. If you have suggestions, -%D or feel that your name missing here, don't hesitate to send -%D us an email. +%D all the translations were done by Marius Aleknevičius. If +%D you have suggestions, don't hesitate to send us an email. -% Lettish/Latvian, Lithuanian +%D This file is in \UTF\ encoding and is meant for \MKIV. + +% Lettish/Latvian, Lietuvių/Lithuanian \unprotect +\installlanguage + [\s!lt] + [\c!spacing=\v!packed, + \c!leftsentence=---, + \c!rightsentence=---, + \c!leftsubsentence=---, + \c!rightsubsentence=---, + \c!leftquote=\lowerleftdoubleninequote, + \c!rightquote=\upperrightdoublesixquote, + \c!leftquotation=\lowerleftdoubleninequote, + \c!rightquotation=\upperrightdoublesixquote, + \c!date={\v!year,~m.,\ ,\v!month,\ ,\v!day,~d.}, + \s!patterns=\s!lt, + \s!encoding=l7x, + \s!mapping=l7x, + \s!lefthyphenmin=2, + \s!righthyphenmin=2] + +\installlanguage [lithuanian] [\s!lt] + +\setupheadtext [\s!lt] [\v!content=Turinys] +\setupheadtext [\s!lt] [\v!tables=Lentelės] +\setupheadtext [\s!lt] [\v!figures=Iliustracijos] +\setupheadtext [\s!lt] [\v!graphics=Graphics] % TODO what is the difference between the "graphics" and the "figures"? +\setupheadtext [\s!lt] [\v!intermezzi=Intermezzos] % TODO what is the "intermezzi"? +\setupheadtext [\s!lt] [\v!index=Rodyklė] +\setupheadtext [\s!lt] [\v!abbreviations=Santrumpos] +\setupheadtext [\s!lt] [\v!logos=Logos] % TODO where it is used? +\setupheadtext [\s!lt] [\v!units=Units] % TODO where it is used? +\setupheadtext [\s!lt] [pubs=Literatūra] + +\setuplabeltext [\s!lt] [\v!table={, lentelė.}] +\setuplabeltext [\s!lt] [\v!figure={, pav.}] +\setuplabeltext [\s!lt] [\v!intermezzo=Intermezzo ] % TODO +\setuplabeltext [\s!lt] [\v!graphic=Graphic ] % TODO + +%\startlanguagespecifics[\s!lt] +% \setupheads[\c!sectionstopper=.] %TODO how do I set dots after section numbers? +%\stoplanguagespecifics + +\setuplabeltext [\s!lt] [\v!chapter=] % Chapter +\setuplabeltext [\s!lt] [\v!section=] +\setuplabeltext [\s!lt] [\v!subsection=] +\setuplabeltext [\s!lt] [\v!subsubsection=] +\setuplabeltext [\s!lt] [\v!subsubsubsection=] +\setuplabeltext [\s!lt] [\v!appendix=] % Appendix +\setuplabeltext [\s!lt] [\v!part={, dalis}] +\setuplabeltext [\s!lt] [\v!line=line ] % TODO where it is used? +\setuplabeltext [\s!lt] [\v!lines=lines ] % TODO where it is used? + +\setuplabeltext [\s!lt] [\v!january=sausio] +\setuplabeltext [\s!lt] [\v!february=vasario] +\setuplabeltext [\s!lt] [\v!march=kovo] +\setuplabeltext [\s!lt] [\v!april=balandžio] +\setuplabeltext [\s!lt] [\v!may=gegužės] +\setuplabeltext [\s!lt] [\v!june=birželio] +\setuplabeltext [\s!lt] [\v!july=liepos] +\setuplabeltext [\s!lt] [\v!august=rugpjūčio] +\setuplabeltext [\s!lt] [\v!september=rugsėjo] +\setuplabeltext [\s!lt] [\v!october=spalio] +\setuplabeltext [\s!lt] [\v!november=lapkričio] +\setuplabeltext [\s!lt] [\v!december=gruodžio] + +\setuplabeltext [\s!lt] [\v!sunday=sekmadienis] +\setuplabeltext [\s!lt] [\v!monday=pirmadienis] +\setuplabeltext [\s!lt] [\v!tuesday=antradienis] +\setuplabeltext [\s!lt] [\v!wednesday=trečiadienis] +\setuplabeltext [\s!lt] [\v!thursday=ketvirtadienis] +\setuplabeltext [\s!lt] [\v!friday=penktadienis] +\setuplabeltext [\s!lt] [\v!saturday=šeštadienis] + +\setuplabeltext [\s!lt] [\v!page=puslapis ] % TODO how to test? +\setuplabeltext [\s!lt] [\v!atpage=puslapyje ] % TODO how to test? +\setuplabeltext [\s!lt] [\v!hencefore=kaip parodyta aukščiau] % TODO how to test? +\setuplabeltext [\s!lt] [\v!hereafter=kaip parodyta žemiau] % TODO how to test? +\setuplabeltext [\s!lt] [\v!see=žiūrėti ] % TODO how to test? + +\setuplabeltext [\s!lt] [\v!january :\s!mnem=jan] % I think, there is no abbreviated versions of months in lithuanian +\setuplabeltext [\s!lt] [\v!february :\s!mnem=feb] +\setuplabeltext [\s!lt] [\v!march :\s!mnem=mar] +\setuplabeltext [\s!lt] [\v!april :\s!mnem=apr] +\setuplabeltext [\s!lt] [\v!may :\s!mnem=may] +\setuplabeltext [\s!lt] [\v!june :\s!mnem=jun] +\setuplabeltext [\s!lt] [\v!july :\s!mnem=jul] +\setuplabeltext [\s!lt] [\v!august :\s!mnem=aug] +\setuplabeltext [\s!lt] [\v!september:\s!mnem=sep] +\setuplabeltext [\s!lt] [\v!october :\s!mnem=oct] +\setuplabeltext [\s!lt] [\v!november :\s!mnem=nov] +\setuplabeltext [\s!lt] [\v!december :\s!mnem=dec] + +%D \ShowAllLanguageValues [\s!lt] [lithuanian] {Lithuanian} {doll} % What does this mean? Do I need it? + \protect \endinput diff --git a/tex/context/base/lpdf-fld.lua b/tex/context/base/lpdf-fld.lua index 9c82d04ac..20fbd94f8 100644 --- a/tex/context/base/lpdf-fld.lua +++ b/tex/context/base/lpdf-fld.lua @@ -204,7 +204,7 @@ end local function fieldappearances(specification) -- todo: caching local values = specification.values - local default = specification.default + local default = specification.default -- todo if not values then -- error return @@ -365,8 +365,12 @@ end local function predefinesymbols(specification) local values = specification.values if values then - local a, b = lpegmatch(splitter,values) - codeinjections.presetsymbollist(a or values) + local symbols = aux.settings_to_array(values) + for i=1,#symbols do + local symbol = symbols[i] + local a, b = lpegmatch(splitter,symbol) + codeinjections.presetsymbol(a or symbol) + end end end @@ -376,11 +380,11 @@ function codeinjections.getdefaultfieldvalue(name) local values = f.values local default = f.default if not default or default == "" then - local a, b = lpegmatch(splitter,values) - values = a or values - for name in gmatch(list,"[^, ]+") do - default = name - break + local symbols = aux.settings_to_array(values) + local symbol = symbols[1] + if symbol then + local a, b = lpegmatch(splitter,symbol) -- splits at => + default = a or symbol end end if default then @@ -428,6 +432,14 @@ function codeinjections.definefield(specification) logs.report("fields","invalid definition of radio sub '%s': no parent",n) end predefinesymbols(specification) + elseif kind == "text" or kind == "line" then + fields[n] = specification + if trace_fields then + logs.report("fields","defining '%s' as %s",n,kind) + end + if specification.values ~= "" and specification.default == "" then + specification.default, specification.values = specification.values, nil + end else fields[n] = specification if trace_fields then @@ -522,7 +534,7 @@ end local collected = pdfarray() -function codeinjections.finishfields() +local function finishfields() for name, field in next, fields do local kids = field.kids if kids then @@ -546,9 +558,10 @@ function codeinjections.finishfields() } lpdf.addtocatalog("AcroForm",pdfreference(pdfimmediateobj(tostring(acroform)))) end - lpdf.finishfields = function() end end +lpdf.registerdocumentfinalizer(finishfields) + local pdf_widget = pdfconstant("Widget") local pdf_tx = pdfconstant("Tx") local pdf_ch = pdfconstant("Ch") @@ -611,7 +624,7 @@ function methods.line(name,specification,variant,extras) if extras then enhance(specification,extras) end - local text = pdfunicode(specification.default) + local text = pdfunicode(field.default) local d = pdfdictionary { Subtype = pdf_widget, T = pdfunicode(specification.title), @@ -641,7 +654,7 @@ function methods.line(name,specification,variant,extras) OC = fieldlayer(specification), MK = fieldsurrounding(specification), AA = fieldactions(specification), - Q = fieldalignment(specification) + Q = fieldalignment(specification), } save_kid(field,specification,d) end diff --git a/tex/context/base/lpdf-wid.lua b/tex/context/base/lpdf-wid.lua index f4eccd173..eea2b3548 100644 --- a/tex/context/base/lpdf-wid.lua +++ b/tex/context/base/lpdf-wid.lua @@ -39,12 +39,16 @@ function codeinjections.registeredsymbol(name) return presets[name] end +function codeinjections.presetsymbol(symbol) + if not presets[symbol] then + texsprint(ctxcatcodes,format("\\predefinesymbol[%s]",symbol)) + end +end + function codeinjections.presetsymbollist(list) if list then - for s in gmatch(list,"[^, ]+") do - if not presets[s] then - texsprint(ctxcatcodes,format("\\predefinesymbol[%s]",s)) - end + for symbol in gmatch(list,"[^, ]+") do + codeinjections.presetsymbol(symbol) end end end @@ -196,6 +200,8 @@ function codeinjections.attachfile(specification) OC = analyzelayer(specification.layer), C = pdfcolorspec(specification.colormodel,specification.colorvalue), } + -- as soon as we can ask for the dimensions of an xform we can + -- use them here local width = specification.width or 0 local height = specification.height or 0 local depth = specification.depth or 0 diff --git a/tex/context/base/lxml-aux.lua b/tex/context/base/lxml-aux.lua index 2017e6493..6b92143e7 100644 --- a/tex/context/base/lxml-aux.lua +++ b/tex/context/base/lxml-aux.lua @@ -335,6 +335,29 @@ end xml.include = include +--~ local function manipulate(xmldata,pattern,manipulator) -- untested and might go away +--~ local collected = xmlparseapply({ xmldata },pattern) +--~ if collected then +--~ local xmltostring = xml.tostring +--~ for c=1,#collected do +--~ local e = collected[c] +--~ local data = manipulator(xmltostring(e)) +--~ if data == "" then +--~ epdt[e.ni] = "" +--~ else +--~ local xi = xmlinheritedconvert(data,xmldata) +--~ if not xi then +--~ epdt[e.ni] = "" +--~ else +--~ epdt[e.ni] = xml.body(xi) -- xml.assign(d,k,xi) +--~ end +--~ end +--~ end +--~ end +--~ end + +--~ xml.manipulate = manipulate + function xml.strip_whitespace(root, pattern, nolines) -- strips all leading and trailing space ! local collected = xmlparseapply({ root },pattern) if collected then diff --git a/tex/context/base/lxml-lpt.lua b/tex/context/base/lxml-lpt.lua index ffa2edf3e..8381cc221 100644 --- a/tex/context/base/lxml-lpt.lua +++ b/tex/context/base/lxml-lpt.lua @@ -141,14 +141,19 @@ end apply_axis['child'] = function(list) local collected = { } for l=1,#list do - local dt = list[l].dt + local ll = list[l] + local dt = ll.dt +local en = 0 for k=1,#dt do local dk = dt[k] if dk.tg then collected[#collected+1] = dk dk.ni = k -- refresh +en = en + 1 +dk.ei = en end end +ll.en = en end return collected end @@ -156,14 +161,18 @@ end local function collect(list,collected) local dt = list.dt if dt then +local en = 0 for k=1,#dt do local dk = dt[k] if dk.tg then collected[#collected+1] = dk dk.ni = k -- refresh +en = en + 1 +dk.ei = en collect(dk,collected) end end +list.en = en end end apply_axis['descendant'] = function(list) @@ -177,14 +186,18 @@ end local function collect(list,collected) local dt = list.dt if dt then +local en = 0 for k=1,#dt do local dk = dt[k] if dk.tg then collected[#collected+1] = dk dk.ni = k -- refresh +en = en + 1 +dk.ei = en collect(dk,collected) end end +list.en = en end end apply_axis['descendant-or-self'] = function(list) @@ -441,7 +454,7 @@ local function apply_expression(list,expression,order) quit_expression = false for l=1,#list do local ll = list[l] - if expression(list,ll,l,order) then -- nasty, alleen valid als n=1 + if expression(list,ll,l,order) then -- nasty, order alleen valid als n=1 collected[#collected+1] = ll end if quit_expression then @@ -462,11 +475,16 @@ local lp_or = P("|") / " or " local lp_and = P("&") / " and " local lp_builtin = P ( +P("firstindex") / "1" + +P("lastindex") / "(#ll.__p__.dt or 1)" + +P("firstelement") / "1" + +P("lastelement") / "(ll.__p__.en or 1)" + P("first") / "1" + P("last") / "#list" + - P("position") / "l" + -- is element in finalizer P("rootposition") / "order" + + P("position") / "l" + -- is element in finalizer P("order") / "order" + + P("element") / "(ll.ei or 1)" + P("index") / "(ll.ni or 1)" + P("match") / "(ll.mi or 1)" + P("text") / "(ll.dt[1] or '')" + diff --git a/tex/context/base/lxml-tab.lua b/tex/context/base/lxml-tab.lua index 2d4bca8e5..349ab0ac7 100644 --- a/tex/context/base/lxml-tab.lua +++ b/tex/context/base/lxml-tab.lua @@ -519,6 +519,8 @@ local grammar_unparsed_text = P { "preamble", children = unparsedtext + V("parent") + emptyelement + comment + cdata + instruction, } +-- maybe we will add settinsg to result as well + local function xmlconvert(data, settings) settings = settings or { } -- no_root strip_cm_and_dt given_entities parent_root error_handler strip = settings.strip_cm_and_dt @@ -554,7 +556,7 @@ local function xmlconvert(data, settings) errorstr = "invalid xml file - no text at all" end if errorstr and errorstr ~= "" then - result = { dt = { { ns = "", tg = "error", dt = { errorstr }, at={}, er = true } } } + result = { dt = { { ns = "", tg = "error", dt = { errorstr }, at={ }, er = true } } } setmetatable(stack, mt) local error_handler = settings.error_handler if error_handler == false then @@ -569,13 +571,14 @@ local function xmlconvert(data, settings) result = stack[1] end if not settings.no_root then - result = { special = true, ns = "", tg = '@rt@', dt = result.dt, at={}, entities = entities, settings = settings } + result = { special = true, ns = "", tg = '@rt@', dt = result.dt, at={ }, entities = entities, settings = settings } setmetatable(result, mt) local rdt = result.dt for k=1,#rdt do local v = rdt[k] if type(v) == "table" and not v.special then -- always table -) result.ri = k -- rootindex +v.__p__ = result -- new, experiment, else we cannot go back to settings, we need to test this ! break end end @@ -1011,12 +1014,37 @@ xml.string = xmlstring <p>A few helpers:</p> --ldx]]-- +--~ xmlsetproperty(root,"settings",settings) + +function xml.settings(e) + while e do + local s = e.settings + if s then + return s + else + e = e.__p__ + end + end + return nil +end + +function xml.root(e) + local r = e + while e do + e = e.__p__ + if e then + r = e + end + end + return r +end + function xml.parent(root) return root.__p__ end function xml.body(root) - return (root.ri and root.dt[root.ri]) or root + return (root.ri and root.dt[root.ri]) or root -- not ok yet end function xml.name(root) diff --git a/tex/context/base/math-map.lua b/tex/context/base/math-map.lua index b3c5c29cc..2d34dc1c3 100644 --- a/tex/context/base/math-map.lua +++ b/tex/context/base/math-map.lua @@ -213,6 +213,15 @@ mathematics.alphabets = { [0x0005A]=0x02124, }, lcletters = 0x1D552, + lcgreek = { -- gamma pi + [0x03B3]=0x0213C, [0x03C0]=0x0213D, + }, + ucgreek = { -- Gamma pi + [0x0393]=0x0213E, [0x03A0]=0x0213F, + }, + symbols = { -- sum + [0x2211]=0x02140, + }, }, }, fraktur = { -- ok @@ -294,9 +303,10 @@ alphabets.monospaced.it = alphabets.sansserif.tf alphabets.monospaced.bf = alphabets.sansserif.tf alphabets.monospaced.bi = alphabets.sansserif.bf -alphabets.blackboard.tf.symbols = alphabets.regular.tf.symbols -alphabets.blackboard.tf.lcgreek = alphabets.regular.tf.lcgreek -alphabets.blackboard.tf.ucgreek = alphabets.regular.tf.ucgreek +alphabets.blackboard.tf.symbols = table.merge(alphabets.regular.tf.symbols, alphabets.blackboard.tf.symbols) +alphabets.blackboard.tf.lcgreek = table.merge(alphabets.regular.tf.lcgreek, alphabets.blackboard.tf.lcgreek) +alphabets.blackboard.tf.ucgreek = table.merge(alphabets.regular.tf.ucgreek, alphabets.blackboard.tf.ucgreek) + alphabets.blackboard.it = alphabets.blackboard.tf alphabets.blackboard.bf = alphabets.blackboard.tf alphabets.blackboard.bi = alphabets.blackboard.bf @@ -312,16 +322,16 @@ alphabets.fraktur.bf.ucgreek = alphabets.regular.bf.ucgreek alphabets.fraktur.it = alphabets.fraktur.tf alphabets.fraktur.bi = alphabets.fraktur.bf -alphabets.script.tf.digits = alphabets.regular.tf.digits -alphabets.script.tf.symbols = alphabets.regular.tf.symbols -alphabets.script.tf.lcgreek = alphabets.regular.tf.lcgreek -alphabets.script.tf.ucgreek = alphabets.regular.tf.ucgreek -alphabets.script.bf.digits = alphabets.regular.bf.digits -alphabets.script.bf.symbols = alphabets.regular.bf.symbols -alphabets.script.bf.lcgreek = alphabets.regular.bf.lcgreek -alphabets.script.bf.ucgreek = alphabets.regular.bf.ucgreek -alphabets.script.it = alphabets.script.tf -alphabets.script.bi = alphabets.script.bf +alphabets.script.tf.digits = alphabets.regular.tf.digits +alphabets.script.tf.symbols = alphabets.regular.tf.symbols +alphabets.script.tf.lcgreek = alphabets.regular.tf.lcgreek +alphabets.script.tf.ucgreek = alphabets.regular.tf.ucgreek +alphabets.script.bf.digits = alphabets.regular.bf.digits +alphabets.script.bf.symbols = alphabets.regular.bf.symbols +alphabets.script.bf.lcgreek = alphabets.regular.bf.lcgreek +alphabets.script.bf.ucgreek = alphabets.regular.bf.ucgreek +alphabets.script.it = alphabets.script.tf +alphabets.script.bi = alphabets.script.bf alphabets.tt = alphabets.monospaced alphabets.ss = alphabets.sansserif diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex index 349ba1b29..9653356d7 100644 --- a/tex/context/base/mult-sys.tex +++ b/tex/context/base/mult-sys.tex @@ -50,6 +50,7 @@ \definesystemconstant {hungarian} \definesystemconstant {hu} \definesystemconstant {italian} \definesystemconstant {it} \definesystemconstant {latin} \definesystemconstant {la} +\definesystemconstant {lithuanian} \definesystemconstant {lt} \definesystemconstant {bokmal} \definesystemconstant {nb} \definesystemconstant {norwegian} \definesystemconstant {no} \definesystemconstant {nynorsk} \definesystemconstant {nn} \definesystemconstant {polish} \definesystemconstant {pl} diff --git a/tex/context/base/node-res.lua b/tex/context/base/node-res.lua index 49a1297eb..5398d8433 100644 --- a/tex/context/base/node-res.lua +++ b/tex/context/base/node-res.lua @@ -16,7 +16,14 @@ for debugging <l n='luatex'/> node management.</p> nodes = nodes or { } +nodes.whatsits = { } -- table.swapped(node.whatsits()) + local reserved = { } +local whatsits = nodes.whatsits + +for k, v in pairs(node.whatsits()) do + whatsits[k], whatsits[v] = v, k -- two way +end function nodes.register(n) reserved[#reserved+1] = n @@ -57,13 +64,13 @@ local penalty = nodes.register(new_node("penalty")) local glue = nodes.register(new_node("glue")) local glue_spec = nodes.register(new_node("glue_spec")) local glyph = nodes.register(new_node("glyph",0)) -local textdir = nodes.register(new_node("whatsit",7)) +local textdir = nodes.register(new_node("whatsit",whatsits.dir)) -- 7 local rule = nodes.register(new_node("rule")) -local latelua = nodes.register(new_node("whatsit",35)) -local user_n = nodes.register(new_node("whatsit",44)) user_n.type = 100 -local user_l = nodes.register(new_node("whatsit",44)) user_l.type = 110 -local user_s = nodes.register(new_node("whatsit",44)) user_s.type = 115 -local user_t = nodes.register(new_node("whatsit",44)) user_t.type = 116 +local latelua = nodes.register(new_node("whatsit",whatsits.late_lua)) -- 35 +local user_n = nodes.register(new_node("whatsit",whatsits.user_defined)) user_n.type = 100 -- 44 +local user_l = nodes.register(new_node("whatsit",whatsits.user_defined)) user_l.type = 110 -- 44 +local user_s = nodes.register(new_node("whatsit",whatsits.user_defined)) user_s.type = 115 -- 44 +local user_t = nodes.register(new_node("whatsit",whatsits.user_defined)) user_t.type = 116 -- 44 function nodes.glyph(fnt,chr) local n = copy_node(glyph) diff --git a/tex/context/base/scrn-fld.mkiv b/tex/context/base/scrn-fld.mkiv index 8db990612..4b9d170e2 100644 --- a/tex/context/base/scrn-fld.mkiv +++ b/tex/context/base/scrn-fld.mkiv @@ -115,7 +115,7 @@ % misc -\appendtoks\ctxlua{backends.codeinjections.finishfields()}\to\everylastshipout +% \appendtoks\ctxlua{backends.codeinjections.finishfields()}\to\everylastshipout % testing @@ -124,7 +124,7 @@ % definition -\def\dodefinefield[#1][#2][#3][#4][#5]% [name] [kind] [group] [values] [default] +\def\dodefinefield[#1][#2][#3][#4][#5]% [name] [kind] [group] [values] [default] | [name] [kind] [group] [default] {\ctxlua{backends.codeinjections.definefield{ variant="normal", name="#1", kind="#2", group="#3", values=\!!bs#4\!!es, default=\!!bs#5\!!es }}} \def\dodefinesubfield[#1][#2][#3]% [name] [group] [values] diff --git a/tex/context/base/scrn-int.mkiv b/tex/context/base/scrn-int.mkiv index 91a42f706..739e16bba 100644 --- a/tex/context/base/scrn-int.mkiv +++ b/tex/context/base/scrn-int.mkiv @@ -428,15 +428,26 @@ {\bgroup \setupattachments[#2]% \ctxlua{backends.codeinjections.presetsymbollist("\@@atsymbol")}% - \getvalue{\??at:\@@atalternative}{\ctxlua{backends.codeinjections.attachfile{ - label = "#1", - width = \number\dimexpr\@@atwidth \relax, - height = \number\dimexpr\@@atheight\relax, - depth = \number\dimexpr\@@atdepth \relax, - color = "\@@atcolor", - symbol = "\@@atsymbol", - layer = "\@@attextlayer", - }}}% + % we cannot yet ask for the wd/ht/dp of an xform else we could use those + \setbox\scratchbox\hbox{\symbol[\lastpredefinedsymbol]}% + \doif\@@atwidth \v!fit{\edef\@@atwidth {\the\wd\scratchbox}}% + \doif\@@atheight\v!fit{\edef\@@atheight{\the\ht\scratchbox}}% + \doif\@@atdepth \v!fit{\edef\@@atdepth {\the\dp\scratchbox}}% + % + \setbox\scratchbox\hbox + {\getvalue{\??at:\@@atalternative}{\ctxlua{backends.codeinjections.attachfile{ + label = "#1", + width = \number\dimexpr\@@atwidth \relax, + height = \number\dimexpr\@@atheight\relax, + depth = \number\dimexpr\@@atdepth \relax, + color = "\@@atcolor", + symbol = "\@@atsymbol", + layer = "\@@attextlayer", + }}}}% + \wd\scratchbox\@@atwidth + \ht\scratchbox\@@atheight + \dp\scratchbox\@@atdepth + \box\scratchbox \egroup}% \fi} @@ -449,9 +460,9 @@ [\c!state=\v!start, \c!color=\@@iacolor, \c!textlayer=, - \c!width=1em, - \c!height=\strutheight, - \c!depth=\strutdepth, + \c!width=\v!fit, + \c!height=\v!fit, + \c!depth=\v!fit, \c!alternative=\v!high, \c!symbol=] diff --git a/tex/context/base/strc-not.mkiv b/tex/context/base/strc-not.mkiv index 4bc08f7cc..19cc1d030 100644 --- a/tex/context/base/strc-not.mkiv +++ b/tex/context/base/strc-not.mkiv @@ -547,6 +547,10 @@ {\ifnotesenabled \iftrialtypesetting % some day a roll back +% temp hack +\doenumerationcheckconditions +\let\currentnote\currentdescriptionmain +\typesetdummynotesymbol \else \begingroup \doenumerationcheckconditions @@ -605,6 +609,16 @@ {\directgotobox{\dotypesetsomenotesymbol{#1}{#2}}[page(\ctxlua{structure.notes.getnumberpage("#1",\number#2)})]}% f: \globallet\lastnotesymbol\relax} +\def\typesetdummynotesymbol % temp hack + {\removeunwantedspaces + \doifitalicelse\/\donothing % Charles IV \footnote{the fourth} + \ifdim\lastkern=\notesignal + \dodonotesymbol{\kern\noteparameter\c!distance}% gets the font right, hack ! + \fi + \nobreak + \hbox to .5em{}% + \globallet\lastnotesymbol\relax} + \def\currentnotedescriptiontext % todo: can be other number {\ctxlua{structure.notes.title("\currentnote",\currentdescriptionnumberentry)}} @@ -722,6 +736,8 @@ \fi \to \everyinsidenoteinsert +\appendtoks \setnotehsize \to \everyinsidenoteinsert % we will sort out columns etc later + \let\lastnotesymbol\relax %D \macros diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 8a7d3be48..5b3ecc9d0 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/texmf/tex/generic/context/luatex-fonts.lua --- merge date : 01/25/10 11:14:13 +-- merge date : 02/01/10 11:23:44 do -- begin closure to overcome local limits and interference @@ -2348,7 +2348,14 @@ for debugging <l n='luatex'/> node management.</p> nodes = nodes or { } +nodes.whatsits = { } -- table.swapped(node.whatsits()) + local reserved = { } +local whatsits = nodes.whatsits + +for k, v in pairs(node.whatsits()) do + whatsits[k], whatsits[v] = v, k -- two way +end function nodes.register(n) reserved[#reserved+1] = n @@ -2389,13 +2396,13 @@ local penalty = nodes.register(new_node("penalty")) local glue = nodes.register(new_node("glue")) local glue_spec = nodes.register(new_node("glue_spec")) local glyph = nodes.register(new_node("glyph",0)) -local textdir = nodes.register(new_node("whatsit",7)) +local textdir = nodes.register(new_node("whatsit",whatsits.dir)) -- 7 local rule = nodes.register(new_node("rule")) -local latelua = nodes.register(new_node("whatsit",35)) -local user_n = nodes.register(new_node("whatsit",44)) user_n.type = 100 -local user_l = nodes.register(new_node("whatsit",44)) user_l.type = 110 -local user_s = nodes.register(new_node("whatsit",44)) user_s.type = 115 -local user_t = nodes.register(new_node("whatsit",44)) user_t.type = 116 +local latelua = nodes.register(new_node("whatsit",whatsits.late_lua)) -- 35 +local user_n = nodes.register(new_node("whatsit",whatsits.user_defined)) user_n.type = 100 -- 44 +local user_l = nodes.register(new_node("whatsit",whatsits.user_defined)) user_l.type = 110 -- 44 +local user_s = nodes.register(new_node("whatsit",whatsits.user_defined)) user_s.type = 115 -- 44 +local user_t = nodes.register(new_node("whatsit",whatsits.user_defined)) user_t.type = 116 -- 44 function nodes.glyph(fnt,chr) local n = copy_node(glyph) |