summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-01-24 16:20:15 +0200
committerMarius <mariausol@gmail.com>2012-01-24 16:20:15 +0200
commit730c0337f4323fe717a290181cf4ffcde52153b5 (patch)
tree977e8c43f5e50c50be12f71d78b0dfbb1cfa3d9c /tex
parent61f9cff70fd57ae1be9208820b4d31bd7152c785 (diff)
downloadcontext-730c0337f4323fe717a290181cf4ffcde52153b5.tar.gz
beta 2012.01.24 14:55
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/buff-ver.mkiv1
-rw-r--r--tex/context/base/catc-ini.mkiv3
-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.pdfbin4066 -> 4077 bytes
-rw-r--r--tex/context/base/context-version.pngbin104642 -> 105164 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/lpdf-fld.lua24
-rw-r--r--tex/context/base/lxml-lpt.lua28
-rw-r--r--tex/context/base/math-ini.mkiv8
-rw-r--r--tex/context/base/mult-low.lua3
-rw-r--r--tex/context/base/scrn-fld.lua9
-rw-r--r--tex/context/base/scrn-fld.mkvi6
-rw-r--r--tex/context/base/status-files.pdfbin24229 -> 24226 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin166262 -> 166319 bytes
-rw-r--r--tex/context/base/strc-mat.mkiv2
-rw-r--r--tex/context/base/strc-num.mkiv4
-rw-r--r--tex/context/base/typo-scr.mkiv2
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
20 files changed, 81 insertions, 19 deletions
diff --git a/tex/context/base/buff-ver.mkiv b/tex/context/base/buff-ver.mkiv
index 366210af7..5336c4458 100644
--- a/tex/context/base/buff-ver.mkiv
+++ b/tex/context/base/buff-ver.mkiv
@@ -836,5 +836,4 @@
% \usevisualizerstyleandcolor\c!style\c!color
% \let\next}
-
\protect \endinput
diff --git a/tex/context/base/catc-ini.mkiv b/tex/context/base/catc-ini.mkiv
index 2fd0917b8..26c3ceee9 100644
--- a/tex/context/base/catc-ini.mkiv
+++ b/tex/context/base/catc-ini.mkiv
@@ -53,6 +53,7 @@
\setnewconstant\commentasciicode 37
\setnewconstant\ampersandasciicode 38
\setnewconstant\singlequoteasciicode 39 % '
+\setnewconstant\primeasciicode 39 % '
\setnewconstant\forwardslashasciicode 47 % /
\setnewconstant\colonasciicode 58
\setnewconstant\lessthanasciicode 60 % < used as alternative verbatim {
@@ -309,6 +310,8 @@
\let\syst_catcodes_trace_push\empty
\let\syst_catcodes_trace_pop \empty
+% \tracecatcodetables
+
\protect
%D We still have to define these so let's do that now:
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 044be158c..285735ffc 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{2012.01.24 11:11}
+\newcontextversion{2012.01.24 14:55}
%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 374cd7393..155b5ad34 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{2012.01.24 11:11}
+\newcontextversion{2012.01.24 14:55}
%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-version.pdf b/tex/context/base/context-version.pdf
index d5684a232..1408f82a4 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 a796fcf1a..34a371b7a 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 b4404249b..291170eae 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{2012.01.24 11:11}
+\edef\contextversion{2012.01.24 14:55}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index e441cc3d4..095cd014b 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -23,7 +23,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2012.01.24 11:11}
+\edef\contextversion{2012.01.24 14:55}
%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 5f59c951c..41d428004 100644
--- a/tex/context/base/lpdf-fld.lua
+++ b/tex/context/base/lpdf-fld.lua
@@ -457,6 +457,30 @@ end
local fields, radios, clones, fieldsets, calculationset = { }, { }, { }, { }, nil
+local xfdftemplate = [[
+<?xml version='1.0' encoding='UTF-8'?>
+
+<xfdf xmlns='http://ns.adobe.com/xfdf/'>
+ <f href='%s.pdf'/>
+ <fields>
+%s
+ </fields>
+</xfdf>
+]]
+
+function codeinjections.exportformdata(name)
+ local result = { }
+ for k, v in table.sortedhash(fields) do
+ result[#result+1] = format(" <field name='%s'><value>%s</value></field>",v.name or k,v.default or "")
+ end
+ local base = file.basename(tex.jobname)
+ local xfdf = format(xfdftemplate,base,table.concat(result))
+ if not name or name == "" then
+ name = base
+ end
+ io.savedata(file.addsuffix(name,"xfdf"),xfdf)
+end
+
function codeinjections.definefieldset(tag,list)
fieldsets[tag] = list
end
diff --git a/tex/context/base/lxml-lpt.lua b/tex/context/base/lxml-lpt.lua
index 607101ae9..4e53e55f9 100644
--- a/tex/context/base/lxml-lpt.lua
+++ b/tex/context/base/lxml-lpt.lua
@@ -515,6 +515,12 @@ local lp_or = P("|") / " or "
local lp_and = P("&") / " and "
local lp_builtin = P (
+ P("text") / "(ll.dt[1] or '')" + -- fragile
+ P("content") / "ll.dt" +
+ -- P("name") / "(ll.ns~='' and ll.ns..':'..ll.tg)" +
+ P("name") / "((ll.ns~='' and ll.ns..':'..ll.tg) or ll.tg)" +
+ P("tag") / "ll.tg" +
+ P("position") / "l" + -- is element in finalizer
P("firstindex") / "1" +
P("lastindex") / "(#ll.__p__.dt or 1)" +
P("firstelement") / "1" +
@@ -522,15 +528,10 @@ local lp_builtin = P (
P("first") / "1" +
P("last") / "#list" +
P("rootposition") / "order" +
- P("position") / "l" + -- is element in finalizer
P("order") / "order" +
P("element") / "(ll.ei or 1)" +
P("index") / "(ll.ni or 1)" +
P("match") / "(ll.mi or 1)" +
- P("text") / "(ll.dt[1] or '')" +
- -- P("name") / "(ll.ns~='' and ll.ns..':'..ll.tg)" +
- P("name") / "((ll.ns~='' and ll.ns..':'..ll.tg) or ll.tg)" +
- P("tag") / "ll.tg" +
P("ns") / "ll.ns"
) * ((spaces * P("(") * spaces * P(")"))/"")
@@ -1142,6 +1143,23 @@ expressions.lower = lower
expressions.number = tonumber
expressions.boolean = toboolean
+function expressions.contains(str,pattern)
+ local t = type(str)
+ if t == "string" then
+ if find(str,pattern) then
+ return true
+ end
+ elseif t == "table" then
+ for i=1,#str do
+ local d = str[i]
+ if type(d) == "string" and find(d,pattern) then
+ return true
+ end
+ end
+ end
+ return false
+end
+
-- user interface
local function traverse(root,pattern,handle)
diff --git a/tex/context/base/math-ini.mkiv b/tex/context/base/math-ini.mkiv
index 581881a9c..241d34b4a 100644
--- a/tex/context/base/math-ini.mkiv
+++ b/tex/context/base/math-ini.mkiv
@@ -490,7 +490,7 @@
\def\activatemathcharacters
{\the\activatedmathcharacters}
-\setnewconstant\primeasciicode 39 % '
+% \setnewconstant\primeasciicode 39 % '
\activatemathcharacter\circumflexasciicode
\activatemathcharacter\underscoreasciicode
@@ -530,9 +530,9 @@
\catcode\ampersandasciicode \activecatcode
\doglobal \appendtoks
- \let_\normalsubscript
- \let^\normalsuperscript
- \let&\normalmathaligntab % use \def when it's \aligntab
+ \let _\normalsubscript
+ \let ^\normalsuperscript
+ \let &\normalmathaligntab % use \def when it's \aligntab
\to \everymathematics
\egroup
diff --git a/tex/context/base/mult-low.lua b/tex/context/base/mult-low.lua
index cf391595c..96224da67 100644
--- a/tex/context/base/mult-low.lua
+++ b/tex/context/base/mult-low.lua
@@ -59,6 +59,9 @@ return {
"lessthanasciicode", "morethanasciicode", "doublecommentsignal",
"atsignasciicode", "exclamationmarkasciicode", "questionmarkasciicode",
"doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode",
+ "primeasciicode",
+ --
+ "activemathcharcode",
--
"activetabtoken", "activeformfeedtoken", "activeendoflinetoken",
--
diff --git a/tex/context/base/scrn-fld.lua b/tex/context/base/scrn-fld.lua
index 6f45b30d3..275fb4a9b 100644
--- a/tex/context/base/scrn-fld.lua
+++ b/tex/context/base/scrn-fld.lua
@@ -8,6 +8,9 @@ if not modules then modules = { } end modules ['scrn-fld'] = {
-- we should move some code from lpdf-fld to here
+local variables = interfaces.variables
+local v_yes = variables.yes
+
local fields = { }
interactions.fields = fields
@@ -59,6 +62,12 @@ function commands.getdefaultfieldvalue(name)
end
end
+function commands.exportformdata(export)
+ if export == v_yes then
+ codeinjections.exportformdata()
+ end
+end
+
function commands.setformsmethod(method)
codeinjections.setformsmethod(method)
end
diff --git a/tex/context/base/scrn-fld.mkvi b/tex/context/base/scrn-fld.mkvi
index 7e9ae5b27..0554f8783 100644
--- a/tex/context/base/scrn-fld.mkvi
+++ b/tex/context/base/scrn-fld.mkvi
@@ -111,6 +111,12 @@
\setupforms
[\c!method=XML] % no need for everyjob initialization as this is the default
+\appendtoks
+ \iflocation
+ \ctxcommand{exportformdata("\formsparameter\c!export")}%
+ \fi
+\to \everystoptext
+
%D We need to initialize symbols in a special way so that they
%D can be used as rendering for a widget.
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 279d7e8ad..fab0350ee 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 9d6eb01b1..029473566 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-mat.mkiv b/tex/context/base/strc-mat.mkiv
index 88da8f2cc..7658afc8b 100644
--- a/tex/context/base/strc-mat.mkiv
+++ b/tex/context/base/strc-mat.mkiv
@@ -222,7 +222,7 @@
\def\doplacecurrentformulanumber
{\dohandlecurrentformulareferences
- \labeltexts\currentformula{\doconvertedstructurecounter[\v!formula][]}}
+ \labeltexts\currentformula{\convertedstructurecounter[\v!formula][]}}
% \def\theboxdestinationattribute#1{\iflocation\ifx#1\relax\else\ifx#1\empty\else attr \destinationattribute#1\fi\fi\fi}
% \def\thedestinationattribute #1{\iflocation\ifx#1\relax\else\ifx#1\empty\else \attribute\destinationattribute#1\fi\fi\fi}
diff --git a/tex/context/base/strc-num.mkiv b/tex/context/base/strc-num.mkiv
index 41fb377c3..e19e0b10b 100644
--- a/tex/context/base/strc-num.mkiv
+++ b/tex/context/base/strc-num.mkiv
@@ -439,9 +439,9 @@
\def\strc_counters_converted_sub[#1][#2][#3]% #2 can be n or n:m
{\ifsecondargument
- \doconvertedstructurecounter[#1][\c!numbersegments=#2,#3]%
+ \strc_counters_converted[#1][\c!numbersegments=#2,#3]%
\else
- \secondargumentfalse\doconvertedstructurecounter[#1][]%
+ \secondargumentfalse\strc_counters_converted[#1][]%
\fi}
\let\getstructurecounter\convertedstructurecounter
diff --git a/tex/context/base/typo-scr.mkiv b/tex/context/base/typo-scr.mkiv
index 39f16537c..4b4487522 100644
--- a/tex/context/base/typo-scr.mkiv
+++ b/tex/context/base/typo-scr.mkiv
@@ -101,4 +101,4 @@
\def\typo_scripts_hilo[#1]#2#3%
{\typo_scripts_lohi[#1]{#3}{#2}}
-\unprotect \endinput
+\protect \endinput
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index a193bd3a9..99c9a6da2 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 : 01/24/12 11:11:05
+-- merge date : 01/24/12 14:55:51
do -- begin closure to overcome local limits and interference