diff options
29 files changed, 941 insertions, 84 deletions
diff --git a/context/data/scite/context/lexers/scite-context-lexer-cpp.lua b/context/data/scite/context/lexers/scite-context-lexer-cpp.lua index 31180e6a5..91ada7828 100644 --- a/context/data/scite/context/lexers/scite-context-lexer-cpp.lua +++ b/context/data/scite/context/lexers/scite-context-lexer-cpp.lua @@ -87,7 +87,7 @@ local operator = token("special", S("+-*/%^!=<>;:{}[]().&|?~")) ----- optionalspace = spacing^0 -local p_keywords = exact_match(keywords ) +local p_keywords = exact_match(keywords) local p_datatypes = exact_match(datatypes) local p_macros = exact_match(macros) @@ -154,7 +154,7 @@ end cpplexer._tokenstyles = context.styleset -cpplexer._foldpattern = P("/*") + P("*/") + S("{}") -- separate entry else interference +cpplexer._foldpattern = P("/*") + P("*/") + S("{}") -- separate entry else interference (singular?) cpplexer._foldsymbols = { _patterns = { diff --git a/context/data/scite/context/lexers/scite-context-lexer-sql.lua b/context/data/scite/context/lexers/scite-context-lexer-sql.lua new file mode 100644 index 000000000..62f0fa820 --- /dev/null +++ b/context/data/scite/context/lexers/scite-context-lexer-sql.lua @@ -0,0 +1,238 @@ +local info = { + version = 1.001, + comment = "scintilla lpeg lexer for sql", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files", +} + +local P, R, S = lpeg.P, lpeg.R, lpeg.S + +local lexer = require("lexer") +local context = lexer.context +local patterns = context.patterns + +local token = lexer.token +local exact_match = lexer.exact_match + +local sqllexer = lexer.new("sql","scite-context-lexer-sql") +local whitespace = sqllexer.whitespace + +-- ANSI SQL 92 | 99 | 2003 + +local keywords_standard = { + "absolute", "action", "add", "after", "all", "allocate", "alter", "and", "any", + "are", "array", "as", "asc", "asensitive", "assertion", "asymmetric", "at", + "atomic", "authorization", "avg", "before", "begin", "between", "bigint", + "binary", "bit", "bit_length", "blob", "boolean", "both", "breadth", "by", + "call", "called", "cascade", "cascaded", "case", "cast", "catalog", "char", + "char_length", "character", "character_length", "check", "clob", "close", + "coalesce", "collate", "collation", "column", "commit", "condition", "connect", + "connection", "constraint", "constraints", "constructor", "contains", "continue", + "convert", "corresponding", "count", "create", "cross", "cube", "current", + "current_date", "current_default_transform_group", "current_path", + "current_role", "current_time", "current_timestamp", + "current_transform_group_for_type", "current_user", "cursor", "cycle", "data", + "date", "day", "deallocate", "dec", "decimal", "declare", "default", + "deferrable", "deferred", "delete", "depth", "deref", "desc", "describe", + "descriptor", "deterministic", "diagnostics", "disconnect", "distinct", "do", + "domain", "double", "drop", "dynamic", "each", "element", "else", "elseif", + "end", "equals", "escape", "except", "exception", "exec", "execute", "exists", + "exit", "external", "extract", "false", "fetch", "filter", "first", "float", + "for", "foreign", "found", "free", "from", "full", "function", "general", "get", + "global", "go", "goto", "grant", "group", "grouping", "handler", "having", + "hold", "hour", "identity", "if", "immediate", "in", "indicator", "initially", + "inner", "inout", "input", "insensitive", "insert", "int", "integer", + "intersect", "interval", "into", "is", "isolation", "iterate", "join", "key", + "language", "large", "last", "lateral", "leading", "leave", "left", "level", + "like", "local", "localtime", "localtimestamp", "locator", "loop", "lower", + "map", "match", "max", "member", "merge", "method", "min", "minute", "modifies", + "module", "month", "multiset", "names", "national", "natural", "nchar", "nclob", + "new", "next", "no", "none", "not", "null", "nullif", "numeric", "object", + "octet_length", "of", "old", "on", "only", "open", "option", "or", "order", + "ordinality", "out", "outer", "output", "over", "overlaps", "pad", "parameter", + "partial", "partition", "path", "position", "precision", "prepare", "preserve", + "primary", "prior", "privileges", "procedure", "public", "range", "read", + "reads", "real", "recursive", "ref", "references", "referencing", "relative", + "release", "repeat", "resignal", "restrict", "result", "return", "returns", + "revoke", "right", "role", "rollback", "rollup", "routine", "row", "rows", + "savepoint", "schema", "scope", "scroll", "search", "second", "section", + "select", "sensitive", "session", "session_user", "set", "sets", "signal", + "similar", "size", "smallint", "some", "space", "specific", "specifictype", + "sql", "sqlcode", "sqlerror", "sqlexception", "sqlstate", "sqlwarning", "start", + "state", "static", "submultiset", "substring", "sum", "symmetric", "system", + "system_user", "table", "tablesample", "temporary", "then", "time", "timestamp", + "timezone_hour", "timezone_minute", "to", "trailing", "transaction", "translate", + "translation", "treat", "trigger", "trim", "true", "under", "undo", "union", + "unique", "unknown", "unnest", "until", "update", "upper", "usage", "user", + "using", "value", "values", "varchar", "varying", "view", "when", "whenever", + "where", "while", "window", "with", "within", "without", "work", "write", "year", + "zone", +} + +-- The dialects list is taken from drupal.org with standard subtracted. +-- +-- MySQL 3.23.x | 4.x | 5.x +-- PostGreSQL 8.1 +-- MS SQL Server 2000 +-- MS ODBC +-- Oracle 10.2 + +local keywords_dialects = { + "a", "abort", "abs", "access", "ada", "admin", "aggregate", "alias", "also", + "always", "analyse", "analyze", "assignment", "attribute", "attributes", "audit", + "auto_increment", "avg_row_length", "backup", "backward", "bernoulli", "bitvar", + "bool", "break", "browse", "bulk", "c", "cache", "cardinality", "catalog_name", + "ceil", "ceiling", "chain", "change", "character_set_catalog", + "character_set_name", "character_set_schema", "characteristics", "characters", + "checked", "checkpoint", "checksum", "class", "class_origin", "cluster", + "clustered", "cobol", "collation_catalog", "collation_name", "collation_schema", + "collect", "column_name", "columns", "command_function", "command_function_code", + "comment", "committed", "completion", "compress", "compute", "condition_number", + "connection_name", "constraint_catalog", "constraint_name", "constraint_schema", + "containstable", "conversion", "copy", "corr", "covar_pop", "covar_samp", + "createdb", "createrole", "createuser", "csv", "cume_dist", "cursor_name", + "database", "databases", "datetime", "datetime_interval_code", + "datetime_interval_precision", "day_hour", "day_microsecond", "day_minute", + "day_second", "dayofmonth", "dayofweek", "dayofyear", "dbcc", "defaults", + "defined", "definer", "degree", "delay_key_write", "delayed", "delimiter", + "delimiters", "dense_rank", "deny", "derived", "destroy", "destructor", + "dictionary", "disable", "disk", "dispatch", "distinctrow", "distributed", "div", + "dual", "dummy", "dump", "dynamic_function", "dynamic_function_code", "enable", + "enclosed", "encoding", "encrypted", "end-exec", "enum", "errlvl", "escaped", + "every", "exclude", "excluding", "exclusive", "existing", "exp", "explain", + "fields", "file", "fillfactor", "final", "float4", "float8", "floor", "flush", + "following", "force", "fortran", "forward", "freetext", "freetexttable", + "freeze", "fulltext", "fusion", "g", "generated", "granted", "grants", + "greatest", "header", "heap", "hierarchy", "high_priority", "holdlock", "host", + "hosts", "hour_microsecond", "hour_minute", "hour_second", "identified", + "identity_insert", "identitycol", "ignore", "ilike", "immutable", + "implementation", "implicit", "include", "including", "increment", "index", + "infile", "infix", "inherit", "inherits", "initial", "initialize", "insert_id", + "instance", "instantiable", "instead", "int1", "int2", "int3", "int4", "int8", + "intersection", "invoker", "isam", "isnull", "k", "key_member", "key_type", + "keys", "kill", "lancompiler", "last_insert_id", "least", "length", "less", + "limit", "lineno", "lines", "listen", "ln", "load", "location", "lock", "login", + "logs", "long", "longblob", "longtext", "low_priority", "m", "matched", + "max_rows", "maxextents", "maxvalue", "mediumblob", "mediumint", "mediumtext", + "message_length", "message_octet_length", "message_text", "middleint", + "min_rows", "minus", "minute_microsecond", "minute_second", "minvalue", + "mlslabel", "mod", "mode", "modify", "monthname", "more", "move", "mumps", + "myisam", "name", "nesting", "no_write_to_binlog", "noaudit", "nocheck", + "nocompress", "nocreatedb", "nocreaterole", "nocreateuser", "noinherit", + "nologin", "nonclustered", "normalize", "normalized", "nosuperuser", "nothing", + "notify", "notnull", "nowait", "nullable", "nulls", "number", "octets", "off", + "offline", "offset", "offsets", "oids", "online", "opendatasource", "openquery", + "openrowset", "openxml", "operation", "operator", "optimize", "optionally", + "options", "ordering", "others", "outfile", "overlay", "overriding", "owner", + "pack_keys", "parameter_mode", "parameter_name", "parameter_ordinal_position", + "parameter_specific_catalog", "parameter_specific_name", + "parameter_specific_schema", "parameters", "pascal", "password", "pctfree", + "percent", "percent_rank", "percentile_cont", "percentile_disc", "placing", + "plan", "pli", "postfix", "power", "preceding", "prefix", "preorder", "prepared", + "print", "proc", "procedural", "process", "processlist", "purge", "quote", + "raid0", "raiserror", "rank", "raw", "readtext", "recheck", "reconfigure", + "regexp", "regr_avgx", "regr_avgy", "regr_count", "regr_intercept", "regr_r2", + "regr_slope", "regr_sxx", "regr_sxy", "regr_syy", "reindex", "reload", "rename", + "repeatable", "replace", "replication", "require", "reset", "resource", + "restart", "restore", "returned_cardinality", "returned_length", + "returned_octet_length", "returned_sqlstate", "rlike", "routine_catalog", + "routine_name", "routine_schema", "row_count", "row_number", "rowcount", + "rowguidcol", "rowid", "rownum", "rule", "save", "scale", "schema_name", + "schemas", "scope_catalog", "scope_name", "scope_schema", "second_microsecond", + "security", "self", "separator", "sequence", "serializable", "server_name", + "setof", "setuser", "share", "show", "shutdown", "simple", "soname", "source", + "spatial", "specific_name", "sql_big_result", "sql_big_selects", + "sql_big_tables", "sql_calc_found_rows", "sql_log_off", "sql_log_update", + "sql_low_priority_updates", "sql_select_limit", "sql_small_result", + "sql_warnings", "sqlca", "sqrt", "ssl", "stable", "starting", "statement", + "statistics", "status", "stddev_pop", "stddev_samp", "stdin", "stdout", + "storage", "straight_join", "strict", "string", "structure", "style", + "subclass_origin", "sublist", "successful", "superuser", "synonym", "sysdate", + "sysid", "table_name", "tables", "tablespace", "temp", "template", "terminate", + "terminated", "text", "textsize", "than", "ties", "tinyblob", "tinyint", + "tinytext", "toast", "top", "top_level_count", "tran", "transaction_active", + "transactions_committed", "transactions_rolled_back", "transform", "transforms", + "trigger_catalog", "trigger_name", "trigger_schema", "truncate", "trusted", + "tsequal", "type", "uescape", "uid", "unbounded", "uncommitted", "unencrypted", + "unlisten", "unlock", "unnamed", "unsigned", "updatetext", "use", + "user_defined_type_catalog", "user_defined_type_code", "user_defined_type_name", + "user_defined_type_schema", "utc_date", "utc_time", "utc_timestamp", "vacuum", + "valid", "validate", "validator", "var_pop", "var_samp", "varbinary", "varchar2", + "varcharacter", "variable", "variables", "verbose", "volatile", "waitfor", + "width_bucket", "writetext", "x509", "xor", "year_month", "zerofill", +} + +local space = patterns.space -- S(" \n\r\t\f\v") +local any = patterns.any +local restofline = patterns.restofline +local startofline = patterns.startofline + +local squote = P("'") +local dquote = P('"') +local bquote = P('`') +local escaped = P("\\") * P(1) + +local begincomment = P("/*") +local endcomment = P("*/") + +local decimal = patterns.decimal +local float = patterns.float +local integer = P("-")^-1 * decimal + +local spacing = token(whitespace, space^1) +local rest = token("default", any) + +local shortcomment = token("comment", (P("#") + P("--")) * restofline^0) +local longcomment = token("comment", begincomment * (1-endcomment)^0 * endcomment^-1) + +local p_validword = R("AZ","az","__") * R("AZ","az","__","09")^0 +local identifier = token("default",p_validword) + +local shortstring = token("quote", dquote) -- can be shared + * token("string", (escaped + (1-dquote))^0) + * token("quote", dquote) + + token("quote", squote) + * token("string", (escaped + (1-squote))^0) + * token("quote", squote) + + token("quote", bquote) + * token("string", (escaped + (1-bquote))^0) + * token("quote", bquote) + +local p_keywords_s = exact_match(keywords_standard,nil,true) +local p_keywords_d = exact_match(keywords_dialects,nil,true) +local keyword_s = token("keyword", p_keywords_s) +local keyword_d = token("command", p_keywords_d) + +local number = token("number", float + integer) +local operator = token("special", S("+-*/%^!=<>;:{}[]().&|?~")) + +sqllexer._tokenstyles = context.styleset + +sqllexer._foldpattern = P("/*") + P("*/") + S("{}") -- separate entry else interference + +sqllexer._foldsymbols = { + _patterns = { + "/%*", + "%*/", + }, + ["comment"] = { + ["/*"] = 1, + ["*/"] = -1, + } +} + +sqllexer._rules = { + { "whitespace", spacing }, + { "keyword-s", keyword_s }, + { "keyword-d", keyword_d }, + { "identifier", identifier }, + { "string", shortstring }, + { "longcomment", longcomment }, + { "shortcomment", shortcomment }, + { "number", number }, + { "operator", operator }, + { "rest", rest }, +} + +return sqllexer diff --git a/context/data/scite/context/scite-context-external.properties b/context/data/scite/context/scite-context-external.properties index b48f25525..06e716432 100644 --- a/context/data/scite/context/scite-context-external.properties +++ b/context/data/scite/context/scite-context-external.properties @@ -41,6 +41,7 @@ lexer.*.lpeg=lpeg file.patterns.cweb=*.w;*.ww; file.patterns.cpp=*.h;*.c;*.hh;*.cc;*.hpp;*.cpp;*.hxx;*.cxx; file.patterns.bib=*.bib +file.patterns.sql=*.sql lexer.$(file.patterns.metapost)=lpeg_scite-context-lexer-mps lexer.$(file.patterns.metafun)=lpeg_scite-context-lexer-mps @@ -52,6 +53,7 @@ lexer.$(file.patterns.pdf)=lpeg_scite-context-lexer-pdf lexer.$(file.patterns.cweb)=lpeg_scite-context-lexer-web lexer.$(file.patterns.cpp)=lpeg_scite-context-lexer-cpp lexer.$(file.patterns.bib)=lpeg_scite-context-lexer-bibtex +lexer.$(file.patterns.sql)=lpeg_scite-context-lexer-sql lexer.$(file.patterns.tex)=lpeg_scite-context-lexer-tex lexer.$(file.patterns.xml)=lpeg_scite-context-lexer-xml diff --git a/doc/context/documents/general/columnsets/columnsets.pdf b/doc/context/documents/general/columnsets/columnsets.pdf Binary files differindex c79c63341..0d4e862f1 100644 --- a/doc/context/documents/general/columnsets/columnsets.pdf +++ b/doc/context/documents/general/columnsets/columnsets.pdf diff --git a/doc/context/sources/general/columnsets/columnsets/columnsets.tex b/doc/context/sources/general/columnsets/columnsets/columnsets.tex index 81d6c5880..7d68872ef 100644 --- a/doc/context/sources/general/columnsets/columnsets/columnsets.tex +++ b/doc/context/sources/general/columnsets/columnsets/columnsets.tex @@ -383,6 +383,8 @@ This mechanism performs okay but it needs to be used with care: an occasional manual intervention is needed to get optimal results. After all, we're operating in the area where normally click and point desktop publishing is used. +{\bf For the moment you need to load the new code with: \type{\usemodule[newcolumnsets]}} + \startlines Hans Hagen PRAGMA ADE diff --git a/doc/context/sources/general/manuals/luatex/luatex-libraries.tex b/doc/context/sources/general/manuals/luatex/luatex-libraries.tex index 62a64ffd6..cab0210c9 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-libraries.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-libraries.tex @@ -5688,6 +5688,22 @@ This function is basically a shortcut for repeated calls to \type {tex.sprint(<number> n, <string> s, ...)}, once for each of the supplied argument tables. +\subsubsection{\type {tex.cprint}} + +This function takes a number indicating the to be used catcode, plus either a +table of strings or an argument list of strings that will be pushed into the +input stream. + +\startfunctioncall +tex.cprint( 1," 1: $&{\\foo}") tex.print("\\par") -- a lot of \bgroup s +tex.cprint( 2," 2: $&{\\foo}") tex.print("\\par") -- matching \egroup s +tex.cprint( 9," 9: $&{\\foo}") tex.print("\\par") -- all get ignored +tex.cprint(10,"10: $&{\\foo}") tex.print("\\par") -- all become spaces +tex.cprint(11,"11: $&{\\foo}") tex.print("\\par") -- letters +tex.cprint(12,"12: $&{\\foo}") tex.print("\\par") -- other characters +tex.cprint(14,"12: $&{\\foo}") tex.print("\\par") -- comment triggers +\stopfunctioncall + \subsubsection{\type {tex.write}} \startfunctioncall diff --git a/metapost/context/base/mpiv/mp-tool.mpiv b/metapost/context/base/mpiv/mp-tool.mpiv index 97403f69a..00031aea2 100644 --- a/metapost/context/base/mpiv/mp-tool.mpiv +++ b/metapost/context/base/mpiv/mp-tool.mpiv @@ -1405,7 +1405,7 @@ enddef; def _finarr text t = if autoarrows : set_ahlength (t) fi ; draw arrowpath _apth t ; % arrowpath added - both arrowhead _apth t ; + fillup arrowhead _apth t ; enddef; %D Handy too ...... diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index 8820f6b1a..795354474 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -56,7 +56,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-lua"] = package.loaded["l-lua"] or true --- original size: 4547, stripped down to: 2526 +-- original size: 4734, stripped down to: 2626 if not modules then modules={} end modules ['l-lua']={ version=1.001, @@ -65,10 +65,14 @@ if not modules then modules={} end modules ['l-lua']={ copyright="PRAGMA ADE / ConTeXt Development Team", license="see context related readme files" } -local major,minor=string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") -_MAJORVERSION=tonumber(major) or 5 -_MINORVERSION=tonumber(minor) or 1 +_MAJORVERSION,_MINORVERSION=string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") +_MAJORVERSION=tonumber(_MAJORVERSION) or 5 +_MINORVERSION=tonumber(_MINORVERSION) or 1 _LUAVERSION=_MAJORVERSION+_MINORVERSION/10 +if _LUAVERSION<5.2 and jit then + _MINORVERSION=2 + _LUAVERSION=5.2 +end if not lpeg then lpeg=require("lpeg") end @@ -18718,8 +18722,8 @@ end -- of closure -- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 796028 --- stripped bytes : 288678 +-- original bytes : 796215 +-- stripped bytes : 288765 -- end library merge diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index 8820f6b1a..795354474 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -56,7 +56,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-lua"] = package.loaded["l-lua"] or true --- original size: 4547, stripped down to: 2526 +-- original size: 4734, stripped down to: 2626 if not modules then modules={} end modules ['l-lua']={ version=1.001, @@ -65,10 +65,14 @@ if not modules then modules={} end modules ['l-lua']={ copyright="PRAGMA ADE / ConTeXt Development Team", license="see context related readme files" } -local major,minor=string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") -_MAJORVERSION=tonumber(major) or 5 -_MINORVERSION=tonumber(minor) or 1 +_MAJORVERSION,_MINORVERSION=string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") +_MAJORVERSION=tonumber(_MAJORVERSION) or 5 +_MINORVERSION=tonumber(_MINORVERSION) or 1 _LUAVERSION=_MAJORVERSION+_MINORVERSION/10 +if _LUAVERSION<5.2 and jit then + _MINORVERSION=2 + _LUAVERSION=5.2 +end if not lpeg then lpeg=require("lpeg") end @@ -18718,8 +18722,8 @@ end -- of closure -- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 796028 --- stripped bytes : 288678 +-- original bytes : 796215 +-- stripped bytes : 288765 -- end library merge diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index 8820f6b1a..795354474 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -56,7 +56,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-lua"] = package.loaded["l-lua"] or true --- original size: 4547, stripped down to: 2526 +-- original size: 4734, stripped down to: 2626 if not modules then modules={} end modules ['l-lua']={ version=1.001, @@ -65,10 +65,14 @@ if not modules then modules={} end modules ['l-lua']={ copyright="PRAGMA ADE / ConTeXt Development Team", license="see context related readme files" } -local major,minor=string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") -_MAJORVERSION=tonumber(major) or 5 -_MINORVERSION=tonumber(minor) or 1 +_MAJORVERSION,_MINORVERSION=string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") +_MAJORVERSION=tonumber(_MAJORVERSION) or 5 +_MINORVERSION=tonumber(_MINORVERSION) or 1 _LUAVERSION=_MAJORVERSION+_MINORVERSION/10 +if _LUAVERSION<5.2 and jit then + _MINORVERSION=2 + _LUAVERSION=5.2 +end if not lpeg then lpeg=require("lpeg") end @@ -18718,8 +18722,8 @@ end -- of closure -- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 796028 --- stripped bytes : 288678 +-- original bytes : 796215 +-- stripped bytes : 288765 -- end library merge diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua index 8820f6b1a..795354474 100644 --- a/scripts/context/stubs/win64/mtxrun.lua +++ b/scripts/context/stubs/win64/mtxrun.lua @@ -56,7 +56,7 @@ do -- create closure to overcome 200 locals limit package.loaded["l-lua"] = package.loaded["l-lua"] or true --- original size: 4547, stripped down to: 2526 +-- original size: 4734, stripped down to: 2626 if not modules then modules={} end modules ['l-lua']={ version=1.001, @@ -65,10 +65,14 @@ if not modules then modules={} end modules ['l-lua']={ copyright="PRAGMA ADE / ConTeXt Development Team", license="see context related readme files" } -local major,minor=string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") -_MAJORVERSION=tonumber(major) or 5 -_MINORVERSION=tonumber(minor) or 1 +_MAJORVERSION,_MINORVERSION=string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") +_MAJORVERSION=tonumber(_MAJORVERSION) or 5 +_MINORVERSION=tonumber(_MINORVERSION) or 1 _LUAVERSION=_MAJORVERSION+_MINORVERSION/10 +if _LUAVERSION<5.2 and jit then + _MINORVERSION=2 + _LUAVERSION=5.2 +end if not lpeg then lpeg=require("lpeg") end @@ -18718,8 +18722,8 @@ end -- of closure -- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 796028 --- stripped bytes : 288678 +-- original bytes : 796215 +-- stripped bytes : 288765 -- end library merge diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf Binary files differindex 541b6a783..a13d3088a 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/mkiv/cldf-ini.lua b/tex/context/base/mkiv/cldf-ini.lua index 4da01e8e1..0c39f72f5 100644 --- a/tex/context/base/mkiv/cldf-ini.lua +++ b/tex/context/base/mkiv/cldf-ini.lua @@ -193,7 +193,7 @@ local registerfunction, unregisterfunction, reservefunction, knownfunctions, cal local f_resolve = nil local p_resolve = ((1-lpegP("."))^1 / function(s) f_resolve = f_resolve[s] end * lpegP(".")^0)^1 - function resolvestoredfunction(str) + local function resolvestoredfunction(str) f_resolve = global lpegmatch(p_resolve,str) return f_resolve diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index ea60d4a45..8687bf616 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2016.03.01 14:03} +\newcontextversion{2016.03.02 16:55} %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/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 44d760fb3..d8a2e57de 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2016.03.01 14:03} +\edef\contextversion{2016.03.02 16:55} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/font-otc.lua b/tex/context/base/mkiv/font-otc.lua index 0cc7b58b0..d4c98d6fc 100644 --- a/tex/context/base/mkiv/font-otc.lua +++ b/tex/context/base/mkiv/font-otc.lua @@ -60,14 +60,6 @@ local function addfeature(data,feature,specifications) return end -- feature has to be unique but the name entry wins eventually - -- local gsubfeatures = features.gsub - -- if gsubfeatures and gsubfeatures[feature] then - -- return -- already present - -- end - -- local gposfeatures = features.gpos - -- if gposfeatures and gposfeatures[feature] then - -- return -- already present - -- end -- todo alse gpos @@ -454,6 +446,9 @@ local function addfeature(data,feature,specifications) elseif featuretype == "chainposition" then category = "gpos" coverage = prepare_chain(list,featuretype,sublookups) + else + report_otf("not registering feature %a, unknown category",feature) + return end if coverage and next(coverage) then nofsteps = nofsteps + 1 @@ -487,28 +482,17 @@ local function addfeature(data,feature,specifications) insert(sequences,sequence) end -- register in metadata (merge as there can be a few) - local k = nil - if category == "gpos" then - if not gposfeatures then - gposfeatures = { } - fontfeatures.gpos = gposfeatures - end - k = gposfeatures[feature] - if not k then - k = { } - gposfeatures[feature] = k - end - else - if not gsubfeatures then - gsubfeatures = { } - fontfeatures.gsub = gsubfeatures - end - k = gsubfeatures[feature] - if not k then - k = { } - gsubfeatures[feature] = k - end + local features = fontfeatures[category] + if not features then + features = { } + fontfeatures[category] = features + end + local k = features[feature] + if not k then + k = { } + features[feature] = k end + -- for script, languages in next, askedfeatures do local kk = k[script] if not kk then diff --git a/tex/context/base/mkiv/font-otn.lua b/tex/context/base/mkiv/font-otn.lua index 8815f2a14..e1228d004 100644 --- a/tex/context/base/mkiv/font-otn.lua +++ b/tex/context/base/mkiv/font-otn.lua @@ -2709,7 +2709,7 @@ local handle_contextchain = nil -- normal_handle_contextchain(head,start,kind,chainname,contexts,sequence,lookuphash) -function chained_contextchain(head,start,stop,...) +local function chained_contextchain(head,start,stop,...) local steps = currentlookup.steps local nofsteps = currentlookup.nofsteps if nofsteps > 1 then diff --git a/tex/context/base/mkiv/font-ots.lua b/tex/context/base/mkiv/font-ots.lua index 5cbdbab23..e2cccebe8 100644 --- a/tex/context/base/mkiv/font-ots.lua +++ b/tex/context/base/mkiv/font-ots.lua @@ -2713,7 +2713,7 @@ handlers.gpos_context = handle_contextchain -- this needs testing -function chained_contextchain(head,start,stop,dataset,sequence,currentlookup,rlmode) +local function chained_contextchain(head,start,stop,dataset,sequence,currentlookup,rlmode) local steps = currentlookup.steps local nofsteps = currentlookup.nofsteps if nofsteps > 1 then diff --git a/tex/context/base/mkiv/font-tfm.lua b/tex/context/base/mkiv/font-tfm.lua index 2dd576849..83ac2f0d8 100644 --- a/tex/context/base/mkiv/font-tfm.lua +++ b/tex/context/base/mkiv/font-tfm.lua @@ -34,6 +34,7 @@ local registertfmfeature = tfmfeatures.register constructors.resolvevirtualtoo = false -- wil be set in font-ctx.lua fonts.formats.tfm = "type1" -- we need to have at least a value here +fonts.formats.ofm = "type1" -- we need to have at least a value here --[[ldx-- <p>The next function encapsulates the standard <l n='tfm'/> loader as @@ -196,3 +197,5 @@ function readers.tfm(specification) end return check_tfm(specification,fullname) end + +readers.ofm = readers.tfm diff --git a/tex/context/base/mkiv/l-lua.lua b/tex/context/base/mkiv/l-lua.lua index cb6182907..b90f37e3d 100644 --- a/tex/context/base/mkiv/l-lua.lua +++ b/tex/context/base/mkiv/l-lua.lua @@ -19,12 +19,20 @@ if not modules then modules = { } end modules ['l-lua'] = { -- compatibility hacksand helpers -local major, minor = string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") +_MAJORVERSION, _MINORVERSION = string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") -_MAJORVERSION = tonumber(major) or 5 -_MINORVERSION = tonumber(minor) or 1 +_MAJORVERSION = tonumber(_MAJORVERSION) or 5 +_MINORVERSION = tonumber(_MINORVERSION) or 1 _LUAVERSION = _MAJORVERSION + _MINORVERSION/10 +if _LUAVERSION < 5.2 and jit then + -- + -- we want loadstring cum suis to behave like 5.2 + -- + _MINORVERSION = 2 + _LUAVERSION = 5.2 +end + -- lpeg if not lpeg then diff --git a/tex/context/base/mkiv/luat-mac.lua b/tex/context/base/mkiv/luat-mac.lua index 6214e591e..4274fe9f9 100644 --- a/tex/context/base/mkiv/luat-mac.lua +++ b/tex/context/base/mkiv/luat-mac.lua @@ -41,7 +41,7 @@ local function set(s) h = rep("#",2^(ns-1)) hashes[ns] = h end - m = h .. n + local m = h .. n top[s] = m return m end diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex ed06b4547..e84b45754 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex a8fc8f408..adb87eeaa 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/strc-not.lua b/tex/context/base/mkiv/strc-not.lua index 024366438..ddbd2ae06 100644 --- a/tex/context/base/mkiv/strc-not.lua +++ b/tex/context/base/mkiv/strc-not.lua @@ -313,7 +313,8 @@ local function getdeltapage(tag,n) local references = li.references if references then -- local symb = structures.references.collected[""]["symb:"..tag..":"..n] - local symb = structures.references.collected[""]["*"..(references.internal or 0)] + local rymb = structures.references.collected[""] + local symb = rymb and rymb["*"..(references.internal or 0)] local notepage = references.realpage or 0 local symbolpage = symb and symb.references.realpage or -1 if trace_references then diff --git a/tex/context/base/mkiv/symb-run.mkiv b/tex/context/base/mkiv/symb-run.mkiv index de17201c3..ed4d90861 100644 --- a/tex/context/base/mkiv/symb-run.mkiv +++ b/tex/context/base/mkiv/symb-run.mkiv @@ -19,7 +19,7 @@ context.start() context.forcesymbolset { collection } context.starttabulate { "|lT|l|l|" } - local option = { framecolor = "orange", rulethickness = ".8pt", offset = interfaces.variables.overlay } + local options = { framecolor = "orange", rulethickness = ".8pt", offset = interfaces.variables.overlay } for i=1,#symbols do local symbol = symbols[i] context.NC() @@ -44,4 +44,16 @@ \gdef\symb_show_set[#1]% {\ctxcommand{showsymbolset("#1","\symbolset{#1}")}} -\protect \endinput +\protect + +\continueifinputfile{symb-run.mkiv} + +\usesymbols[cc] + +\starttext + + \showsymbolset[cc] + + \symbol[cc][cc-by-sa-nc] + +\stoptext diff --git a/tex/context/base/mkiv/typo-krn.lua b/tex/context/base/mkiv/typo-krn.lua index cdb0a786c..9bf4a5a3b 100644 --- a/tex/context/base/mkiv/typo-krn.lua +++ b/tex/context/base/mkiv/typo-krn.lua @@ -243,7 +243,8 @@ local function inject_begin(boundary,prev,keeptogether,krn,ok) -- prev is a glyp if charone > 0 then local font = getfont(boundary) local chartwo = getchar(boundary) - local kerns = chardata[font][charone].kerns + local data = chardata[font][charone] + local kerns = data and data.kerns local kern = new_kern((kerns and kerns[chartwo] or 0) + quaddata[font]*krn) setlink(kern,boundary) return kern, true @@ -280,7 +281,8 @@ local function inject_end(boundary,next,keeptogether,krn,ok) if charone > 0 then local font = getfont(tail) local chartwo = getchar(next) - local kerns = chardata[font][charone].kerns + local data = chardata[font][charone] + local kerns = data and data.kerns local kern = (kerns and kerns[chartwo] or 0) + quaddata[font]*krn insert_node_after(boundary,tail,new_kern(kern)) return boundary, true @@ -329,7 +331,8 @@ local function process_list(head,keeptogether,krn,font,okay) -- keep 'm else local prevchar = getchar(prev) - local kerns = chardata[font][prevchar].kerns + local data = chardata[font][prevchar] + local kerns = data and data.kerns -- if kerns then -- print("it happens indeed, basemode kerns not yet injected") -- end @@ -446,7 +449,8 @@ function kerns.handler(head) if keeptogether and keeptogether(prev,start) then -- keep 'm else - local kerns = chardata[font][prevchar].kerns + local data = chardata[font][prevchar] + local kerns = data and data.kerns local kern = (kerns and kerns[char] or 0) + quaddata[font]*krn insert_node_before(head,start,kern_injector(fillup,kern)) done = true diff --git a/tex/context/modules/mkiv/m-scite.mkiv b/tex/context/modules/mkiv/m-scite.mkiv index 9cf96253f..71f31bece 100644 --- a/tex/context/modules/mkiv/m-scite.mkiv +++ b/tex/context/modules/mkiv/m-scite.mkiv @@ -191,8 +191,17 @@ end {\ctxlua{buffers.scite.installcommands()}% \let\installscitecommands\relax} -\unexpanded\def\startscite{\startlines} -\unexpanded\def\stopscite {\stoplines} +\unexpanded\def\startscite + {\begingroup + \dosingleempty\buff_scite_start} + +\def\buff_scite_start[#1]% + {\edef\currentscitelexer{#1}% + \dostartbuffer[@scite@][startscite][stopscite]} + +\unexpanded\def\stopscite + {\scitebuffer[\ifx\currentscitelexer\empty tex\else\currentscitelexer\fi][@scite@]% + \endgroup} \unexpanded\def\scitefile {\dosingleargument\module_scite_file} @@ -204,9 +213,9 @@ end \tt \dontcomplain \startcontextcode - \startscite + \startlines \getbuffer[lex]% - \stopscite + \stoplines \stopcontextcode \stop} @@ -224,9 +233,9 @@ end \tt \dontcomplain \setcatcodetable\ctxcatcodes % needed in xml - \startscite + \startlines \getbuffer[lex]% - \stopscite + \stoplines \stop} \protect diff --git a/tex/context/modules/mkiv/s-tugboat-columns.mkiv b/tex/context/modules/mkiv/s-tugboat-columns.mkiv new file mode 100644 index 000000000..f8cace1e9 --- /dev/null +++ b/tex/context/modules/mkiv/s-tugboat-columns.mkiv @@ -0,0 +1,556 @@ +%D \module +%D [ file=t-tugboat +%D version=$Id: t-tugboat.tex 91 2011-08-14 16:48:04Z karl $ +%D title=\CONTEXT\ Style File, +%D subtitle=\TUGBOAT\ base style, +%D author={Hans Hagen, Aditya Mahajan, \unknown}, +%D date=\currentdate, +%D copyright=Public Domain] + +%D This file is derived t-tugboat by Aditya Mahajan which in turn is derived +%D from older files. Here we use columnsets. + +\usemodule[newcolumnsets] + +%D We store the information about the article in variables. + + +\setvariables + [tugboat] + [type=article, + % + year=1900, + volume=0, + number=0, + page=1001, + % + title=ConTeXt style for TUGboat, + subtitle=, + keywords=, + author=T. Boat, + address={Harbour Master KB \\ Harbour St. 1 \\ 8061GH Hasselt NL}, + email={tugboat@tug.org}] + +%D \TUGBOAT\ uses slightly different interline space than the default. So we change +%D the interline space. + +\definebodyfontenvironment [8pt] [interlinespace=9.5pt, big=9pt, small=7pt] +\definebodyfontenvironment [9pt] [interlinespace=11pt, big=10pt, small=8pt] +\definebodyfontenvironment [10pt] [interlinespace=12pt, big=12pt, small=9pt] +\definebodyfontenvironment [12pt] [interlinespace=14pt, big=14.4pt,small=10pt] +\definebodyfontenvironment [14.4pt] [interlinespace=18pt, big=14.4pt,small=12pt] + +%D We us e italic rather than slanted for emphasis. + +\setupbodyfontenvironment + [default] + [em=italic] + +%D \TUGBOAT\ uses Computer Modern fonts, and \CONTEXT\ uses Latin Modern by default. +%D So, we just specify the font size. + +\setupbodyfont + [10pt] + +%D We break after these chars in urls, not before. + +\sethyphenatedurlafter / +\sethyphenatedurlafter . +\sethyphenatedurlafter _ + +%D The original layout used in the \LATEX\ style for \TUGBOAT\ is a bit ambiguous. +%D It uses low|-|level \TEX\ syntax, rather than changing the layout in a human +%D understandable way (for example, by using the \mono{geometry} package. I have +%D tried to translate it to \CONTEXT\ as far as I understand. + +\setuppapersize + [letter] + [letter] + +\setuplayout + [topspace=3.8pc,% was 3.5pc + header=1pc, + headerdistance=1.5pc, + height=middle, + footerdistance=2pc, + footer=1pc, + bottomspace=3pc, + % + backspace=6pc, + width=middle, + cutspace=6pc, + % + margin=4pc, + margindistance=1pc] + +\setupcolumnset + [distance=1.5pc] + +\setuppagenumbering + [location=, + alternative=doublesided] + +%D In \TUGBOAT\ different articles are glued together to form the final journal, so +%D we do not want each article to occupy even number of pages. + +\installpagebreakhandler {last} {} + +%D We use automatic indentation control, that is: no indentation after titles and +%D skips. + +\setupindenting + [20pt,yes] + +%D We do not want indentation after lists. + +\setupenumerations [indentnext=no] +\setupdescriptions [indentnext=no] + +%D And these. We typeset itemizations ragged right. + +\setupitemgroup + [itemize] + [indentnext=no, + align=right] + +%D We align them at the paragraph indentation and pack them by default. + +\setupitemgroup + [itemize] + [each] + [margin=1pc, + width=1em, + distance=0pt] + +\setupitemgroup + [itemize] + [1] + [packed] + +%D We follow the \TUGBOAT\ style for sections. I do not know if \type {align=right} +%D also disables hyphenation. Lets wait and see on this. Rest all is straight +%D forward. It took me a while to realize that in \LATEX\ \type {\@startsection} the +%D absolute value of before skip (fourth argument) is important and not the sign. + +\setuphead + [section,subsection,subsubsection, + subject,subsubject,subsubsubject] + [style=bold, + align=right, + before={\blank[8pt]}, + after={\blank[4pt]}] + +%D We define a logical skip. This is equal to the \tex{topsep} in the normal style, +%D and most environments should have this skip. + +\definevspacingamount[tugsmallamount] [3pt plus 1pt minus 1pt][.5\lineheight] +\definevspacingamount[tugmediumamount][9pt plus 3pt minus 3pt][.5\lineheight] +\definevspacingamount[tuglargeamount] [10pt plus 4pt minus 4pt][\lineheight] + +\defineblank[tugblank] [tugsmallamount] +\defineblank[tugsmall] [tugsmallamount] +\defineblank[tugmedium][tugmediumamount] +\defineblank[tuglarge] [tuglargeamount] +\defineblank[tughalf] [halfline] + +\setupblank + [tugblank] + +\setupitemize + [1] + [before={\blank[tugblank]}, + after={\blank[tugblank]}, + inbetween={\blank[tugblank]}] + +\setuplines + [before={\blank[tugblank]}, + after={\blank[tugblank]}, + inbetween={\blank[tugblank]}] + +%D \TUGBOAT\ uses a smaller font size for verbatim typesetting. + +\setuptyping + [option=none, + before={\blank[tugblank]\switchtobodyfont[small]}, + after={\blank[tugblank]}] + +%D Not entirely a la \TUGBOAT: + +\unexpanded\def\MyFootNoteRule + {\hrule width 5pc height .4pt depth 0pt\relax \kern \strutdepth} + +\setupfootnotes + [bodyfont=8pt, + location=columns, + rule=on, + rulecommand=\MyFootNoteRule] + +\setupnotations + [location=joinedup, + width=fit, + headstyle=normal, + distance=.5em] + +%D We define a standard description and enumeration environment. + +\definedescription + [description] + [location=hanging, + width=broad, + before={\blank[tugblank]}, + after={\blank[tugblank]}] + +\defineenumeration + [enumeration] + [location=hanging, + width=broad, + before={\blank[tugblank]}, + after={\blank[tugblank]}] + +%D The bib does not handle urls nicely. So we provide a stop gap solution. + +\definereferenceformat + [cite] + [left={[}, + right={]}] + +\defineitemgroup + [bibliography] + [levels=1] + +\setupitemgroup + [bibliography] + [symbol=n, + left={[}, + right={]}, + width=1.5em, + stopper=, + itemalign=flushright, + inbetween={\blank[small]}] + +%D Instead of color, we use weighted gray scales: + +\setupcolors + [conversion=always] + +%D English it is. + +\mainlanguage + [en] + +%D We define some logical skips + +\defineblank [tugbefore] [big] +\defineblank [tuginbetween][big] +\defineblank [tugafter] [tugbefore] + +%D Some real macros: + +\unexpanded\def\StartAbstract + {\dostartbuffer[abstract][StartAbstract][StopAbstract]} + +\startsetups tugboat:abstract:setup + + \setuptolerance + [horizontal, tolerant] + + \setupnarrower + [before={\blank[tughalf]}, + after={\blank[tuglarge]}, + middle=4.875pc] + +\stopsetups + +%D Headers and footers are different for normal issues and proceedings. + +\startsetups tugboat:banner:text:article + +% {\sl TUGboat},\space +% Volume \getvariable{tugboat}{volume}\space +% (\getvariable{tugboat}{year}),\space +% No.\space\getvariable{tugboat}{number} + +\stopsetups + +\def\postissno{Proceedings of the \tubyear\ Annual Meeting} + +\startsetups tugboat:banner:text:proceedings + + \setups[tugboat:banner:text:article] + \thinspace\emdash\thinspace + \postissno + +\stopsetups + +\startsetups tugboat:banner:setup:article + + \setupheadertexts + [\setups{tugboat:banner:text:article}] + [pagenumber] + +% There are no footers in regular articles +% +% \setupfootertexts +% [][\getvariable{tugboat}{author}] +% [\getvariable{tugboat}{title}][] + +\stopsetups + +\startsetups tugboat:banner:setup:proceedings + + \setupheadertexts + [][\getvariable{tugboat}{title}] + [\getvariable{tugboat}{author}][] + + \setupfootertexts + [\setups{tugboat:banner:text:proceedings}] + [pagenumber] + +\stopsetups + +%D Article is default so, + +\setups[tugboat:banner:setup:article] + +%D It all starts here: + +\unexpanded\def\StartArticle{\directsetup{tugboat:\getvariable{tugboat}{type}:start}} +\unexpanded\def\StopArticle {\directsetup{tugboat:article:stop}} + +\startsetups tugboat:introduction:article + + \start + \unexpanded\def\\{\unskip\space\&\space\ignorespaces} + \hbox{\indent\getvariable{tugboat}{author}} + \par + \stop + +\stopsetups + +\startsetups tugboat:introduction:proceedings + + \blank[20pt] + + \start + \switchtobodyfont[12pt] + \def\\{\unskip\space\&\space\ignorespaces} + \getvariable{tugboat}{author} + \par + \stop + + \start + \switchtobodyfont[9pt] + \unexpanded\def\\{\unskip,\space\ignorespaces} + \getvariable{tugboat}{address} + \par + \start + \tt + \getvariable{tugboat}{email} + \stop + \par + \stop + +\stopsetups + +\startsetups tugboat:columns:presets + + % balancing data (heights) + +\stopsetups + +\startsetups tugboat:article:start + + \starttext + + \setups{tugboat:columns:presets} + + \setups{tugboat:banner:setup:\getvariable{tugboat}{type}} + + \startcolumnset + + \setupheadertexts + [\setups{tugboat:banner:text:article}] + [pagenumber] + + \setuppagenumber + [number=\getvariable{tugboat}{page}] + + \snaptogrid \vbox \bgroup + \forgetall + \hrule height .6pt + \blank[halfline] + \start + \let\\=\par + \start + \bf + \getvariable{tugboat}{title} + \stop + \par + \blank[halfline] + \hskip20pt\getvariable{tugboat}{author} + \stop + + \blank[line] + + \doiftext {\getbuffer[abstract]} { + \let\\=\endgraf + \setups[tugboat:abstract:setup] + \startsubject[title={Abstract}] + \getbuffer[abstract] + \stopsubject + } + \egroup + +\stopsetups + +\startsetups tugboat:proceedings:start + + \starttext + + \setups{tugboat:banner:setup:\getvariable{tugboat}{type}} + + \setupheader + [state=empty] + + \setuppagenumber + [number=\getvariable{tugboat}{page}] + + \snaptogrid \vbox \bgroup + + \forgetall + + \start + \switchtobodyfont[14.4pt] + \let\\=\par + \getvariable{tugboat}{title} + \par + \stop + + \setups{tugboat:introduction:\getvariable{tugboat}{type}} + + \blank[tugmedium] + + \let\\=\par + + \setups[tugboat:abstract:setup] + + \midaligned{\bf Abstract} + + \startnarrower[middle] + \getbuffer[abstract] + \stopnarrower + + \egroup + + \startcolumnset + +\stopsetups + +\def\signaturewidth{13pc} + +\startsetups tugboat:affiliation:article + + \blank[line] + + \snaptogrid \vbox \bgroup + + \forgetall + + \leftskip=\dimexpr\textwidth-\signaturewidth\relax + + \let\\=\par + + \dontleavehmode\llap { + $\diamond$\enspace + } + \getvariable{tugboat}{author} + \par + + \getvariable{tugboat}{address} + \par + + {\tt\getvariable{tugboat}{email}} + + \egroup + +\stopsetups + +\startsetups tugboat:affiliation:proceedings + + % nothing fancy at the end + +\stopsetups + +\startsetups tugboat:article:stop + + \setups{tugboat:affiliation:\getvariable{tugboat}{type}} + + \blank[line] + + \startpacked + \placenote[endnotes] + \stoppacked + + \stopcolumnset + + \page + + \stoptext + +\stopsetups + +%D Normal word spacing, really? + +\setuptolerance + [strict] + +%D Use this in documents: + +% \setuptolerance +% [verytolerant,stretch] + +%D Logos, abbreviations (load a local file if needed). + +\usemodule[abr-03] + +% \unexpanded\def\Dash {\unskip\thinspace\emdash\thinspace\ignorespaces} +% \unexpanded\def\slash{/\penalty\zerocount\hskip\zeropoint\relax} % |/| + +%D Language stuff. + +\hyphenation{Post-Script data-base data-bases} + +\setuplanguage + [lefthyphenmin=2, + rightthyphenmin=3] + +%D A hack to read tugboat.dates settings. + +\newcount\issueseqno + +\def\tubyear{1234} +\def\tubvol {5} +\def\tubnum {6} + +\def\issyear #1.{\def\tubyear{#1}} +\def\vol #1, #2.{\def\tubvol {#1}% + \def\tubnum {#2}} + +%D Good bye. + +\continueifinputfile{s-tugboat-columns.mkiv} + +\StartArticle + + \StartAbstract + \input bryson + \StopAbstract + + \dorecurse{30}{\input ward \par} \page + + \startitemize + \startitem \input ward \stopitem + \startitem \input ward \stopitem + \stopitemize + +\StopArticle diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 809b7ff2f..85cf556b5 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 03/01/16 14:03:56 +-- merge date : 03/02/16 16:55:49 do -- begin closure to overcome local limits and interference @@ -11,10 +11,14 @@ if not modules then modules={} end modules ['l-lua']={ copyright="PRAGMA ADE / ConTeXt Development Team", license="see context related readme files" } -local major,minor=string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") -_MAJORVERSION=tonumber(major) or 5 -_MINORVERSION=tonumber(minor) or 1 +_MAJORVERSION,_MINORVERSION=string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") +_MAJORVERSION=tonumber(_MAJORVERSION) or 5 +_MINORVERSION=tonumber(_MINORVERSION) or 1 _LUAVERSION=_MAJORVERSION+_MINORVERSION/10 +if _LUAVERSION<5.2 and jit then + _MINORVERSION=2 + _LUAVERSION=5.2 +end if not lpeg then lpeg=require("lpeg") end @@ -5858,7 +5862,8 @@ tfm.maxnestingsize=65536*1024 local tfmfeatures=constructors.newfeatures("tfm") local registertfmfeature=tfmfeatures.register constructors.resolvevirtualtoo=false -fonts.formats.tfm="type1" +fonts.formats.tfm="type1" +fonts.formats.ofm="type1" function tfm.setfeatures(tfmdata,features) local okay=constructors.initializefeatures("tfm",tfmdata,features,trace_features,report_tfm) if okay then @@ -5984,6 +5989,7 @@ function readers.tfm(specification) end return check_tfm(specification,fullname) end +readers.ofm=readers.tfm end -- closure @@ -13863,7 +13869,7 @@ otf.chainhandlers={ verbose=verbose_handle_contextchain, } local handle_contextchain=nil -function chained_contextchain(head,start,stop,...) +local function chained_contextchain(head,start,stop,...) local steps=currentlookup.steps local nofsteps=currentlookup.nofsteps if nofsteps>1 then |