summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2014-10-19 21:15:03 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2014-10-19 21:15:03 +0200
commit7855574d6c6361edba86080f8bf0fe90eb3d81f8 (patch)
treea17ceda45844adfefe3b02c2f1b49f413093af0e /tex
parent35371c53c64623e5eb51180915c234375f445b34 (diff)
downloadcontext-7855574d6c6361edba86080f8bf0fe90eb3d81f8.tar.gz
2014-10-19 21:10:00
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4388 -> 4380 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/publ-dat.lua19
-rw-r--r--tex/context/base/publ-imp-apa.lua68
-rw-r--r--tex/context/base/publ-imp-aps.lua68
-rw-r--r--tex/context/base/publ-ini.lua19
-rw-r--r--tex/context/base/publ-ini.mkiv12
-rw-r--r--tex/context/base/publ-tra.lua281
-rw-r--r--tex/context/base/publ-tra.mkiv44
-rw-r--r--tex/context/base/status-files.pdfbin24703 -> 24739 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin333939 -> 333380 bytes
-rw-r--r--tex/context/base/strc-flt.mkvi17
-rw-r--r--tex/context/base/x-asciimath.lua106
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
15 files changed, 385 insertions, 255 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 1aaf29b43..7b6551c57 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{2014.10.18 14:30}
+\newcontextversion{2014.10.19 21:08}
%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 6fcbf2ef7..1bf53a033 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.mkiv b/tex/context/base/context.mkiv
index 33cac04ff..cfcae05ad 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -28,7 +28,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2014.10.18 14:30}
+\edef\contextversion{2014.10.19 21:08}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/publ-dat.lua b/tex/context/base/publ-dat.lua
index ce2f56123..aa46cd52b 100644
--- a/tex/context/base/publ-dat.lua
+++ b/tex/context/base/publ-dat.lua
@@ -333,11 +333,12 @@ local spacing = spacing * forget^0 * spacing
local assignment = spacing * key * spacing * equal * spacing * value * spacing
local shortcut = P("@") * (P("string") + P("STRING") + P("String")) * spacing * left * ((assignment * Carg(1))/do_shortcut * comma^0)^0 * spacing * right
local definition = category * spacing * left * spacing * tag * spacing * comma * Ct((assignment * comma^0)^0) * spacing * right * Carg(1) / do_definition
-local comment = keyword * spacing * left * (1-right)^0 * spacing * right
+----- comment = keyword * spacing * left * (1-right)^0 * spacing * right
+local comment = P("@") * (P("comment") + P("COMMENT") + P("Comment")) * spacing * lpeg.patterns.nestedbraces
-- todo \%
-local bibtotable = (space + forget + shortcut + definition + comment + 1)^0
+local bibtotable = (space + forget + shortcut + comment + definition + 1)^0
-- loadbibdata -> dataset.luadata
-- loadtexdata -> dataset.luadata
@@ -583,9 +584,17 @@ function publications.load(dataset,filename,kind)
filename = filetype
filetype = file.suffix(filename)
end
- loaders[filetype](dataset,filename)
- if kind then
- dataset.loaded[dataset.fullname or filename] = kind
+ if filename then
+ if not filetype or filetype == "" then
+ filetype = "bib"
+ end
+ if file.suffix(filename) == "" then
+ file.addsuffix(filename,filetype)
+ end
+ loaders[filetype](dataset,filename)
+ if kind then
+ dataset.loaded[dataset.fullname or filename] = kind
+ end
end
end
statistics.stoptiming(publications)
diff --git a/tex/context/base/publ-imp-apa.lua b/tex/context/base/publ-imp-apa.lua
new file mode 100644
index 000000000..0329208a7
--- /dev/null
+++ b/tex/context/base/publ-imp-apa.lua
@@ -0,0 +1,68 @@
+-- to be checked
+
+return {
+ name = "apa",
+ version = "1.00",
+ comment = "APA specification.",
+ author = "Alan Braslau and Hans Hagen",
+ copyright = "ConTeXt development team",
+ categories = {
+ article = {
+ required = { "author", "title", "journal", "year" },
+ optional = { "volume", "number", "pages", "month", "note" },
+ },
+ book = {
+ required = { { "author", "editor" }, "title", "publisher", "year" },
+ optional = { { "volume", "number" }, "series", "address", "edition", "month","note" },
+ },
+ booklet = {
+ required = { "title" },
+ optional = { "author", "howpublished", "address", "month", "year", "note" },
+ },
+ inbook = {
+ required = { { "author", "editor" }, "title", { "chapter", "pages" }, "publisher","year" },
+ optional = { { "volume", "number" }, "series", "type", "address", "edition", "month", "note" },
+ },
+ incollection = {
+ required = { "author", "title", "booktitle", "publisher", "year" },
+ optional = { "editor", { "volume", "number" }, "series", "type", "chapter", "pages", "address", "edition", "month", "note" },
+ },
+ inproceedings = {
+ required = { "author", "title", "booktitle", "year" },
+ optional = { "editor", { "volume", "number" }, "series", "pages", "address", "month","organization", "publisher", "note" },
+ },
+ manual = {
+ required = { "title" },
+ optional = { "author", "organization", "address", "edition", "month", "year", "note" },
+ },
+ mastersthesis = {
+ required = { "author", "title", "school", "year" },
+ optional = { "type", "address", "month", "note" },
+ },
+ misc = {
+ required = { "author", "title", "howpublished", "month", "year", "note" },
+ optional = { "author", "title", "howpublished", "month", "year", "note" },
+ },
+ phdthesis = {
+ required = { "author", "title", "school", "year" },
+ optional = { "type", "address", "month", "note" },
+ },
+ proceedings = {
+ required = { "title", "year" },
+ optional = { "editor", { "volume", "number" }, "series", "address", "month", "organization", "publisher", "note" },
+ },
+ techreport = {
+ required = { "author", "title", "institution", "year" },
+ optional = { "type", "number", "address", "month", "note" },
+ },
+ patent = {
+ required = { "nationality", "number", "year", "yearfiled" },
+ optional = { "author", "title", "language", "assignee", "address", "type", "day", "dayfiled", "month", "monthfiled", "note", },
+ },
+ unpublished = {
+ required = { "author", "title", "note" },
+ optional = { "month", "year" },
+ },
+ },
+}
+
diff --git a/tex/context/base/publ-imp-aps.lua b/tex/context/base/publ-imp-aps.lua
new file mode 100644
index 000000000..97b00b34a
--- /dev/null
+++ b/tex/context/base/publ-imp-aps.lua
@@ -0,0 +1,68 @@
+-- to be checked
+
+return {
+ name = "aps",
+ version = "1.00",
+ comment = "APA specification.",
+ author = "Alan Braslau and Hans Hagen",
+ copyright = "ConTeXt development team",
+ categories = {
+ article = {
+ required = { "author", "title", "journal", "year" },
+ optional = { "volume", "number", "pages", "month", "note" },
+ },
+ book = {
+ required = { { "author", "editor" }, "title", "publisher", "year" },
+ optional = { { "volume", "number" }, "series", "address", "edition", "month","note" },
+ },
+ booklet = {
+ required = { "title" },
+ optional = { "author", "howpublished", "address", "month", "year", "note" },
+ },
+ inbook = {
+ required = { { "author", "editor" }, "title", { "chapter", "pages" }, "publisher","year" },
+ optional = { { "volume", "number" }, "series", "type", "address", "edition", "month", "note" },
+ },
+ incollection = {
+ required = { "author", "title", "booktitle", "publisher", "year" },
+ optional = { "editor", { "volume", "number" }, "series", "type", "chapter", "pages", "address", "edition", "month", "note" },
+ },
+ inproceedings = {
+ required = { "author", "title", "booktitle", "year" },
+ optional = { "editor", { "volume", "number" }, "series", "pages", "address", "month","organization", "publisher", "note" },
+ },
+ manual = {
+ required = { "title" },
+ optional = { "author", "organization", "address", "edition", "month", "year", "note" },
+ },
+ mastersthesis = {
+ required = { "author", "title", "school", "year" },
+ optional = { "type", "address", "month", "note" },
+ },
+ misc = {
+ required = { "author", "title", "howpublished", "month", "year", "note" },
+ optional = { "author", "title", "howpublished", "month", "year", "note" },
+ },
+ phdthesis = {
+ required = { "author", "title", "school", "year" },
+ optional = { "type", "address", "month", "note" },
+ },
+ proceedings = {
+ required = { "title", "year" },
+ optional = { "editor", { "volume", "number" }, "series", "address", "month", "organization", "publisher", "note" },
+ },
+ techreport = {
+ required = { "author", "title", "institution", "year" },
+ optional = { "type", "number", "address", "month", "note" },
+ },
+ patent = {
+ required = { "nationality", "number", "year", "yearfiled" },
+ optional = { "author", "title", "language", "assignee", "address", "type", "day", "dayfiled", "month", "monthfiled", "note", },
+ },
+ unpublished = {
+ required = { "author", "title", "note" },
+ optional = { "month", "year" },
+ },
+ },
+}
+
diff --git a/tex/context/base/publ-ini.lua b/tex/context/base/publ-ini.lua
index 9c1293c18..53735dd5b 100644
--- a/tex/context/base/publ-ini.lua
+++ b/tex/context/base/publ-ini.lua
@@ -38,6 +38,9 @@ publications = publications or { }
local datasets = publications.datasets
local writers = publications.writers
+local tracers = publications.tracers or { }
+publications.tracers = tracers
+
local variables = interfaces.variables
local v_local = variables["local"]
@@ -2284,3 +2287,19 @@ function listvariants.page(dataset,block,tag,variant,listindex)
end
end
end
+
+-- tracers
+
+local citevariants = tracers.citevariants or allocate()
+local listvariants = tracers.listvariants or allocate()
+
+storage.register("publications/tracers/citevariants", citevariants,"publications.tracers.citevariants")
+storage.register("publications/tracers/listvariants", listvariants,"publications.tracers.listvariants")
+
+function commands.registerbtxcitevariant(name,parent)
+ citevariants[name] = parent or ""
+end
+
+function commands.registerbtxlistvariant(name,parent)
+ listvariants[name] = parent or ""
+end
diff --git a/tex/context/base/publ-ini.mkiv b/tex/context/base/publ-ini.mkiv
index b48cca99f..92faf7076 100644
--- a/tex/context/base/publ-ini.mkiv
+++ b/tex/context/base/publ-ini.mkiv
@@ -217,6 +217,18 @@
\installcommandhandler \??btxcitevariant {btxcitevariant} \??btxcitevariant
\installcommandhandler \??btxrendering {btxrendering} \??btxrendering
+\appendtoks
+ \ifx\currentbtxlistvariant\empty \else
+ \ctxcommand{registerbtxlistvariant("\currentbtxlistvariant","\currentbtxlistvariantparent")}%
+ \fi
+\to \everydefinebtxlistvariant
+
+\appendtoks
+ \ifx\currentbtxcitevariant\empty \else
+ \ctxcommand{registerbtxcitevariant("\currentbtxcitevariant","\currentbtxcitevariantparent")}%
+ \fi
+\to \everydefinebtxcitevariant
+
\unexpanded\def\usebtxdataset
{\dodoubleargument\publ_use_dataset}
diff --git a/tex/context/base/publ-tra.lua b/tex/context/base/publ-tra.lua
index 0b7e840c8..9b0f273c2 100644
--- a/tex/context/base/publ-tra.lua
+++ b/tex/context/base/publ-tra.lua
@@ -12,9 +12,8 @@ local sortedhash, sortedkeys = table.sortedhash, table.sortedkeys
local settings_to_array = utilities.parsers.settings_to_array
local formatters = string.formatters
-local tracers = { }
-publications.tracers = tracers
-local datasets = publications.datasets
+local tracers = publications.tracers or { }
+local datasets = publications.datasets
local context = context
@@ -23,150 +22,54 @@ local ctx_bold, ctx_rotate, ctx_llap = context.bold, context.rotate, context.lla
local ctx_darkgreen, ctx_darkred, ctx_darkblue = context.darkgreen, context.darkred, context.darkblue
local ctx_starttabulate, ctx_stoptabulate = context.starttabulate, context.stoptabulate
--- TEXT hyperlink author number date
-
-local fields = table.sorted {
- "abstract",
- "address",
- "annotate",
- "author",
- "booktitle",
- "chapter",
- "comment",
- "country",
- "doi",
- "edition",
- "editor",
- "eprint",
- "howpublished",
- "institution",
- "isbn",
- "issn",
- "journal",
- "key",
- "keyword",
- "keywords",
- "language",
- "lastchecked",
- "month",
- "names",
- "note",
- "notes",
- "number",
- "organization",
- "pages",
- "publisher",
- "school",
- "series",
- "size",
- "title",
- "type",
- "url",
- "volume",
- "year",
- "nationality",
- "assignee",
- "bibnumber",
- "day",
- "dayfiled",
- "monthfiled",
- "yearfiled",
- "revision",
-}
+local categories = table.setmetatableindex(function(t,name)
+ local filename = resolvers.findfile(formatters["publ-imp-%s.lua"](name))
+ local fields = { }
+ local specification = filename and filename ~= "" and table.load(filename) or {
+ name = name,
+ version = "1.00",
+ comment = "unknown specification.",
+ author = "anonymous",
+ copyright = "no one",
+ categories = { },
+ }
+ --
+ specification.fields = fields
+ for category, data in next, specification.categories do
+ local list = { }
+ fields[category] = list
+ local required = data.required
+ local optional = data.optional
+ for i=1,#required do
+ list[required[i]] = "required"
+ end
+ for i=1,#optional do
+ list[optional[i]] = "optional"
+ end
+ end
+ t[name] = specification
+ return specification
+end)
-local citevariants = table.sorted {
- "author",
- "authoryear",
- "authoryears",
- "authornum",
- "year",
- "short",
- "serial",
- "key",
- "doi",
- "url",
- "type",
- "page",
- "none",
- "num",
-}
+publications.tracers.categories = categories
-local listvariants = table.sorted {
- "author",
- "editor",
- "artauthor",
-}
+-- -- --
-local categories = {
- article = {
- required = { "author", "title", "journal", "year" },
- optional = { "volume", "number", "pages", "month", "note" },
- },
- book = {
- required = { { "author", "editor" }, "title", "publisher", "year" },
- optional = { { "volume", "number" }, "series", "address", "edition", "month","note" },
- },
- booklet = {
- required = { "title" },
- optional = { "author", "howpublished", "address", "month", "year", "note" },
- },
- inbook = {
- required = { { "author", "editor" }, "title", { "chapter", "pages" }, "publisher","year" },
- optional = { { "volume", "number" }, "series", "type", "address", "edition", "month", "note" },
- },
- incollection = {
- required = { "author", "title", "booktitle", "publisher", "year" },
- optional = { "editor", { "volume", "number" }, "series", "type", "chapter", "pages", "address", "edition", "month", "note" },
- },
- inproceedings = {
- required = { "author", "title", "booktitle", "year" },
- optional = { "editor", { "volume", "number" }, "series", "pages", "address", "month","organization", "publisher", "note" },
- },
- manual = {
- required = { "title" },
- optional = { "author", "organization", "address", "edition", "month", "year", "note" },
- },
- mastersthesis = {
- required = { "author", "title", "school", "year" },
- optional = { "type", "address", "month", "note" },
- },
- misc = {
- required = { "author", "title", "howpublished", "month", "year", "note" },
- optional = { "author", "title", "howpublished", "month", "year", "note" },
- },
- phdthesis = {
- required = { "author", "title", "school", "year" },
- optional = { "type", "address", "month", "note" },
- },
- proceedings = {
- required = { "title", "year" },
- optional = { "editor", { "volume", "number" }, "series", "address", "month", "organization", "publisher", "note" },
- },
- techreport = {
- required = { "author", "title", "institution", "year" },
- optional = { "type", "number", "address", "month", "note" },
- },
- patent = {
- required = { "nationality", "number", "year", "yearfiled" },
- optional = { "author", "title", "language", "assignee", "address", "type", "day", "dayfiled", "month", "monthfiled", "note", },
- },
- unpublished = {
- required = { "author", "title", "note" },
- optional = { "month", "year" },
- },
+local private = {
+ category = true,
+ tag = true,
+ index = true,
}
-
-publications.tracers.fields = fields
-publications.tracers.categories = categories
-publications.tracers.citevariants = citevariants
-publications.tracers.listvariants = listvariants
-
--- -- --
-
-function tracers.showdatasetfields(dataset)
- local luadata = datasets[dataset].luadata
+function tracers.showdatasetfields(settings)
+ local dataset = settings.dataset
+ local current = datasets[dataset]
+ local luadata = current.luadata
if next(luadata) then
+ local kind = settings.kind
+ local fielddata = kind and categories[kind] or categories.apa
+ local categories = fielddata.categories
+ local fieldspecs = fielddata.fields
ctx_starttabulate { "|lT|lT|pT|" }
ctx_NC() ctx_bold("tag")
ctx_NC() ctx_bold("category")
@@ -174,12 +77,22 @@ function tracers.showdatasetfields(dataset)
ctx_NC() ctx_NR()
ctx_FL()
for k, v in sortedhash(luadata) do
+ local category = v.category
+ local fields = fieldspecs[category] or { }
ctx_NC() context(k)
- ctx_NC() context(v.category)
+ ctx_NC() context(category)
ctx_NC()
for k, v in sortedhash(v) do
- if k ~= "details" and k ~= "tag" and k ~= "category" then
- context("%s ",k)
+ if not private[k] then
+ local f = fields[k]
+ if f == "required" then
+ ctx_darkgreen(k)
+ elseif not f then
+ ctx_darkred(k)
+ else
+ context(k)
+ end
+ context(" ")
end
end
ctx_NC() ctx_NR()
@@ -188,9 +101,14 @@ function tracers.showdatasetfields(dataset)
end
end
-function tracers.showdatasetcompleteness(dataset)
-
- dataset = datasets[dataset]
+function tracers.showdatasetcompleteness(settings)
+ local dataset = settings.dataset
+ local current = datasets[dataset]
+ local luadata = current.luadata
+ local kind = settings.kind
+ local fielddata = kind and categories[kind] or categories.apa
+ local categories = fielddata.categories
+ local fieldspecs = fielddata.fields
local preamble = { "|lBTw(10em)|p|" }
@@ -234,20 +152,18 @@ function tracers.showdatasetcompleteness(dataset)
ctx_NC() ctx_NR()
end
- local luadata = datasets[dataset].luadata
-
if next(luadata) then
for tag, entry in sortedhash(luadata) do
- local category = entry.category
- local fields = categories[category]
+ local category = entry.category
+ local fields = categories[category]
+ local foundfields = { }
+ for k, v in next, entry do
+ foundfields[k] = true
+ end
+ ctx_starttabulate(preamble)
+ identified(tag,category,entry.crossref)
+ ctx_FL()
if fields then
- local foundfields = { }
- for k, v in next, entry do
- foundfields[k] = true
- end
- ctx_starttabulate(preamble)
- identified(tag,category,entry.crossref)
- ctx_FL()
local requiredfields = fields.required
local optionalfields = fields.optional
if requiredfields then
@@ -296,15 +212,13 @@ function tracers.showdatasetcompleteness(dataset)
end
end
end
- foundfields.category = nil
- foundfields.tag = nil
- for k, v in sortedhash(foundfields) do
+ end
+ for k, v in sortedhash(foundfields) do
+ if not private[k] then
extra(k,entry[k])
end
- ctx_stoptabulate()
- else
- -- error
end
+ ctx_stoptabulate()
end
end
@@ -312,6 +226,10 @@ end
function tracers.showfields(settings)
local rotation = settings.rotation
+ local kind = settings.kind
+ local fielddata = kind and categories[kind] or categories.apa
+ local categories = fielddata.categories
+ local fieldspecs = fielddata.fields
local swapped = { }
local validfields = { }
for category, fields in next, categories do
@@ -367,41 +285,6 @@ function tracers.showfields(settings)
ctx_stoptabulate()
end
-function tracers.addfield(f,c)
- -- no checking now
- if type(f) == "string" then
- f = settings_to_array(f)
- end
- for i=1,#f do
- local field = f[i]
- if not table.contains(fields,field) then
- fields[#fields+1] = field
- end
- end
- if #f == 1 then
- f = f[1]
- end
- if type(c) == "string" then
- c = settings_to_array(c)
- end
- for i=1,#c do
- local ci = c[i]
- local category = categories[ci]
- if category then
- local optional = category.optional
- if optional then
- optional[#optional+1] = f
- else
- categories[ci] = { optional = { f } }
- end
- else
- categories[ci] = { optional = { f } }
- end
- end
-end
-
-
commands.showbtxdatasetfields = tracers.showdatasetfields
commands.showbtxdatasetcompleteness = tracers.showdatasetcompleteness
commands.showbtxfields = tracers.showfields
-commands.btxaddfield = tracers.addfield
diff --git a/tex/context/base/publ-tra.mkiv b/tex/context/base/publ-tra.mkiv
index 0fd3440e0..281b16ae0 100644
--- a/tex/context/base/publ-tra.mkiv
+++ b/tex/context/base/publ-tra.mkiv
@@ -20,43 +20,43 @@
\unprotect
-\unexpanded\def\showbtxdatasetfields
- {\dosingleempty\publ_show_dataset_fields}
+\unexpanded\def\showbtxdatasetfields {\dosingleempty\publ_show_dataset_fields}
+\unexpanded\def\showbtxdatasetcompleteness{\dosingleempty\publ_show_dataset_completeness}
+\unexpanded\def\showbtxfields {\dosingleempty\publ_show_fields}
\def\publ_show_dataset_fields[#1]%
- {\ctxcommand{showbtxdatasetfields("\iffirstargument#1\else\currentbtxdataset\fi")}}
-
-\unexpanded\def\showbtxdatasetcompleteness
- {\dosingleempty\publ_show_dataset_completeness}
+ {\begingroup
+ \getdummyparameters[\c!type=apa,\c!dataset=\currentbtxdataset,#1]%
+ \ctxcommand{showbtxdatasetfields{
+ dataset = "\dummyparameter\c!dataset",
+ kind = "\dummyparameter\c!type"
+ }}%
+ \endgroup}
\def\publ_show_dataset_completeness[#1]%
- {\ctxcommand{showbtxdatasetcompleteness("\iffirstargument#1\else\currentbtxdataset\fi")}}
-
-\unexpanded\def\showbtxfields
- {\dosingleempty\publ_show_fields}
+ {\begingroup
+ \getdummyparameters[\c!type=apa,\c!dataset=\currentbtxdataset,#1]%
+ \ctxcommand{showbtxdatasetcompleteness{
+ dataset = "\dummyparameter\c!dataset",
+ kind = "\dummyparameter\c!type"
+ }}%
+ \endgroup}
\def\publ_show_fields[#1]%
{\begingroup
- \getdummyparameters[#1]%
- \ctxcommand{showbtxfields{ rotation = "\dummyparameter\c!rotation" }}%
+ \getdummyparameters[\c!type=apa,#1]%
+ \ctxcommand{showbtxfields{
+ rotation = "\dummyparameter\c!rotation",
+ kind = "\dummyparameter\c!type"
+ }}%
\endgroup}
-\unexpanded\def\btxaddfields
- {\dodoubleempty\publ_add_fields}
-
-\def\publ_add_fields[#1][#2]%
- {\ifsecondargument
- \ctxcommand{btxaddfield("#1","#2")}%
- \fi}
-
\protect
\continueifinputfile{publ-tra.mkiv}
\starttext
- \btxaddfields[one,two][extra one, extra two]
-
\showbtxfields[rotation=85] \page
\showbtxfields[rotation=90] \page
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 57f784fc0..79fee3eb4 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 d7bc37794..5da55ee05 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/strc-flt.mkvi b/tex/context/base/strc-flt.mkvi
index 08f469011..3f3c1fedf 100644
--- a/tex/context/base/strc-flt.mkvi
+++ b/tex/context/base/strc-flt.mkvi
@@ -17,6 +17,23 @@
\unprotect
+% todo: a keyword for this (and then a settings->hash for speed)
+%
+% \setuplayout[width=middle,backspace=3cm]
+%
+% \appendtoks
+% \settrue\inhibitmargindata
+% \to \everyinsidefloat
+%
+% \starttext
+% \dorecurse{20}{
+% \par \inleft{\red\infofont<#1>} \par
+% \placefigure[leftmargin]{}{\framed[height=1cm,width=2cm]{}}
+% % \placefigure{#1}{\framed[height=1cm,width=2cm]{}}
+% \par line #1.1 \par line #1.2 \par
+% }
+% \stoptext
+
% todo: delay caption creation and make setups for each method instead
% so that we can have a list of methods and redo them as we can
% keep the list or even better: recreate it
diff --git a/tex/context/base/x-asciimath.lua b/tex/context/base/x-asciimath.lua
index f50b61d85..8cc349095 100644
--- a/tex/context/base/x-asciimath.lua
+++ b/tex/context/base/x-asciimath.lua
@@ -652,6 +652,48 @@ local reserved = {
["dy"] = { false, { "d", "y" } }, -- "{dy}" "\\left(dy\\right)"
["dz"] = { false, { "d", "z" } }, -- "{dz}" "\\left(dz\\right)"
+ -- fences
+
+ ["(:"] = { true, "(:" },
+ ["{:"] = { true, "{:" },
+ ["[:"] = { true, "[:" },
+ ["("] = { true, "(" },
+ ["["] = { true, "[" },
+ ["{"] = { true, "{" },
+ ["<<"] = { true, "⟨" }, -- why not <:
+ ["|_"] = { true, "⌊" },
+ ["|~"] = { true, "⌈" },
+ ["⟨"] = { true, "⟨" },
+ ["〈"] = { true, "⟨" },
+ ["〈"] = { true, "⟨" },
+
+ [":)"] = { true, ":)" },
+ [":}"] = { true, ":}" },
+ [":]"] = { true, ":]" },
+ [")"] = { true, ")" },
+ ["]"] = { true, "]" },
+ ["}"] = { true, "}" },
+ [">>"] = { true, "⟩" }, -- why not :>
+ ["~|"] = { true, "⌉" },
+ ["_|"] = { true, "⌋" },
+ ["⟩"] = { true, "⟩" },
+ ["〉"] = { true, "⟩" },
+ ["〉"] = { true, "⟩" },
+
+ ["lparent"] = { true, "(" },
+ ["lbracket"] = { true, "[" },
+ ["lbrace"] = { true, "{" },
+ ["langle"] = { true, "⟨" },
+ ["lfloor"] = { true, "⌊" },
+ ["lceil"] = { true, "⌈" },
+
+ ["rparent"] = { true, ")" },
+ ["rbracket"] = { true, "]" },
+ ["rbrace"] = { true, "}" },
+ ["rangle"] = { true, "⟩" },
+ ["rfloor"] = { true, "⌋" },
+ ["rceil"] = { true, "⌉" },
+
}
local isbinary = {
@@ -755,6 +797,11 @@ for k, v in sortedhash(reserved) do
k_reserved_different[#k_reserved_different+1] = k
end
end
+
+for k, v in next, entities do
+ k_unicode["\\"..k] = v
+end
+
if not find(k,"[^a-zA-Z]") then
k_reserved_words[#k_reserved_words+1] = k
end
@@ -784,41 +831,47 @@ local m_left = {
["("] = s_lparent,
["["] = s_lbracket,
["{"] = s_lbrace,
- ["<<"] = s_langle, -- why not <:
- ["|_"] = s_lfloor,
- ["|~"] = s_lceil,
["⟨"] = s_langle,
- ["〈"] = s_langle,
- ["〈"] = s_langle,
- --
- ["lparent"] = s_lparent,
- ["lbracket"] = s_lbracket,
- ["lbrace"] = s_lbrace,
- ["langle"] = s_langle,
- ["lfloor"] = s_lfloor,
- ["lceil"] = s_lceil,
+ ["⌈"] = s_lceil,
+ ["⌊"] = s_lfloor,
+
+ -- ["<<"] = s_langle, -- why not <:
+ -- ["|_"] = s_lfloor,
+ -- ["|~"] = s_lceil,
+ -- ["〈"] = s_langle,
+ -- ["〈"] = s_langle,
+
+ -- ["lparent"] = s_lparent,
+ -- ["lbracket"] = s_lbracket,
+ -- ["lbrace"] = s_lbrace,
+ -- ["langle"] = s_langle,
+ -- ["lfloor"] = s_lfloor,
+ -- ["lceil"] = s_lceil,
}
local m_right = {
- [")"] = s_rparent,
[":)"] = s_rangle,
[":}"] = s_right,
[":]"] = s_right,
+ [")"] = s_rparent,
["]"] = s_rbracket,
["}"] = s_rbrace,
- [">>"] = s_rangle, -- why not :>
- ["~|"] = s_rceil,
- ["_|"] = s_rfloor,
["⟩"] = s_rangle,
- ["〉"] = s_rangle,
- ["〉"] = s_rangle,
- --
- ["rparent"] = s_rparent,
- ["rbracket"] = s_rbracket,
- ["rbrace"] = s_rbrace,
- ["rangle"] = s_rangle,
- ["rfloor"] = s_rfloor,
- ["rceil"] = s_rceil,
+ ["⌉"] = s_rceil,
+ ["⌋"] = s_rfloor,
+
+ -- [">>"] = s_rangle, -- why not :>
+ -- ["~|"] = s_rceil,
+ -- ["_|"] = s_rfloor,
+ -- ["〉"] = s_rangle,
+ -- ["〉"] = s_rangle,
+
+ -- ["rparent"] = s_rparent,
+ -- ["rbracket"] = s_rbracket,
+ -- ["rbrace"] = s_rbrace,
+ -- ["rangle"] = s_rangle,
+ -- ["rfloor"] = s_rfloor,
+ -- ["rceil"] = s_rceil,
}
local islimits = {
@@ -856,7 +909,8 @@ local p_special =
)
)
+ P("\\") * Cc("\\backslash")
- + (R("az","AZ")^1/entities)
+ -- + (R("az","AZ")^1/entities)
+ + C(R("az","AZ")^1)
)
-- open | close :: {: | :}
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 866098238..1671ffb23 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 : 10/18/14 14:30:57
+-- merge date : 10/19/14 21:08:40
do -- begin closure to overcome local limits and interference