From d0e4f28e750d875abc052acb4429e78743693a2c Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sat, 20 Feb 2010 10:23:00 +0100 Subject: beta 2010.02.20 10:23 --- tex/context/base/bibl-bib.mkiv | 6 +++ tex/context/base/cont-new.tex | 2 +- tex/context/base/context.tex | 2 +- tex/context/base/lpdf-fld.lua | 2 +- tex/context/base/math-vfu.lua | 67 ++++++++++++++++------------- tex/context/base/spac-ali.mkiv | 35 ++++++++++++++- tex/context/base/strc-des.mkiv | 1 + tex/context/base/strc-not.mkiv | 50 ++++++++++++++------- tex/context/base/type-otf.mkiv | 37 +++++++++++++++- tex/generic/context/luatex-fonts-merged.lua | 2 +- 10 files changed, 152 insertions(+), 52 deletions(-) (limited to 'tex') diff --git a/tex/context/base/bibl-bib.mkiv b/tex/context/base/bibl-bib.mkiv index 36ba61d9d..13aac8057 100644 --- a/tex/context/base/bibl-bib.mkiv +++ b/tex/context/base/bibl-bib.mkiv @@ -28,4 +28,10 @@ \def\doregisterbibtexentry [#1][#2]{\ctxlua{commands.registerbibtexentry("#1","#2")}} % also the fast one \def\doapplytobibtexsession[#1][#2]{\xmlprocessregistered{bibtex:#1}{#2}{#2}} +\startxmlsetups bibtex + \xmlregistereddocumentsetups{#1}{} + \xmlsetsetup{#1}{bibtex|c|e|v}{bibtex:*} + \xmlmain{#1} +\stopxmlsetups + \protect \endinput diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index 998d091ca..604b418bf 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.02.18 14:48} +\newcontextversion{2010.02.20 10:23} %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 b8894df56..75cc3909d 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.02.18 14:48} +\edef\contextversion{2010.02.20 10:23} %D For those who want to use this: diff --git a/tex/context/base/lpdf-fld.lua b/tex/context/base/lpdf-fld.lua index 76da37beb..92bc12190 100644 --- a/tex/context/base/lpdf-fld.lua +++ b/tex/context/base/lpdf-fld.lua @@ -158,7 +158,7 @@ local fontnames = { local usedfonts = { } local function fieldsurrounding(specification) - local tag = (specification.fontstyle or "tt") .. (specification.fontalternative or "tf") + local tag = specification.style or "tttf" if not fontnames[tag] then tag = "tttf" end diff --git a/tex/context/base/math-vfu.lua b/tex/context/base/math-vfu.lua index 9b16357cf..2a9b3d3f1 100644 --- a/tex/context/base/math-vfu.lua +++ b/tex/context/base/math-vfu.lua @@ -495,35 +495,44 @@ function fonts.vf.math.define(specification,set) --~ end else local fci = fc[index] - local ref = si[index] - if not ref then - ref = { { 'slot', s, index } } - si[index] = ref - end - local kerns = fci.kerns - if kerns then - local krn = { } - for k=1,#kerns do - krn[offset + k] = kerns[k] - end - characters[unicode] = { - width = fci.width, - height = fci.height, - depth = fci.depth, - italic = fci.italic, - commands = ref, - kerns = krn, - next = offset + index, - } + if not fci then +--~ characters[unicode] = { +--~ width = 0, +--~ height = 0, +--~ depth = 0, +--~ index = 0, +--~ } else - characters[unicode] = { - width = fci.width, - height = fci.height, - depth = fci.depth, - italic = fci.italic, - commands = ref, - next = offset + index, - } + local ref = si[index] + if not ref then + ref = { { 'slot', s, index } } + si[index] = ref + end + local kerns = fci.kerns + if kerns then + local krn = { } + for k=1,#kerns do + krn[offset + k] = kerns[k] + end + characters[unicode] = { + width = fci.width, + height = fci.height, + depth = fci.depth, + italic = fci.italic, + commands = ref, + kerns = krn, + next = offset + index, + } + else + characters[unicode] = { + width = fci.width, + height = fci.height, + depth = fci.depth, + italic = fci.italic, + commands = ref, + next = offset + index, + } + end end end end @@ -1661,7 +1670,7 @@ mathematics.make_font ( "mathtimes-math", { } ) mathematics.make_font ( "lucida-math", { - { name = "lbr.afm", features = "virtualmath", main = true }, + { name = "file:lbr.afm", features = "virtualmath", main = true }, { name = "hlcrim.tfm", vector = "tex-mi", skewchar=0x7F }, { name = "hlcrim.tfm", vector = "tex-it", skewchar=0x7F }, { name = "hlcry.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, diff --git a/tex/context/base/spac-ali.mkiv b/tex/context/base/spac-ali.mkiv index 62164f997..652180f6f 100644 --- a/tex/context/base/spac-ali.mkiv +++ b/tex/context/base/spac-ali.mkiv @@ -29,8 +29,39 @@ % This will become a more advanced layout controller soon: -\unexpanded\def\lefttoright{\textdir TLT\pardir TLT\relax} -\unexpanded\def\righttoleft{\textdir TRT\pardir TRT\relax} +\newconditional\layoutlefttoright \settrue\layoutlefttoright +\newconditional\displaylefttoright \settrue\displaylefttoright +\newconditional\inlinelefttoright \settrue\inlinelefttoright + +\unexpanded\def\lefttoright + {\ifvmode + \settrue\displaylefttoright + \settrue\inlinelefttoright + \textdir TLT\relax + \pardir TLT\relax + \else + \settrue\inlinelefttoright + \textdir TLT\relax + \fi} + +\unexpanded\def\righttoleft + {\ifvmode + \setfalse\displaylefttoright + \setfalse\inlinelefttoright + \textdir TRT\relax + \pardir TRT\relax + \else + \textdir TRT\relax + \setfalse\inlinelefttoright + \fi} + +\def\currentdirectionparameters + {\ifconditional\inlinelefttoright \else + idir="r2l", + \fi + \ifconditional\displaylefttoright \else + ddir="r2l", + \fi} \def\dodefinehbox[#1][#2]% {\setvalue{hbox#1}##1{\hbox to #2{\begstrut##1\endstrut\hss}}} diff --git a/tex/context/base/strc-des.mkiv b/tex/context/base/strc-des.mkiv index f9d573707..df234b948 100644 --- a/tex/context/base/strc-des.mkiv +++ b/tex/context/base/strc-des.mkiv @@ -826,6 +826,7 @@ name = "\currentdescriptionname", level = structure.sections.currentlevel(), catcodes = \the\catcodetable, + % \currentdirectionparameters }, references = { internal = \nextinternalreference, diff --git a/tex/context/base/strc-not.mkiv b/tex/context/base/strc-not.mkiv index 4b0f9452e..3d0a4fadc 100644 --- a/tex/context/base/strc-not.mkiv +++ b/tex/context/base/strc-not.mkiv @@ -294,16 +294,20 @@ \dochecknote} \appendtoks - \letvalue{\??vn\c!rule:\currentnote}\normalnoterule % hm + \letvalue{\??vn\c!rule:c:\currentnote}\normalnoterule % hm + \letvalue{\??vn\c!rule:a:\currentnote}\empty \to \everysetupnote \appendtoks - \processaction - [\noteparameter\c!rule] - [ \v!on=>\letvalue{\??vn\c!rule:\currentnote}\normalnoterule, - \v!off=>\letvalue{\??vn\c!rule:\currentnote}\relax, - \s!default=>\letvalue{\??vn\c!rule:\currentnote}\relax, - \s!unknown=>\setvalue{\??vn\c!rule:\currentnote}{\noteparameter\c!rule}]% + \expanded{\processallactionsinset + [\noteparameter\c!rule]} + [ \v!on=>\letvalue{\??vn\c!rule:c:\currentnote}\normalnoterule, + \v!normal=>\letvalue{\??vn\c!rule:c:\currentnote}\normalnoterule, + \v!left=>\setvalue{\??vn\c!rule:a:\currentnote}{l2r} + \v!right=>\setvalue{\??vn\c!rule:a:\currentnote}{r2l}, + \v!off=>\letvalue{\??vn\c!rule:c:\currentnote}\relax, + \s!default=>\letvalue{\??vn\c!rule:c:\currentnote}\relax, + \s!unknown=>\setvalue{\??vn\c!rule:c:\currentnote}{\noteparameter\c!rule}]% \to \everysetupnote \appendtoks @@ -446,14 +450,24 @@ %D runs). Let's just reserve a few points, that probably match %D those of the stretch component. +%D A bit messy: + \def\placenoterule - {\getvalue{\??vn\c!rule:\currentnote}} + {\bgroup + \setupalign[\getvalue{\??vn\c!rule:a:\currentnote}]% + \righttoleft + \getvalue{\??vn\c!rule:c:\currentnote}% + \par + \egroup} \def\normalnoterule {\ifvmode - \color - [\noteparameter\c!rulecolor] - {\hrule\!!width .2\hsize\!!height\noteparameter\c!rulethickness\!!depth \zeropoint}% + \dontleavehmode \blackrule + [ \c!color=\noteparameter\c!rulecolor, + \c!width=.2\hsize, + \c!height=\noteparameter\c!rulethickness, + \c!depth=\zeropoint]% + \endgraf \kern\strutdepth \fi} @@ -816,12 +830,16 @@ {\relax\ifdim\ht\currentnoteins>\zeropoint\relax \ifnum\noteparameter\s!noteloc=\plusfive \else - \endgraf - \ifvmode - \whitespace - \noteparameter\c!before - \fi + \endgraf + \ifvmode + \whitespace + \noteparameter\c!before + \fi +% \bgroup +% \setupalign[\noteparameter\c!align]% \placenoterule % alleen in ..mode +% \par +% \egroup \bgroup \setnotebodyfont \setbox\scratchbox\hbox diff --git a/tex/context/base/type-otf.mkiv b/tex/context/base/type-otf.mkiv index c862701e7..4a7d6703e 100644 --- a/tex/context/base/type-otf.mkiv +++ b/tex/context/base/type-otf.mkiv @@ -453,11 +453,46 @@ % lucida -\starttypescript [math] [lucida,lucidanewmath] [all] +\starttypescriptcollection[lucida] + +\starttypescript [serif] [lucida] [name] + \usetypescript[serif][fallback] + \definefontsynonym[Serif] [name:LucidaBright] + \definefontsynonym[SerifBold] [name:LucidaBright-Demi] + \definefontsynonym[SerifItalic] [name:LucidaBright-Italic] + \definefontsynonym[SerifBoldItalic][name:LucidaBright-DemiItalic] +\stoptypescript + +\starttypescript [sans] [lucida] [name] + \usetypescript[sans][fallback] + \definefontsynonym[Sans] [name:LucidaSans] + \definefontsynonym[SansItalic] [name:LucidaSans-Oblique] + \definefontsynonym[SansBold] [name:LucidaSans-Demi] + \definefontsynonym[SansBoldItalic] [name:LucidaSans-DemiOblique] +\stoptypescript + +\starttypescript [mono] [lucida] [name] + \usetypescript[mono][fallback] + \definefontsynonym[Mono] [name:LucidaSans-Typewriter] + \definefontsynonym[MonoItalic] [name:LucidaSans-TypewriterOblique] + \definefontsynonym[MonoBold] [name:LucidaSans-TypewriterBold] + \definefontsynonym[MonoBoldItalic] [name:LucidaSans-TypewriterBoldOblique] +\stoptypescript + +\starttypescript [math] [lucida] [all] \definefontsynonym[MathRoman][lucidamath@lucida-math] \loadmapfile[lucida.map] \stoptypescript +\starttypescript [lucida] + \definetypeface[lucida][rm][serif][lucida][default][features=default] + \definetypeface[lucida][ss][sans] [lucida][default][features=default] + \definetypeface[lucida][tt][mono] [lucida][default][features=default] + \definetypeface[lucida][mm][math] [lucida][default] +\stoptypescript + +\stoptypescriptcollection + % mathdesign \starttypescript [math] [charter,mathdesignch] [all] diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index f6d538296..eea38e013 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 : 02/18/10 14:53:55 +-- merge date : 02/20/10 10:27:32 do -- begin closure to overcome local limits and interference -- cgit v1.2.3