summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2013-04-22 16:19:00 +0200
committerHans Hagen <pragma@wxs.nl>2013-04-22 16:19:00 +0200
commitfd13332624aebe03c50184dfde3cd414d89adbf9 (patch)
tree63eb2dd009f92b257596d84e5bab39e85d522e93 /tex
parent1b73e9a52409099342473bedf8dd40ceab6f6a32 (diff)
downloadcontext-fd13332624aebe03c50184dfde3cd414d89adbf9.tar.gz
beta 2013.04.22 16:19
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/context-version.pdfbin4132 -> 4134 bytes
-rw-r--r--tex/context/base/context-version.pngbin40546 -> 40411 bytes
-rw-r--r--tex/context/base/l-package.lua19
-rw-r--r--tex/context/base/lang-ini.mkiv3
-rw-r--r--tex/context/base/m-sql.mkiv57
-rw-r--r--tex/context/base/status-files.pdfbin24730 -> 24744 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin211536 -> 211488 bytes
-rw-r--r--tex/context/base/syst-aux.mkiv6
-rw-r--r--tex/context/base/util-soc.lua93
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
10 files changed, 176 insertions, 4 deletions
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index 4db30f527..fcddb4470 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 558566ac1..758525307 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/l-package.lua b/tex/context/base/l-package.lua
index 09e65f9c8..837502ca6 100644
--- a/tex/context/base/l-package.lua
+++ b/tex/context/base/l-package.lua
@@ -279,6 +279,9 @@ methods["not loaded"] = function(name)
end
local level = 0
+local used = { }
+
+helpers.traceused = false
function helpers.loaded(name)
local sequence = helpers.sequence
@@ -293,6 +296,9 @@ function helpers.loaded(name)
if helpers.trace then
helpers.report("%s, level '%s', method '%s', name '%s'","found",level,method,name)
end
+ if helpers.traceused then
+ used[#used+1] = { level = level, name = name }
+ end
level = level - 1
return result, rest
end
@@ -302,6 +308,19 @@ function helpers.loaded(name)
return nil
end
+function helpers.showused()
+ local n = #used
+ if n > 0 then
+ helpers.report("%s libraries loaded:",n)
+ helpers.report()
+ for i=1,n do
+ local u = used[i]
+ helpers.report("%i %a",u.level,u.name)
+ end
+ helpers.report()
+ end
+end
+
function helpers.unload(name)
if helpers.trace then
if package.loaded[name] then
diff --git a/tex/context/base/lang-ini.mkiv b/tex/context/base/lang-ini.mkiv
index 3226c1255..1297fe23e 100644
--- a/tex/context/base/lang-ini.mkiv
+++ b/tex/context/base/lang-ini.mkiv
@@ -398,6 +398,9 @@
\lang_basics_synchronize_min_max
\to \everylanguage
+\unexpanded\def\unhyphenated
+ {\groupedcommand{\lefthyphenmin\maxdimen}\donothing}
+
% \appendtoks
% \setups[\languageparameter\c!setups]%
% \to \everylanguage
diff --git a/tex/context/base/m-sql.mkiv b/tex/context/base/m-sql.mkiv
new file mode 100644
index 000000000..bccfa9cb8
--- /dev/null
+++ b/tex/context/base/m-sql.mkiv
@@ -0,0 +1,57 @@
+%D \module
+%D [ file=m-sql,
+%D version=2012.07.12,
+%D title=\CONTEXT\ Extra Modules,
+%D subtitle=SQL,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\registerctxluafile{util-tpl}{}
+\registerctxluafile{util-sql}{}
+
+\startluacode
+
+local sql = utilities.sql
+
+function sql.show(specification)
+ local data = specification.data
+ if data and #data > 0 then
+ local keys = specification.order or table.sortedkeys(data[1])
+ local align = specification.align
+ local template = "|"
+ if type(align) == "table" then
+ for i=1,#keys do
+ template = template .. (align[keys[i]] or "c") .. "|"
+ end
+ else
+ template = template .. string.rep((align or "c").. "|",#keys)
+ end
+ context.starttabulate { template }
+ context.NC()
+ for i=1,#keys do
+ context(keys[i])
+ context.NC()
+ end
+ context.NR()
+ context.HL()
+ for i=specification.first or 1,specification.last or #data do
+ local d = data[i]
+ context.NC()
+ for i=1,#keys do
+ context(d[keys[i]])
+ context.NC()
+ end
+ context.NR()
+ end
+ context.stoptabulate()
+ end
+end
+
+\stopluacode
+
+\endinput
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 712588d4e..e39b3eb88 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 31642ec7d..a007ae8e3 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv
index 4a8c8d32f..3e0b1629b 100644
--- a/tex/context/base/syst-aux.mkiv
+++ b/tex/context/base/syst-aux.mkiv
@@ -6284,7 +6284,7 @@
\unexpanded\def\freezemeasure
{\dodoubleargument\syst_helpers_freeze_measure}
-\def\syst_helpers_freede_measure[#1][#2]%
+\def\syst_helpers_freeze_measure[#1][#2]%
{\expandafter\edef\csname\??measure#1\endcsname{\the\dimexpr#2}}
\unexpanded\def\setmeasure #1#2{\expandafter\def \csname\??measure#1\endcsname{#2}} % quick way
@@ -6292,8 +6292,8 @@
\unexpanded\def\setemeasure#1#2{\expandafter\edef\csname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
\unexpanded\def\setxmeasure#1#2{\expandafter\xdef\csname\??measure#1\endcsname{\the\dimexpr#2}} % quick way
-\def\measure#1% maybe \dimexpr ... \relax
- {\ifcsname\??measure#1\endcsname\csname\??measure#1\endcsname\else\zeropoint\fi}
+\def\measure#1%
+ {\the\dimexpr\ifcsname\??measure#1\endcsname\csname\??measure#1\endcsname\else\zeropoint\fi\relax}
% #2 could be omitted, but we want to support spaces
%
diff --git a/tex/context/base/util-soc.lua b/tex/context/base/util-soc.lua
new file mode 100644
index 000000000..30301c510
--- /dev/null
+++ b/tex/context/base/util-soc.lua
@@ -0,0 +1,93 @@
+if not modules then modules = { } end modules ['util-soc'] = {
+ version = 1.001,
+ comment = "support for sockets / protocols",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local format = string.format
+
+local smtp = require("socket.smtp")
+local ltn12 = require("ltn12")
+local mime = require("mime")
+
+local mail = utilities.mail or { }
+utilities.mail = mail
+
+local report_mail = logs.reporter("mail")
+
+function mail.send(specification)
+ local presets = specification.presets
+ if presets then
+ table.setmetatableindex(specification,presets)
+ end
+ local server = specification.server or ""
+ if not server then
+ report_mail("no server specified")
+ return false
+ end
+ local to = specification.to or specification.recepient or ""
+ if to == "" then
+ report_mail("no recepient specified")
+ return false
+ end
+ local from = specification.from or specification.sender or ""
+ if from == "" then
+ report_mail("no sender specified")
+ return false
+ end
+ local message = { }
+ local body = specification.body
+ if body then
+ message[#message+1] = {
+ body = body
+ }
+ end
+ local files = specification.files
+ if files then
+ for i=1,#files do
+ local filename = files[i]
+ local handle = io.open(filename, "rb")
+ if handle then
+ report_mail("attaching file %a",filename)
+ message[#message+1] = {
+ headers = {
+ ["content-type"] = format('application/pdf; name="%s"',filename),
+ ["content-disposition"] = format('attachment; filename="%s"',filename),
+ ["content-description"] = format('file: %s',filename),
+ ["content-transfer-encoding"] = "BASE64"
+ },
+ body = ltn12.source.chain(
+ ltn12.source.file(handle),
+ ltn12.filter.chain(mime.encode("base64"),mime.wrap())
+ )
+ }
+ else
+ report_mail("file %a not found",filename)
+ end
+ end
+ end
+ local result, detail = smtp.send {
+ server = specification.server,
+ port = specification.port,
+ user = specification.user,
+ password = specification.password,
+ from = from,
+ rcpt = to,
+ source = smtp.message {
+ headers = {
+ to = to,
+ from = from,
+ cc = specification.cc,
+ subject = specification.subject or "no subject",
+ },
+ body = message
+ },
+ }
+ if detail then
+ report_mail("error: %s",detail)
+ else
+ report_mail("message sent")
+ end
+end
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 314305a5d..f34e02742 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 : 04/20/13 13:33:53
+-- merge date : 04/22/13 16:19:03
do -- begin closure to overcome local limits and interference