summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2011-10-13 21:36:00 +0200
committerHans Hagen <pragma@wxs.nl>2011-10-13 21:36:00 +0200
commite7740d51abd575bf156b3ce1f48a2a5543fbc9eb (patch)
treeb16cbc152d169092d48c75073b054d63119af702 /tex
parent2d7544553ee2a9a387876c685ca7cb4ccd29a252 (diff)
downloadcontext-e7740d51abd575bf156b3ce1f48a2a5543fbc9eb.tar.gz
beta 2011.10.13 21:36
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/anch-pgr.mkiv7
-rw-r--r--tex/context/base/chem-str.lua10
-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.pdfbin4093 -> 4095 bytes
-rw-r--r--tex/context/base/context-version.pngbin106363 -> 106350 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-ctx.lua2
-rw-r--r--tex/context/base/mlib-pps.lua6
-rw-r--r--tex/context/base/mult-mps.lua73
-rw-r--r--tex/context/base/status-files.pdfbin23918 -> 23924 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin163360 -> 163362 bytes
-rw-r--r--tex/context/base/typo-itc.lua19
14 files changed, 83 insertions, 42 deletions
diff --git a/tex/context/base/anch-pgr.mkiv b/tex/context/base/anch-pgr.mkiv
index 19cc43e0e..f86805760 100644
--- a/tex/context/base/anch-pgr.mkiv
+++ b/tex/context/base/anch-pgr.mkiv
@@ -419,13 +419,6 @@
\defineoverlay[\v!text+1][\positionoverlay{\v!text+1}]
\defineoverlay[\v!text+2][\positionoverlay{\v!text+2}]
-%D The auxiliary \METAPOST\ macros are defined by default,
-%D by saying:
-
-\startMPextensions
- if unknown context_core : input mp-core.mp ; fi ;
-\stopMPextensions
-
%D Some of these macros are pretty clever but too complicated
%D to be nice. When things are kind of stable I'll clean up
%D this mess.
diff --git a/tex/context/base/chem-str.lua b/tex/context/base/chem-str.lua
index 7a63c2efb..02bfcf737 100644
--- a/tex/context/base/chem-str.lua
+++ b/tex/context/base/chem-str.lua
@@ -393,6 +393,9 @@ function chemicals.start(settings)
local textsize, rulethickness, rulecolor = settings.size, settings.rulethickness, settings.rulecolor
local width, height, scale, offset = settings.width or 0, settings.height or 0, settings.scale or "medium", settings.offset or 0
local l, r, t, b = settings.left or 0, settings.right or 0, settings.top or 0, settings.bottom or 0
+ --
+ metacode = { "if unknown context_chem : input mp-chem.mpiv ; fi ;" } -- no format anyway
+ --
if scale == variables.small then
scale = 500
elseif scale == variables.medium or scale == 0 then
@@ -440,16 +443,19 @@ function chemicals.start(settings)
height = false
end
scale = 0.75 * scale/625
- metacode = { format("chem_start_structure(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) ;",
+ --
+ metacode[#metacode+1] = format("chem_start_structure(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) ;",
chemicals.structures,
l/25, r/25, t/25, b/25, scale,
tostring(settings.axis == variables.on), tostring(width), tostring(height), tostring(offset)
- ) }
+ )
+ --
variant, keys, bonds, stack, rot, pstack = "six", { }, 6, { }, 1, { }
end
function chemicals.stop()
metacode[#metacode+1] = "chem_stop_structure ;"
+ --
local mpcode = concat(metacode,"\n")
if trace_structure then
report_chemistry("metapost code:\n%s", mpcode)
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 7d7f950fa..4bb76ba8c 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{2011.10.12 19:30}
+\newcontextversion{2011.10.13 21:36}
%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 ae1b3d2bd..c127f3f75 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{2011.10.12 19:30}
+\newcontextversion{2011.10.13 21:36}
%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 9c7f6c784..dcb141009 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 d9054129f..477e5451d 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 e5991b974..7baf41486 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{2011.10.12 19:30}
+\edef\contextversion{2011.10.13 21:36}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index a451b056b..49e2088f4 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.10.12 19:30}
+\edef\contextversion{2011.10.13 21:36}
%D For those who want to use this:
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua
index 9a92cadec..0e92c8260 100644
--- a/tex/context/base/font-ctx.lua
+++ b/tex/context/base/font-ctx.lua
@@ -155,7 +155,7 @@ setmetatableindex(xheightdata, function(t,k)
return quad
end)
-setmetatableindex(italicsdata, function(t,k)
+setmetatableindex(italicsdata, function(t,k) -- is test !
local properties = fontdata[k].properties
local italics = properties and properties.italic_correction
if italics then
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua
index 85352d8fc..1cd74f4fc 100644
--- a/tex/context/base/mlib-pps.lua
+++ b/tex/context/base/mlib-pps.lua
@@ -461,9 +461,9 @@ local function sxsy(wd,ht,dp) -- helper for text
return (wd ~= 0 and factor/wd) or 0, (hd ~= 0 and factor/hd) or 0
end
-local no_trial_run = "_trial_run_ := false ;"
-local do_trial_run = "if unknown _trial_run_ : boolean _trial_run_ fi ; _trial_run_ := true ;"
-local text_data_template = "_tt_w_[%i] := %f ; _tt_h_[%i] := %f ; _tt_d_[%i] := %f ;"
+local no_trial_run = "mfun_trial_run := false ;"
+local do_trial_run = "if unknown mfun_trial_run : boolean mfun_trial_run fi ; mfun_trial_run := true ;"
+local text_data_template = "mfun_tt_w[%i] := %f ; mfun_tt_h[%i] := %f ; mfun_tt_d[%i] := %f ;"
local do_begin_fig = "; beginfig(1) ; "
local do_end_fig = "; endfig ;"
local do_safeguard = ";"
diff --git a/tex/context/base/mult-mps.lua b/tex/context/base/mult-mps.lua
index 860ae29f1..5a78bce8c 100644
--- a/tex/context/base/mult-mps.lua
+++ b/tex/context/base/mult-mps.lua
@@ -2,6 +2,9 @@ return {
tex = {
"btex", "etex", "verbatimtex",
},
+ shortcuts = {
+ "..", "...", "--", "---", "&",
+ },
primitives = { -- to be checked
"charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing",
"prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset",
@@ -10,12 +13,12 @@ return {
"tracingspecs", "tracingstats", "tracingtitles", "truecorners",
"warningcheck", "year",
"false", "nullpicture", "pencircle", "true",
- "and", "angle", "arclength", "arctime", "ASCII", "bluepart", "boolean", "bot",
+ "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot",
"char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize",
- "greenpart", "hex", "infont", "intersectiontimes", "known", "length", "llcorner",
+ "hex", "infont", "intersectiontimes", "known", "length", "llcorner",
"lrcorner", "makepath", "makepen", "mexp", "mlog", "normaldeviate", "not",
"numeric", "oct", "odd", "or", "path", "pair", "pen", "penoffset", "picture", "point",
- "postcontrol", "precontrol", "redpart", "reverse", "rotated", "scaled",
+ "postcontrol", "precontrol", "reverse", "rotated", "scaled",
"shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring",
"transform", "transformed", "ulcorner", "uniformdeviate", "unknown",
"urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart",
@@ -23,12 +26,11 @@ return {
"addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds",
"shipout", "show", "showdependencies", "showtoken", "showvariable",
"special",
- "rgbcolor", "cmykcolor", "graycolor",
"begingroup", "endgroup", "of", "curl", "tension", "and", "controls",
"reflectedabout", "rotatedaround", "interpath", "on", "off", "beginfig",
"endfig", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary",
- "tertiary", "primarydef", "secondarydef", "tertiarydef", "top", "bottom",
- "ulft", "urt", "llft", "lrt", "randomseed", "also", "contour", "doublepath",
+ "tertiary", "primarydef", "secondarydef", "tertiarydef",
+ "randomseed", "also", "contour", "doublepath",
"withcolor", "withpen", "dashed", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif",
"forsuffixes", "downto", "upto", "step", "until",
"charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable",
@@ -43,21 +45,30 @@ return {
"chardy", "hppp", "tracingedges", "vppp",
"extra_beginfig", "extra_endfig", "mpxbreak",
"endinput",
+ "message", "delimiters", "turningnumber", "errmessage",
+ "readstring", "scantokens", "end", "outer", "inner", "write", "to", "readfrom",
+ "withprescript", "withpostscript",
+ "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt",
+ --
+ "redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "greypart",
+ "rgbcolor", "cmykcolor", "greycolor", "graycolor",
+ "colormodel", "graypart",
},
- plain = {
- "ahangle", "ahlength", "bboxmargin", "defaultpen", "defaultscale",
- "labeloffset", "background", "currentpen", "currentpicture", "cuttings",
+ commands = {
+ "arrowhead",
+ "currentpen", "currentpicture", "cuttings",
"defaultfont", "extra_beginfig", "extra_endfig",
- "beveled", "black", "blue", "bp", "butt", "cc", "cm", "dd", "ditto", "down", "epsilon",
- "evenly", "fullcircle", "green", "halfcircle", "identity", "in", "infinity", "left",
- "mitered", "mm", "origin", "pensquare", "pt", "quartercircle", "red", "right",
- "rounded", "squared", "unitsquare", "up", "white", "withdots",
+ "ditto", "EOF", "down",
+ "evenly", "fullcircle", "halfcircle", "identity", "in", "left",
+ "origin", "pensquare", "quartercircle", "right",
+ "unitsquare", "up", "withdots",
"abs", "bbox", "ceiling", "center", "cutafter", "cutbefore", "dir",
- "directionpoint", "div", "dotprod", "intersectionpoint", "inverse", "mod", "lft",
- "round", "rt", "unitvector", "whatever",
+ "directionpoint", "div", "dotprod", "intersectionpoint", "inverse", "mod",
+ "round", "unitvector", "whatever",
"cutdraw", "draw", "drawarrow", "drawdblarrow", "fill", "filldraw", "drawdot",
- "loggingall", "pickup", "tracingall", "tracingnone", "undraw", "unfill",
- "unfilldraw",
+ "loggingall", "interact", "tracingall", "tracingnone",
+ "pickup",
+ "undraw", "unfill", "unfilldraw",
"buildcycle", "dashpattern", "decr", "dotlabel", "dotlabels", "drawoptions",
"incr", "label", "labels", "max", "min", "thelabel", "z",
"beginchar", "blacker", "capsule_end", "change_width",
@@ -67,7 +78,33 @@ return {
"define_whole_blacker_pixels", "define_whole_pixels",
"define_whole_vertical_blacker_pixels",
"define_whole_vertical_pixels", "endchar", "extra_beginchar",
- "extra_endchar", "extra_setup", "font_coding_scheme", "clearxy",
+ "extra_endchar", "extra_setup", "font_coding_scheme",
+ "clearxy", "clearit", "clearpen", "shipit",
"font_extra_space",
+ "exitunless",
+ "relax", "hide", "gobble", "gobbled", "stop",
+ "blankpicture",
+ "counterclockwise", "tensepath", "takepower", "direction",
+ "softjoin", -- "magstep",
+ "makelabel", -- "laboff",
+ "rotatedabout", "flex", "superellipse", "erase", "image",
+ "nullpen", "savepen", "clearpen", "penpos", "penlabels", -- "clear_pen_memory",
+ "range", "numtok", "thru",
+ "z", "laboff",
+ "bye",
+ --
+ "red", "green", "blue", "cyan", "magenta", "yellow", "black", "white", "background",
+ "graypart", "graycolor",
+ --
+ "mm", "pt", "dd", "bp", "cm", "pc", "cc", "in",
+ },
+ internals = { -- we need to remove duplicates above
+ --
+ "mitered", "rounded", "beveled", "butt", "squared",
+ "eps", "epsilon", "infinity",
+ "bboxmargin", "ahlength", "ahangle", "labeloffset", "dotlabeldiam", "defaultpen", "defaultscale", "join_radius",
+ --
+ "pen_lft", "pen_rt", "pen_top", "pen_bot", -- "pen_count_",
+ --
},
}
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index a4c56c6f8..1ac026c70 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 165a1e4aa..6ebf9b11b 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/typo-itc.lua b/tex/context/base/typo-itc.lua
index 9cf4de8cd..322085346 100644
--- a/tex/context/base/typo-itc.lua
+++ b/tex/context/base/typo-itc.lua
@@ -96,14 +96,19 @@ local function process(namespace,attribute,head)
local attr = forcedvariant or has_attribute(current,attribute)
if attr and attr > 0 then
local cd = data[char]
- italic = cd.italic or cd.italic_correction
- if not italic then
+ if not cd then
+ -- this really can happen
italic = 0
- elseif italic ~= 0 then
- lastfont = font
- lastattr = attr
- previous = current
- prevchar = char
+ else
+ italic = cd.italic or cd.italic_correction
+ if not italic then
+ italic = 0
+ elseif italic ~= 0 then
+ lastfont = font
+ lastattr = attr
+ previous = current
+ prevchar = char
+ end
end
else
italic = 0