summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-03-16 16:00:14 +0200
committerMarius <mariausol@gmail.com>2013-03-16 16:00:14 +0200
commit2a0b9a36e16fbb891f332c47001af0df24152e92 (patch)
tree165fe06aad577525ca7336d2d6da3f924e8f0a22 /tex
parentb5c32dcb87bebcda5741a31992462bf543620da1 (diff)
downloadcontext-2a0b9a36e16fbb891f332c47001af0df24152e92.tar.gz
beta 2013.03.16 14:44
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/bibl-tra.lua10
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4138 -> 4137 bytes
-rw-r--r--tex/context/base/context-version.pngbin40531 -> 40485 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-ctx.lua163
-rw-r--r--tex/context/base/font-hsh.lua178
-rw-r--r--tex/context/base/font-lib.mkvi2
-rw-r--r--tex/context/base/font-otd.lua17
-rw-r--r--tex/context/base/status-files.pdfbin24822 -> 24769 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin210709 -> 210835 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
14 files changed, 208 insertions, 172 deletions
diff --git a/tex/context/base/bibl-tra.lua b/tex/context/base/bibl-tra.lua
index 1c5eb3c85..6a7016023 100644
--- a/tex/context/base/bibl-tra.lua
+++ b/tex/context/base/bibl-tra.lua
@@ -33,6 +33,12 @@ local template = utilities.strings.striplong([[
\bibdata{%s}
]])
+local bibtexbin = environment.arguments.mlbibtex and "mlbibcontext" or "bibtex"
+
+directives.register("publications.usemlbibtex", function(v)
+ bibtexbin = v and "mlbibcontext" or "bibtex"
+end)
+
function hacks.process(settings)
local style = settings.style or ""
local database = settings.database or ""
@@ -41,9 +47,9 @@ function hacks.process(settings)
interfaces.showmessage("publications",3)
io.savedata(file.addsuffix(jobname,"aux"),format(template,style,database))
if trace_bibtex then
- report_tex("processing bibtex file %a",jobname)
+ report_tex("processing bibtex file %a using %a",jobname,bibtexbin)
end
- os.execute(format("bibtex %s",jobname))
+ os.execute(format("%s %q",bibtexbin,jobname))
-- purge 'm
end
end
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 14806b2f7..3ab0e9688 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{2013.03.16 13:40}
+\newcontextversion{2013.03.16 14:44}
%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 f5a255157..8b152ffc2 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{2013.03.16 13:40}
+\newcontextversion{2013.03.16 14:44}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index c7983e4ad..6efa6fe61 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index 9a8b54a89..d2e38cf8a 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index 800f5ff4e..1543025f3 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{2013.03.16 13:40}
+\edef\contextversion{2013.03.16 14:44}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index aba51903e..8f4e9590f 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.03.16 13:40}
+\edef\contextversion{2013.03.16 14:44}
%D For those who want to use this:
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua
index 44ac032b9..ca146b39e 100644
--- a/tex/context/base/font-ctx.lua
+++ b/tex/context/base/font-ctx.lua
@@ -53,10 +53,18 @@ local loggers = fonts.loggers
local fontgoodies = fonts.goodies
local helpers = fonts.helpers
local hashes = fonts.hashes
-local fontdata = hashes.identifiers
local currentfont = font.current
local texattribute = tex.attribute
+local fontdata = hashes.identifiers
+local characters = hashes.chardata
+local descriptions = hashes.descriptions
+local properties = hashes.properties
+local resources = hashes.resources
+local csnames = hashes.csnames
+local marks = hashes.markdata
+local lastmathids = hashes.lastmathids
+
local designsizefilename = fontgoodies.designsizes.filename
local otffeatures = handlers.otf.features
@@ -103,26 +111,6 @@ utilities.strings.formatters.add(string.formatters,
constructors.resolvevirtualtoo = true -- context specific (due to resolver)
-local allocate, mark = utilities.storage.allocate, utilities.storage.mark
-
-local nulldata = {
- name = "nullfont",
- characters = { },
- descriptions = { },
- properties = { },
- parameters = { -- lmromanregular @ 12pt
- slant = 0, -- 1
- space = 256377, -- 2
- space_stretch = 128188, -- 3
- space_shrink = 85459, -- 4
- x_height = 338952, -- 5
- quad = 786432, -- 6
- extra_space = 85459, -- 7
- },
-}
-
-constructors.enhanceparameters(nulldata.parameters) -- official copies for us
-
local limited = false
directives.register("system.inputmode", function(v)
@@ -138,7 +126,7 @@ end)
function definers.resetnullfont()
-- resetting is needed because tikz misuses nullfont
- local parameters = nulldata.parameters
+ local parameters = fonts.nulldata.parameters
--
parameters.slant = 0 -- 1
parameters.space = 0 -- 2
@@ -155,137 +143,6 @@ end
commands.resetnullfont = definers.resetnullfont
-setmetatableindex(fontdata, function(t,k) return k == true and t[currentfont()] or nulldata end)
-
--- we might make an font-hsh.lua
-
-local chardata = allocate() -- chardata
-local descriptions = allocate()
-local parameters = allocate()
-local properties = allocate()
-local resources = allocate()
-local quaddata = allocate() -- maybe also spacedata
-local xheightdata = allocate()
-local csnames = allocate() -- namedata
-local markdata = allocate()
-local italicsdata = allocate()
-local lastmathids = allocate()
-
-hashes.characters = chardata
-hashes.descriptions = descriptions
-hashes.parameters = parameters
-hashes.properties = properties
-hashes.resources = resources
-hashes.quads = quaddata
-hashes.emwidths = quaddata
-hashes.xheights = xheightdata
-hashes.exheights = xheightdata
-hashes.csnames = csnames
-hashes.marks = markdata
-hashes.italics = italicsdata
-hashes.lastmathids = lastmathids
-
-setmetatableindex(chardata, function(t,k)
- if k == true then
- return chardata[currentfont()]
- else
- local characters = fontdata[k].characters
- t[k] = characters
- return characters
- end
-end)
-
-setmetatableindex(descriptions, function(t,k)
- if k == true then
- return descriptions[currentfont()]
- else
- local descriptions = fontdata[k].descriptions
- t[k] = descriptions
- return descriptions
- end
-end)
-
-setmetatableindex(parameters, function(t,k)
- if k == true then
- return parameters[currentfont()]
- else
- local parameters = fontdata[k].parameters
- t[k] = parameters
- return parameters
- end
-end)
-
-setmetatableindex(properties, function(t,k)
- if k == true then
- return properties[currentfont()]
- else
- local properties = fontdata[k].properties
- t[k] = properties
- return properties
- end
-end)
-
-setmetatableindex(resources, function(t,k)
- if k == true then
- return resources[currentfont()]
- else
- local shared = fontdata[k].shared
- local rawdata = shared and shared.rawdata
- local resources = rawdata and rawdata.resources
- t[k] = resources or false -- better than resolving each time
- return resources
- end
-end)
-
-setmetatableindex(quaddata, function(t,k)
- if k == true then
- return quaddata[currentfont()]
- else
- local parameters = parameters[k]
- local quad = parameters and parameters.quad or 0
- t[k] = quad
- return quad
- end
-end)
-
-setmetatableindex(markdata, function(t,k)
- if k == true then
- return markdata[currentfont()]
- else
- local resources = fontdata[k].resources or { }
- local marks = resources.marks or { }
- t[k] = marks
- return marks
- end
-end)
-
-setmetatableindex(xheightdata, function(t,k)
- if k == true then
- return xheightdata[currentfont()]
- else
- local parameters = parameters[k]
- local xheight = parameters and parameters.xheight or 0
- t[k] = xheight
- return xheight
- end
-end)
-
-setmetatableindex(italicsdata, function(t,k) -- is test !
- if k == true then
- return italicsdata[currentfont()]
- else
- local properties = fontdata[k].properties
- local hasitalics = properties and properties.hasitalics
- if hasitalics then
- hasitalics = chardata[k] -- convenient return
- else
- hasitalics = false
- end
- t[k] = hasitalics
- return hasitalics
- end
-end)
-
-- this cannot be a feature initializer as there is no auto namespace
-- so we never enter the loop then; we can store the defaults in the tma
-- file (features.gpos.mkmk = 1 etc)
diff --git a/tex/context/base/font-hsh.lua b/tex/context/base/font-hsh.lua
new file mode 100644
index 000000000..dc38b87cf
--- /dev/null
+++ b/tex/context/base/font-hsh.lua
@@ -0,0 +1,178 @@
+if not modules then modules = { } end modules ['font-hsh'] = {
+ version = 1.001,
+ comment = "companion to font-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local setmetatableindex = table.setmetatableindex
+local currentfont = font.current
+local allocate = utilities.storage.allocate
+
+local fonts = fonts
+local hashes = fonts.hashes or allocate()
+fonts.hashes = hashes
+
+local identifiers = hashes.identifiers or allocate()
+local characters = hashes.characters or allocate() -- chardata
+local descriptions = hashes.descriptions or allocate()
+local parameters = hashes.parameters or allocate()
+local properties = hashes.properties or allocate()
+local resources = hashes.resources or allocate()
+local quads = hashes.quads or allocate() -- maybe also spacedata
+local xheights = hashes.xheights or allocate()
+local csnames = hashes.csnames or allocate() -- namedata
+local marks = hashes.marks or allocate()
+local italics = hashes.italics or allocate()
+local lastmathids = hashes.lastmathids or allocate()
+local dynamics = hashes.dynamics or allocate()
+
+hashes.characters = characters
+hashes.descriptions = descriptions
+hashes.parameters = parameters
+hashes.properties = properties
+hashes.resources = resources
+hashes.quads = quads hashes.emwidths = quads
+hashes.xheights = xheights hashes.exheights = xheights
+hashes.csnames = csnames
+hashes.marks = marks
+hashes.italics = italics
+hashes.lastmathids = lastmathids
+hashes.dynamics = dynamics
+
+local nulldata = allocate {
+ name = "nullfont",
+ characters = { },
+ descriptions = { },
+ properties = { },
+ parameters = { -- lmromanregular @ 12pt
+ slant = 0, -- 1
+ space = 256377, -- 2
+ space_stretch = 128188, -- 3
+ space_shrink = 85459, -- 4
+ x_height = 338952, -- 5
+ quad = 786432, -- 6
+ extra_space = 85459, -- 7
+ },
+}
+
+fonts.nulldata = nulldata
+
+fonts.constructors.enhanceparameters(nulldata.parameters) -- official copies for us
+
+setmetatableindex(identifiers, function(t,k)
+ return k == true and identifiers[currentfont()] or nulldata
+end)
+
+setmetatableindex(characters, function(t,k)
+ if k == true then
+ return characters[currentfont()]
+ else
+ local characters = identifiers[k].characters
+ t[k] = characters
+ return characters
+ end
+end)
+
+setmetatableindex(descriptions, function(t,k)
+ if k == true then
+ return descriptions[currentfont()]
+ else
+ local descriptions = identifiers[k].descriptions
+ t[k] = descriptions
+ return descriptions
+ end
+end)
+
+setmetatableindex(parameters, function(t,k)
+ if k == true then
+ return parameters[currentfont()]
+ else
+ local parameters = identifiers[k].parameters
+ t[k] = parameters
+ return parameters
+ end
+end)
+
+setmetatableindex(properties, function(t,k)
+ if k == true then
+ return properties[currentfont()]
+ else
+ local properties = identifiers[k].properties
+ t[k] = properties
+ return properties
+ end
+end)
+
+setmetatableindex(resources, function(t,k)
+ if k == true then
+ return resources[currentfont()]
+ else
+ local shared = identifiers[k].shared
+ local rawdata = shared and shared.rawdata
+ local resources = rawdata and rawdata.resources
+ t[k] = resources or false -- better than resolving each time
+ return resources
+ end
+end)
+
+setmetatableindex(quads, function(t,k)
+ if k == true then
+ return quads[currentfont()]
+ else
+ local parameters = parameters[k]
+ local quad = parameters and parameters.quad or 0
+ t[k] = quad
+ return quad
+ end
+end)
+
+setmetatableindex(marks, function(t,k)
+ if k == true then
+ return marks[currentfont()]
+ else
+ local resources = identifiers[k].resources or { }
+ local marks = resources.marks or { }
+ t[k] = marks
+ return marks
+ end
+end)
+
+setmetatableindex(xheights, function(t,k)
+ if k == true then
+ return xheights[currentfont()]
+ else
+ local parameters = parameters[k]
+ local xheight = parameters and parameters.xheight or 0
+ t[k] = xheight
+ return xheight
+ end
+end)
+
+setmetatableindex(italics, function(t,k) -- is test !
+ if k == true then
+ return italics[currentfont()]
+ else
+ local properties = identifiers[k].properties
+ local hasitalics = properties and properties.hasitalics
+ if hasitalics then
+ hasitalics = chardata[k] -- convenient return
+ else
+ hasitalics = false
+ end
+ t[k] = hasitalics
+ return hasitalics
+ end
+end)
+
+setmetatableindex(dynamics, function(t,k)
+ if k == true then
+ return dynamics[currentfont()]
+ else
+ local shared = identifiers[k].shared
+ local dynamics = shared and shared.dynamics or false
+ t[k] = dynamics
+ return dynamics
+ end
+end)
diff --git a/tex/context/base/font-lib.mkvi b/tex/context/base/font-lib.mkvi
index a15bfc833..b234d6f1f 100644
--- a/tex/context/base/font-lib.mkvi
+++ b/tex/context/base/font-lib.mkvi
@@ -29,6 +29,8 @@
\registerctxluafile{font-afm}{1.001}
\registerctxluafile{font-afk}{1.001}
+\registerctxluafile{font-hsh}{1.001} % hashes used by context
+
\registerctxluafile{font-oti}{1.001} % otf initialization
\registerctxluafile{font-ott}{1.001} % otf tables (first)
\registerctxluafile{font-otf}{1.001} % otf main
diff --git a/tex/context/base/font-otd.lua b/tex/context/base/font-otd.lua
index e6d2ed992..9a654fb6b 100644
--- a/tex/context/base/font-otd.lua
+++ b/tex/context/base/font-otd.lua
@@ -16,6 +16,8 @@ local trace_applied = false trackers.register("otf.applied", function(v)
local report_otf = logs.reporter("fonts","otf loading")
local report_process = logs.reporter("fonts","otf process")
+local allocate = utilities.storage.allocate
+
local fonts = fonts
local otf = fonts.handlers.otf
local hashes = fonts.hashes
@@ -23,7 +25,7 @@ local definers = fonts.definers
local constructors = fonts.constructors
local specifiers = fonts.specifiers
-local fontdata = hashes.identifiers
+local fontidentifiers = hashes.identifiers
local fontresources = hashes.resources
local fontproperties = hashes.properties
local fontdynamics = hashes.dynamics
@@ -37,15 +39,6 @@ local setmetatableindex = table.setmetatableindex
local otffeatures = fonts.constructors.newfeatures("otf")
local registerotffeature = otffeatures.register
-local fontdynamics = { }
-hashes.dynamics = fontdynamics
-
-setmetatableindex(fontdynamics, function(t,font)
- local d = fontdata[font].shared.dynamics or false
- t[font] = d
- return d
-end)
-
local a_to_script = { }
local a_to_language = { }
@@ -66,7 +59,7 @@ function otf.setdynamics(font,attribute)
end
if script == "auto" then
-- checkedscript and resources are defined later so we cannot shortcut them -- todo: make installer
- script = definers.checkedscript(fontdata[font],fontresources[font],features)
+ script = definers.checkedscript(fontidentifiers[font],fontresources[font],features)
end
local ds = dynamics[script] -- can be metatable magic (less testing)
if not ds then
@@ -80,7 +73,7 @@ function otf.setdynamics(font,attribute)
end
local dsla = dsl[attribute]
if not dsla then
- local tfmdata = fontdata[font]
+ local tfmdata = fontidentifiers[font]
a_to_script [attribute] = script
a_to_language[attribute] = language
-- we need to save some values .. quite messy
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 4a0cd3914..2fab5f861 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 97231902e..307a4c0fc 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index f14aeae94..b29f8b17d 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 : 03/16/13 13:40:54
+-- merge date : 03/16/13 14:44:57
do -- begin closure to overcome local limits and interference