summaryrefslogtreecommitdiff
path: root/tex/context
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2010-02-20 10:23:00 +0100
committerHans Hagen <pragma@wxs.nl>2010-02-20 10:23:00 +0100
commitd0e4f28e750d875abc052acb4429e78743693a2c (patch)
treef464e99bcb43d67dc6ebcc8cb6bfb16d59c3468a /tex/context
parent4eb82e08c76a8fda9009bf04a3dd741bd2690f01 (diff)
downloadcontext-d0e4f28e750d875abc052acb4429e78743693a2c.tar.gz
beta 2010.02.20 10:23
Diffstat (limited to 'tex/context')
-rw-r--r--tex/context/base/bibl-bib.mkiv6
-rw-r--r--tex/context/base/cont-new.tex2
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/lpdf-fld.lua2
-rw-r--r--tex/context/base/math-vfu.lua67
-rw-r--r--tex/context/base/spac-ali.mkiv35
-rw-r--r--tex/context/base/strc-des.mkiv1
-rw-r--r--tex/context/base/strc-not.mkiv50
-rw-r--r--tex/context/base/type-otf.mkiv37
9 files changed, 151 insertions, 51 deletions
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]