summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-09-04 15:04:09 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-09-04 15:04:09 +0200
commitc209ed36b6aaaa992df8976789c8ba8112f8e5c5 (patch)
tree750f886c59728842787e58441d39439819050c27 /doc
parent1ee48eeafd4e46712a29c91ad704b882f00d765f (diff)
downloadcontext-c209ed36b6aaaa992df8976789c8ba8112f8e5c5.tar.gz
2016-09-04 13:51:00
Diffstat (limited to 'doc')
-rw-r--r--doc/context/documents/general/manuals/luatex.pdfbin1039115 -> 1040069 bytes
-rw-r--r--doc/context/documents/general/manuals/math-mkiv.pdfbin2769223 -> 2930082 bytes
-rw-r--r--doc/context/documents/general/manuals/sql-mkiv.pdfbin90616 -> 94133 bytes
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-nodes.tex15
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex.tex2
-rw-r--r--doc/context/sources/general/manuals/sql/sql-mkiv.tex88
6 files changed, 102 insertions, 3 deletions
diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf
index c7a492ea8..d4ddd2996 100644
--- a/doc/context/documents/general/manuals/luatex.pdf
+++ b/doc/context/documents/general/manuals/luatex.pdf
Binary files differ
diff --git a/doc/context/documents/general/manuals/math-mkiv.pdf b/doc/context/documents/general/manuals/math-mkiv.pdf
index 5b6a5441e..6a120e30a 100644
--- a/doc/context/documents/general/manuals/math-mkiv.pdf
+++ b/doc/context/documents/general/manuals/math-mkiv.pdf
Binary files differ
diff --git a/doc/context/documents/general/manuals/sql-mkiv.pdf b/doc/context/documents/general/manuals/sql-mkiv.pdf
index 8d3588615..94a99d0ce 100644
--- a/doc/context/documents/general/manuals/sql-mkiv.pdf
+++ b/doc/context/documents/general/manuals/sql-mkiv.pdf
Binary files differ
diff --git a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
index 821942a9a..fd0b47c72 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
@@ -1218,7 +1218,7 @@ The second return value is the badness of the generated box.
See the description of \type {node.hpack()} for a few memory allocation caveats.
-\subsubsection{\type {node.dimensions}}
+\subsubsection{\type {node.dimensions}, \type {node.rangedimensions}}
\startfunctioncall
<number> w, <number> h, <number> d =
@@ -1271,7 +1271,17 @@ example in code like this, which prints the width of the space in between the
You need to keep in mind that this is one of the few places in \TEX\ where floats
are used, which means that you can get small differences in rounding when you
-compare the width repported by \type {hpack} with \type {dimensions}.
+compare the width reported by \type {hpack} with \type {dimensions}.
+
+The second alternative saves a few lookups and can be more convenient in some
+cases:
+
+\startfunctioncall
+<number> w, <number> h, <number> d =
+ node.rangedimensions(<node> parent, <node> first)
+<number> w, <number> h, <number> d =
+ node.rangedimensions(<node> parent, <node> first, <node> last)
+\stopfunctioncall
\subsubsection{\type {node.mlist_to_hlist}}
@@ -1828,6 +1838,7 @@ this:
\NC \type {count} \NC \yes \NC \yes \NC \NR
\NC \type {current_attr} \NC \yes \NC \yes \NC \NR
\NC \type {dimensions} \NC \yes \NC \yes \NC \NR
+\NC \type {rangedimensions} \NC \yes \NC \yes \NC \NR
%NC \type {do_ligature_n} \NC \yes \NC \yes \NC \NR % was never documented and experimental
\NC \type {effective_glue} \NC \yes \NC \yes \NC \NR
\NC \type {end_of_math} \NC \yes \NC \yes \NC \NR
diff --git a/doc/context/sources/general/manuals/luatex/luatex.tex b/doc/context/sources/general/manuals/luatex/luatex.tex
index 7fd436666..75e63c9bb 100644
--- a/doc/context/sources/general/manuals/luatex/luatex.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex.tex
@@ -12,7 +12,7 @@
\dontcomplain
\startdocument
- [version=0.98.2,
+ [version=0.98.4,
status=pre-release]
\component luatex-titlepage
diff --git a/doc/context/sources/general/manuals/sql/sql-mkiv.tex b/doc/context/sources/general/manuals/sql/sql-mkiv.tex
index 1b05c8738..95af57e11 100644
--- a/doc/context/sources/general/manuals/sql/sql-mkiv.tex
+++ b/doc/context/sources/general/manuals/sql/sql-mkiv.tex
@@ -487,6 +487,94 @@ context --extra=sql-tables --help
\stopsection
+\startsection[title=Example]
+
+The distribution has a few examples, for instance a logger. The following code shows
+a bit of this (we assume that the swiglib sqlite module is present):
+
+\startbuffer
+require("util-sql")
+utilities.sql.setmethod("sqlite")
+require("util-sql-loggers")
+
+local loggers = utilities.sql.loggers
+
+local presets = {
+ -- method = "sqlite",
+ database = "loggertest",
+ datatable = "loggers",
+ id = "loggers",
+}
+
+os.remove("loggertest.db") -- start fresh
+
+local db = loggers.createdb(presets)
+
+loggers.save(db, { -- variant 1: data subtable
+ type = "error",
+ action = "process",
+ data = { filename = "test-1", message = "whatever a" }
+} )
+
+loggers.save(db, { -- variant 2: flat table
+ type = "warning",
+ action = "process",
+ filename = "test-2",
+ message = "whatever b"
+} )
+
+
+local result = loggers.collect(db, {
+ start = {
+ day = 1,
+ month = 1,
+ year = 2016,
+ },
+ stop = {
+ day = 31,
+ month = 12,
+ year = 2116,
+ },
+ limit = 1000000,
+ -- type = "error",
+ action = "process"
+})
+
+context.starttabulate { "||||||" }
+for i=1,#result do
+ local r = result[i]
+ context.NC() context(r.time)
+ context.NC() context(r.type)
+ context.NC() context(r.action)
+ if r.data then
+ context.NC() context(r.data.filename)
+ context.NC() context(r.data.message)
+ else
+ context.NC()
+ context.NC()
+ end
+ context.NC() context.NR()
+end
+context.stoptabulate()
+
+-- local result = loggers.cleanup(db, {
+-- before = {
+-- day = 1,
+-- month = 1,
+-- year = 2117,
+-- },
+-- })
+\stopbuffer
+
+\typebuffer
+
+In this example we typeset the (small) table):
+
+\ctxluabuffer
+
+
+\stopsection
+
\startsection[title=Colofon]
\starttabulate[|B|p|]