summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tex/context/base/back-exp.lua72
-rw-r--r--tex/context/base/back-exp.mkiv20
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4441 -> 4435 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/mult-def.mkiv1
-rw-r--r--tex/context/base/status-files.pdfbin24898 -> 24897 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin326823 -> 326825 bytes
-rw-r--r--tex/context/base/strc-ref.mkvi2
-rw-r--r--tex/context/base/strc-tag.lua6
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
11 files changed, 67 insertions, 40 deletions
diff --git a/tex/context/base/back-exp.lua b/tex/context/base/back-exp.lua
index 54a42085d..12fec5e40 100644
--- a/tex/context/base/back-exp.lua
+++ b/tex/context/base/back-exp.lua
@@ -133,6 +133,7 @@ local userdata = structurestags.userdata -- might be combines with tagl
local tagdata = structurestags.data
local tagmetadata = structurestags.metadata
local detailedtag = structurestags.detailedtag
+local userproperties = structurestags.userproperties
local starttiming = statistics.starttiming
local stoptiming = statistics.stoptiming
@@ -159,6 +160,7 @@ local dashsplitter = lpeg.splitat("-")
local threshold = 65536
local indexing = false
local keephyphens = false
+local exportproperties = false
local finetuning = { }
@@ -211,6 +213,7 @@ end)
local f_entity = formatters["&#x%X;"]
local f_attribute = formatters[" %s=%q"]
+local f_property = formatters[" %s%s=%q"]
setmetatableindex(specialspaces, function(t,k)
local v = utfchar(k)
@@ -341,7 +344,7 @@ document {
]] ]
local f_style = formatters [ [[
-%s[detail='%s'] {
+%s[detail="%s"] {
font-style : %s ;
font-variant : %s ;
font-weight : %s ;
@@ -544,8 +547,8 @@ do
local itemgroups = { }
- local f_symbol = formatters[" symbol='%s'"]
- local s_packed = " packed='yes'"
+ local f_symbol = formatters[' symbol="%s"']
+ local s_packed = ' packed="yes"'
function structurestags.setitemgroup(current,packed,symbol)
itemgroups[detailedtag("itemgroup",current)] = {
@@ -575,7 +578,7 @@ do
local synonyms = { }
local sortings = { }
- local f_tag = formatters[" tag='%s'"]
+ local f_tag = formatters[' tag="%s"']
function structurestags.setsynonym(current,tag)
synonyms[detailedtag("synonym",current)] = tag
@@ -621,7 +624,7 @@ do
local symbols = { }
local linked = { }
- local f_insert = formatters[" insert='%s'"]
+ local f_insert = formatters[' insert="%s"']
function structurestags.setdescription(tag,n)
local nd = structures.notes.get(tag,n) -- todo: use listdata instead
@@ -678,8 +681,8 @@ do
local image = { }
usedimages.image = image
- local f_imagespec = formatters[" id='%s' width='%s' height='%s'"]
- local f_imagepage = formatters[" page='%s'"]
+ local f_imagespec = formatters[' id="%s" width="%s" height="%s"']
+ local f_imagepage = formatters[' page="%s"']
function structurestags.setfigure(name,page,width,height)
image[detailedtag("image")] = {
@@ -708,7 +711,7 @@ do
local combinations = { }
- local f_combispec = formatters[" nx='%s' ny='%s'"]
+ local f_combispec = formatters[' nx="%s" ny="%s"']
function structurestags.setcombination(nx,ny)
combinations[detailedtag("combination")] = {
@@ -773,12 +776,12 @@ do
evaluators["special operation"] = evaluators.special
evaluators["special operation with arguments"] = evaluators.special
- local f_location = formatters[" location='aut:%s'"]
- local f_prefix = formatters[" prefix='%s'"]
- local f_destination = formatters[" destination='%s'"]
- local f_reference = formatters[" reference='%s'"]
- local f_url = formatters[" url='%s'"]
- local f_file = formatters[" file='%s'"]
+ local f_location = formatters[' location="aut:%s"']
+ local f_prefix = formatters[' prefix="%s"']
+ local f_destination = formatters[' destination="%s"']
+ local f_reference = formatters[' reference="%s"']
+ local f_url = formatters[' url="%s"']
+ local f_file = formatters[' file="%s"']
function specials.url(result,var)
local url = references.checkedurl(var.operation)
@@ -1279,12 +1282,12 @@ do
local tabledata = { }
- local f_columns = formatters[" columns='%s'"]
- local f_rows = formatters[" rows='%s'"]
+ local f_columns = formatters[' columns="%s"']
+ local f_rows = formatters[' rows="%s"']
- local s_flushright = " align='flushright'"
- local s_middle = " align='middle'"
- local s_flushleft = " align='flushleft'"
+ local s_flushright = ' align="flushright"'
+ local s_middle = ' align="middle"'
+ local s_flushleft = ' align="flushleft"'
local function hascontent(data)
for i=1,#data do
@@ -1378,9 +1381,9 @@ end
do
- local f_detail = formatters[" detail='%s'"]
- local f_index = formatters[" n='%s'"]
- local f_spacing = formatters["<c n='%s'>%s</c>"]
+ local f_detail = formatters[' detail="%s"']
+ local f_index = formatters[' n="%s"']
+ local f_spacing = formatters['<c n="%s">%s</c>']
local f_empty_inline = formatters["<%s/>"]
local f_empty_mixed = formatters["%w<%s/>\n"]
@@ -1506,6 +1509,22 @@ do
r[n] = f_attribute(k,v)
end
end
+ if exportproperties then
+ local p = userproperties[fulltag]
+ if not p then
+ -- skip
+ elseif exportproperties == v_yes then
+ for k, v in next, p do
+ n = n + 1
+ r[n] = f_attribute(k,v)
+ end
+ else
+ for k, v in next, p do
+ n = n + 1
+ r[n] = f_property(exportproperties,k,v)
+ end
+ end
+ end
local a = di.attributes
if a then
for k, v in next, a do
@@ -2372,12 +2391,12 @@ function builders.paragraphs.tag(head)
return false
end
--- encoding='utf-8'
+-- encoding="utf-8"
do
local xmlpreamble = [[
-<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- input filename : %- 17s -->
<!-- processing date : %- 17s -->
@@ -2498,7 +2517,7 @@ local f_d_template = formatters [ [[
end
return xmltree
else
- return xml.convert("<?xml version='1.0'?>\n<error>invalid xhtml tree</error>")
+ return xml.convert('<?xml version="1.0"?>\n<error>invalid xhtml tree</error>')
end
end
@@ -2689,7 +2708,8 @@ local f_d_template = formatters [ [[
function commands.setupexport(t)
table.merge(finetuning,t)
- keephyphens = finetuning.hyphen == v_yes
+ keephyphens = finetuning.hyphen == v_yes
+ exportproperties = finetuning.properties == v_no and false or finetuning.properties
end
local function startexport(v)
diff --git a/tex/context/base/back-exp.mkiv b/tex/context/base/back-exp.mkiv
index 4b91636b7..d1cd42f15 100644
--- a/tex/context/base/back-exp.mkiv
+++ b/tex/context/base/back-exp.mkiv
@@ -141,20 +141,22 @@
% \c!firstpage=, % imagename
% \c!lastpage=, % imagename
\c!alternative=, % html, div
+ \c!properties=\v!no, % no: ignore, yes: as attribute, otherwise: use as prefix
\c!hyphen=\v!no]
\def\dosynchronizeexport
{\let\currentexport\empty
\ctxcommand{setupexport{
- align = "\exportparameter\c!align",
- bodyfont = \number\dimexpr\exportparameter\c!bodyfont,
- width = \number\dimexpr\exportparameter\c!width,
- hyphen = "\exportparameter\c!hyphen",
- title = \!!bs\exportparameter\c!title\!!es,
- subtitle = \!!bs\exportparameter\c!subtitle\!!es,
- author = \!!bs\exportparameter\c!author\!!es,
- firstpage = "\exportparameter\c!firstpage",
- lastpage = "\exportparameter\c!lastpage",
+ align = "\exportparameter\c!align",
+ bodyfont = \number\dimexpr\exportparameter\c!bodyfont,
+ width = \number\dimexpr\exportparameter\c!width,
+ properties = "\exportparameter\c!properties",
+ hyphen = "\exportparameter\c!hyphen",
+ title = \!!bs\exportparameter\c!title\!!es,
+ subtitle = \!!bs\exportparameter\c!subtitle\!!es,
+ author = \!!bs\exportparameter\c!author\!!es,
+ firstpage = "\exportparameter\c!firstpage",
+ lastpage = "\exportparameter\c!lastpage",
}}}
\appendtoks
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 5f68b1cc4..74fe145a3 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.07.26 10:44}
+\newcontextversion{2014.07.26 13:05}
%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 476aaed38..522a5ac6d 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 95e44f1bd..644439e54 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.07.26 10:44}
+\edef\contextversion{2014.07.26 13:05}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mult-def.mkiv b/tex/context/base/mult-def.mkiv
index d029a2a3e..ce8da3278 100644
--- a/tex/context/base/mult-def.mkiv
+++ b/tex/context/base/mult-def.mkiv
@@ -68,6 +68,7 @@
\def\c!database {database}
\def\c!group {group}
\def\c!groupsuffix {groupsuffix}
+\def\c!properties {properties}
\def\c!referencemethod {referencemethod} % forward both
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 899355d50..ee0714e02 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 72dfed895..b7e6da8b5 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-ref.mkvi b/tex/context/base/strc-ref.mkvi
index b2ecc823f..3702531cf 100644
--- a/tex/context/base/strc-ref.mkvi
+++ b/tex/context/base/strc-ref.mkvi
@@ -118,6 +118,8 @@
\unexpanded\def\reference {\dosingleargument\strc_references_full_reference} % never forgotten
\unexpanded\def\setreference {\dodoubleargument\strc_references_set_reference } %
+% maybe: \let\reference\textreference
+
%D These are implemented in a low level form as:
\unexpanded\def\strc_references_text_reference [#labels]{\strc_references_set_named_reference\s!text{#labels}{}}
diff --git a/tex/context/base/strc-tag.lua b/tex/context/base/strc-tag.lua
index 30dd19ea3..6f69144dc 100644
--- a/tex/context/base/strc-tag.lua
+++ b/tex/context/base/strc-tag.lua
@@ -207,7 +207,7 @@ tags.properties = properties
local lasttags = { }
local userdata = { }
-tags.userdata = userdata
+tags.userdata = userdata
function tags.setproperty(tag,key,value)
local p = properties[tag]
@@ -241,7 +241,9 @@ local nstack = 0
function tags.start(tag,specification)
local label, detail, user
if specification then
- label, detail, user = specification.label, specification.detail, specification.userdata
+ label = specification.label
+ detail = specification.detail
+ user = specification.userdata
end
if not enabled then
codeinjections.enabletags()
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index cab6c4abe..a692e621f 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 : 07/26/14 10:44:39
+-- merge date : 07/26/14 13:05:35
do -- begin closure to overcome local limits and interference