summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--context/data/scite/lexers/data/scite-context-data-metapost.lua2
-rw-r--r--context/data/scite/scite-context-data-metapost.properties8
-rw-r--r--context/data/scite/scite-ctx.lua388
-rw-r--r--context/data/scite/scite-ctx.properties14
-rw-r--r--metapost/context/base/mp-grap.mpiv18
-rw-r--r--metapost/context/base/mp-mlib.mpiv121
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4108 -> 4110 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-afm.lua2
-rw-r--r--tex/context/base/font-con.lua22
-rw-r--r--tex/context/base/font-ctx.lua73
-rw-r--r--tex/context/base/font-ini.mkvi11
-rw-r--r--tex/context/base/font-otf.lua2
-rw-r--r--tex/context/base/m-hemistich.mkiv2
-rw-r--r--tex/context/base/mlib-pps.lua7
-rw-r--r--tex/context/base/mult-mps.lua1
-rw-r--r--tex/context/base/spac-ver.mkiv2
-rw-r--r--tex/context/base/status-files.pdfbin24755 -> 24725 bytes
-rw-r--r--tex/context/base/status-lua.log2
-rw-r--r--tex/context/base/typo-drp.lua63
-rw-r--r--tex/context/base/typo-drp.mkiv26
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua18
23 files changed, 660 insertions, 126 deletions
diff --git a/context/data/scite/lexers/data/scite-context-data-metapost.lua b/context/data/scite/lexers/data/scite-context-data-metapost.lua
index 55003c237..3369f9021 100644
--- a/context/data/scite/lexers/data/scite-context-data-metapost.lua
+++ b/context/data/scite/lexers/data/scite-context-data-metapost.lua
@@ -1,7 +1,7 @@
return {
["commands"]={ "beginfig", "endfig", "rotatedaround", "reflectedabout", "arrowhead", "currentpen", "currentpicture", "cuttings", "defaultfont", "extra_beginfig", "extra_endfig", "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", "round", "unitvector", "whatever", "cutdraw", "draw", "drawarrow", "drawdblarrow", "fill", "filldraw", "drawdot", "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", "define_blacker_pixels", "define_corrected_pixels", "define_good_x_pixels", "define_good_y_pixels", "define_horizontal_corrected_pixels", "define_pixels", "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", "clearit", "clearpen", "shipit", "font_extra_space", "exitunless", "relax", "hide", "gobble", "gobbled", "stop", "blankpicture", "counterclockwise", "tensepath", "takepower", "direction", "softjoin", "makelabel", "rotatedabout", "flex", "superellipse", "erase", "image", "nullpen", "savepen", "clearpen", "penpos", "penlabels", "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"]={ "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" },
- ["primitives"]={ "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", "tracingspecs", "tracingstats", "tracingtitles", "truecorners", "warningcheck", "year", "false", "nullpicture", "pencircle", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "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", "reverse", "rotated", "scaled", "shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring", "transform", "transformed", "ulcorner", "uniformdeviate", "unknown", "urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart", "yypart", "zscaled", "addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds", "shipout", "show", "showdependencies", "showtoken", "showvariable", "special", "begingroup", "endgroup", "of", "curl", "tension", "and", "controls", "interpath", "on", "off", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", "withcolor", "withpen", "dashed", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", "forsuffixes", "downto", "upto", "step", "until", "charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable", "boundarychar", "chardp", "charext", "charht", "charic", "charwd", "designsize", "fontmaking", "charexists", "cullit", "currenttransform", "gfcorners", "grayfont", "hround", "imagerules", "lowres_fix", "nodisplays", "notransforms", "openit", "displaying", "currentwindow", "screen_rows", "screen_cols", "pixels_per_inch", "cull", "display", "openwindow", "numspecial", "totalweight", "autorounding", "fillin", "proofing", "tracingpens", "xoffset", "chardx", "granularity", "smoothing", "turningcheck", "yoffset", "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", "dashpart", "penpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter" },
+ ["primitives"]={ "charcode", "day", "linecap", "linejoin", "miterlimit", "month", "pausing", "prologues", "showstopping", "time", "tracingcapsules", "tracingchoices", "mpprocset", "tracingcommands", "tracingequations", "tracinglostchars", "tracingmacros", "tracingonline", "tracingoutput", "tracingrestores", "tracingspecs", "tracingstats", "tracingtitles", "truecorners", "warningcheck", "year", "false", "nullpicture", "pencircle", "true", "and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot", "char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize", "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", "reverse", "rotated", "scaled", "shifted", "sind", "slanted", "sqrt", "str", "string", "subpath", "substring", "transform", "transformed", "ulcorner", "uniformdeviate", "unknown", "urcorner", "xpart", "xscaled", "xxpart", "xypart", "ypart", "yscaled", "yxpart", "yypart", "zscaled", "addto", "clip", "input", "interim", "let", "newinternal", "save", "setbounds", "shipout", "show", "showdependencies", "showtoken", "showvariable", "special", "begingroup", "endgroup", "of", "curl", "tension", "and", "controls", "interpath", "on", "off", "def", "vardef", "enddef", "expr", "suffix", "text", "primary", "secondary", "tertiary", "primarydef", "secondarydef", "tertiarydef", "randomseed", "also", "contour", "doublepath", "withcolor", "withpen", "dashed", "if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within", "forsuffixes", "downto", "upto", "step", "until", "charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable", "boundarychar", "chardp", "charext", "charht", "charic", "charwd", "designsize", "fontmaking", "charexists", "cullit", "currenttransform", "gfcorners", "grayfont", "hround", "imagerules", "lowres_fix", "nodisplays", "notransforms", "openit", "displaying", "currentwindow", "screen_rows", "screen_cols", "pixels_per_inch", "cull", "display", "openwindow", "numspecial", "totalweight", "autorounding", "fillin", "proofing", "tracingpens", "xoffset", "chardx", "granularity", "smoothing", "turningcheck", "yoffset", "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", "prescriptpart", "postscriptpart", "rgbcolor", "cmykcolor", "greycolor", "graycolor", "colormodel", "graypart", "dashpart", "penpart", "stroked", "filled", "textual", "clipped", "bounded", "pathpart", "expandafter" },
["shortcuts"]={ "..", "...", "--", "---", "&" },
["tex"]={ "btex", "etex", "verbatimtex" },
} \ No newline at end of file
diff --git a/context/data/scite/scite-context-data-metapost.properties b/context/data/scite/scite-context-data-metapost.properties
index ad0de9dec..9e612bf19 100644
--- a/context/data/scite/scite-context-data-metapost.properties
+++ b/context/data/scite/scite-context-data-metapost.properties
@@ -84,10 +84,10 @@ 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 dashpart penpart \
-stroked filled textual clipped bounded \
-pathpart expandafter
+blackpart greypart prescriptpart postscriptpart rgbcolor \
+cmykcolor greycolor graycolor colormodel graypart \
+dashpart penpart stroked filled textual \
+clipped bounded pathpart expandafter
keywordclass.metapost.shortcuts=\
.. ... -- --- \
diff --git a/context/data/scite/scite-ctx.lua b/context/data/scite/scite-ctx.lua
index 546cac411..6bfe2cdd8 100644
--- a/context/data/scite/scite-ctx.lua
+++ b/context/data/scite/scite-ctx.lua
@@ -879,3 +879,391 @@ if not lpeg then
end
end
+
+local lists = { -- taken from sort-lan.lua
+ en = {
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
+ "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
+ "u", "v", "w", "x", "y", "z",
+
+ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
+ "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
+ "U", "V", "W", "X", "Y", "Z",
+ },
+ nl = {
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
+ "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
+ "u", "v", "w", "x", "y", "z",
+
+ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
+ "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
+ "U", "V", "W", "X", "Y", "Z",
+ },
+ fr = {
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
+ "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
+ "u", "v", "w", "x", "y", "z",
+
+ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
+ "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
+ "U", "V", "W", "X", "Y", "Z",
+ },
+ de = {
+ "a", "ä", "b", "c", "d", "e", "f", "g", "h", "i",
+ "j", "k", "l", "m", "n", "o", "ö", "p", "q", "r",
+ "s", "ß", "t", "u", "ü", "v", "w", "x", "y", "z",
+
+ "A", "Ä", "B", "C", "D", "E", "F", "G", "H", "I",
+ "J", "K", "L", "M", "N", "O", "Ö", "P", "Q", "R",
+ "S", "SS", "T", "U", "Ü", "V", "W", "X", "Y", "Z",
+ },
+ fi = { -- finish
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
+ "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
+ "u", "v", "w", "x", "y", "z", "å", "ä", "ö",
+
+ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
+ "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
+ "U", "V", "W", "X", "Y", "Z", "Å", "Ä", "Ö",
+ },
+ sl = { -- slovenian
+ "a", "b", "c", "č", "ć", "d", "đ", "e", "f", "g", "h", "i",
+ "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "š", "t",
+ "u", "v", "w", "x", "y", "z", "ž",
+
+ "A", "B", "C", "Č", "Ć", "D", "Đ", "E", "F", "G", "H", "I",
+ "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "Š", "T",
+ "U", "V", "W", "X", "Y", "Z", "Ž",
+ },
+ ru = { -- rusian
+ "а", "б", "в", "г", "д", "е", "ё", "ж", "з", "и",
+ "і", "й", "к", "л", "м", "н", "о", "п", "р", "с",
+ "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ы",
+ "ь", "ѣ", "э", "ю", "я", "ѳ", "ѵ",
+
+ "А", "Б", "В", "Г", "Д", "Е", "Ё", "Ж", "З", "И",
+ "І", "Й", "К", "Л", "М", "Н", "О", "П", "Р", "С",
+ "Т", "У", "Ф", "Х", "Ц", "Ч", "Ш", "Щ", "Ъ", "Ы",
+ "Ь", "Ѣ", "Э", "Ю", "Я", "Ѳ", "Ѵ",
+ },
+ uk = { -- ukraninuan
+ "а", "б", "в", "г", "ґ", "д", "е", "є", "ж", "з", "и", "і",
+ "ї", "й", "к", "л", "м", "н", "о", "п", "р", "с", "т", "у",
+ "ф", "х", "ц", "ч", "ш", "щ", "ь", "ю", "я",
+
+ "А", "Б", "В", "Г", "Ґ", "Д", "Е", "Є", "Ж", "З", "И", "І",
+ "Ї", "Й", "К", "Л", "М", "Н", "О", "П", "Р", "С", "Т", "У",
+ "Ф", "Х", "Ц", "Ч", "Ш", "Щ", "Ь", "Ю", "Я",
+ },
+ be = { -- belarusia
+ "а", "б", "в", "г", "д", "е", "ё", "ж", "з", "і",
+ "й", "к", "л", "м", "н", "о", "п", "р", "с", "т",
+ "у", "ў", "ф", "х", "ц", "ч", "ш", "ы", "ь", "э",
+ "ю", "я",
+
+ "А", "Б", "В", "Г", "Д", "Е", "Ё", "Ж", "З", "І",
+ "Й", "К", "Л", "М", "Н", "О", "П", "Р", "С", "Т",
+ "У", "Ў", "Ф", "Х", "Ц", "Ч", "Ш", "Ы", "Ь", "Э",
+ "Ю", "Я",
+ },
+ bg = { -- bulgarian
+ "а", "б", "в", "г", "д", "е", "ж", "з","и", "й",
+ "к", "a", "л", "a", "м", "н", "о", "п", "р", "с",
+ "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ь",
+ "ю", "я",
+
+ "А", "Б", "В", "Г", "Д", "Е", "Ж", "З","И", "Й",
+ "К", "A", "Л", "A", "М", "Н", "О", "П", "Р", "С",
+ "Т", "У", "Ф", "Х", "Ц", "Ч", "Ш", "Щ", "Ъ", "Ь",
+ "Ю", "Я",
+ },
+ pl = { -- polish
+ "a", "ą", "b", "c", "ć", "d", "e", "ę", "f", "g",
+ "h", "i", "j", "k", "l", "ł", "m", "n", "ń", "o",
+ "ó", "p", "q", "r", "s", "ś", "t", "u", "v", "w",
+ "x", "y", "z", "ź", "ż",
+
+ "A", "Ą", "B", "C", "Ć", "D", "E", "Ę", "F", "G",
+ "H", "I", "J", "K", "L", "Ł", "M", "N", "Ń", "O",
+ "Ó", "P", "Q", "R", "S", "Ś", "T", "U", "V", "W",
+ "X", "Y", "Z", "Ź", "Ż",
+ },
+ cz = { -- czech
+ "a", "á", "b", "c", "č", "d", "ď", "e", "é", "ě",
+ "f", "g", "h", "i", "í", "j", "k", "l", "m",
+ "n", "ň", "o", "ó", "p", "q", "r", "ř", "s", "š",
+ "t", "ť", "u", "ú", "ů", "v", "w", "x", "y", "ý",
+ "z", "ž",
+
+ "A", "Á", "B", "C", "Č", "D", "Ď", "E", "É", "Ě",
+ "F", "G", "H", "I", "Í", "J", "K", "L", "M",
+ "N", "Ň", "O", "Ó", "P", "Q", "R", "Ř", "S", "Š",
+ "T", "Ť", "U", "Ú", "Ů", "V", "W", "X", "Y", "Ý",
+ "Z", "Ž",
+ },
+ sk = { -- slovak
+ "a", "á", "ä", "b", "c", "č", "d", "ď",
+ "e", "é", "f", "g", "h", ch, "i", "í", "j", "k",
+ "l", "ĺ", "ľ", "m", "n", "ň", "o", "ó", "ô", "p",
+ "q", "r", "ŕ", "s", "š", "t", "ť", "u", "ú", "v",
+ "w", "x", "y", "ý", "z", "ž",
+
+ "A", "Á", "Ä", "B", "C", "Č", "D", "Ď",
+ "E", "É", "F", "G", "H", "I", "Í", "J", "K",
+ "L", "Ĺ", "Ľ", "M", "N", "Ň", "O", "Ó", "Ô", "P",
+ "Q", "R", "Ŕ", "S", "Š", "T", "Ť", "U", "Ú", "V",
+ "W", "X", "Y", "Ý", "Z", "Ž",
+ },
+ hr = { -- croatian
+ "a", "b", "c", "č", "ć", "d", "đ", "e", "f",
+ "g", "h", "i", "j", "k", "l", "m", "n",
+ "o", "p", "r", "s", "š", "t", "u", "v", "z", "ž",
+
+ "A", "B", "C", "Č", "Ć", "D", "Đ", "E", "F",
+ "G", "H", "I", "J", "K", "L", "M", "N",
+ "O", "P", "R", "S", "Š", "T", "U", "V", "Z", "Ž",
+ },
+ sr = { -- serbian
+ "а", "б", "в", "г", "д", "ђ", "е", "ж", "з", "и",
+ "ј", "к", "л", "љ", "м", "н", "њ", "о", "п", "р",
+ "с", "т", "ћ", "у", "ф", "х", "ц", "ч", "џ", "ш",
+
+ "А", "Б", "В", "Г", "Д", "Ђ", "Е", "Ж", "З", "И",
+ "Ј", "К", "Л", "Љ", "М", "Н", "Њ", "О", "П", "Р",
+ "С", "Т", "Ћ", "У", "Ф", "Х", "Ц", "Ч", "Џ", "Ш",
+ },
+ no = { -- norwegian
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
+ "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
+ "u", "v", "w", "x", "y", "z", "æ", "ø", "å",
+
+ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
+ "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
+ "U", "V", "W", "X", "Y", "Z", "Æ", "Ø", "Å",
+ },
+ da = { --danish
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
+ "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
+ "u", "v", "w", "x", "y", "z", "æ", "ø", "å",
+
+ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
+ "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
+ "U", "V", "W", "X", "Y", "Z", "Æ", "Ø", "Å",
+ },
+ sv = { -- swedish
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
+ "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
+ "u", "v", "w", "x", "y", "z", "å", "ä", "ö",
+
+ "A", "B", "C", "D", "E", "F", "G", "H", "I", "J",
+ "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T",
+ "U", "V", "W", "X", "Y", "Z", "Å", "Ä", "Ö",
+ },
+ is = { -- islandic
+ "a", "á", "b", "d", "ð", "e", "é", "f", "g", "h",
+ "i", "í", "j", "k", "l", "m", "n", "o", "ó", "p",
+ "r", "s", "t", "u", "ú", "v", "x", "y", "ý", "þ",
+ "æ", "ö",
+
+ "A", "Á", "B", "D", "Ð", "E", "É", "F", "G", "H",
+ "I", "Í", "J", "K", "L", "M", "N", "O", "Ó", "P",
+ "R", "S", "T", "U", "Ú", "V", "X", "Y", "Ý", "Þ",
+ "Æ", "Ö",
+ },
+ -- gr = { -- greek
+ -- "α", "ά", "ὰ", "ᾶ", "ᾳ", "ἀ", "ἁ", "ἄ", "ἂ", "ἆ",
+ -- "ἁ", "ἅ", "ἃ", "ἇ", "ᾁ", "ᾴ", "ᾲ", "ᾷ", "ᾄ", "ᾂ",
+ -- "ᾅ", "ᾃ", "ᾆ", "ᾇ", "β", "γ", "δ", "ε", "έ", "ὲ",
+ -- "ἐ", "ἔ", "ἒ", "ἑ", "ἕ", "ἓ", "ζ", "η", "η", "ή",
+ -- "ὴ", "ῆ", "ῃ", "ἠ", "ἤ", "ἢ", "ἦ", "ᾐ", "ἡ", "ἥ",
+ -- "ἣ", "ἧ", "ᾑ", "ῄ", "ῂ", "ῇ", "ᾔ", "ᾒ", "ᾕ", "ᾓ",
+ -- "ᾖ", "ᾗ", "θ", "ι", "ί", "ὶ", "ῖ", "ἰ", "ἴ", "ἲ",
+ -- "ἶ", "ἱ", "ἵ", "ἳ", "ἷ", "ϊ", "ΐ", "ῒ", "ῗ", "κ",
+ -- "λ", "μ", "ν", "ξ", "ο", "ό", "ὸ", "ὀ", "ὄ", "ὂ",
+ -- "ὁ", "ὅ", "ὃ", "π", "ρ", "ῤ", "ῥ", "σ", "ς", "τ",
+ -- "υ", "ύ", "ὺ", "ῦ", "ὐ", "ὔ", "ὒ", "ὖ", "ὑ", "ὕ",
+ -- "ὓ", "ὗ", "ϋ", "ΰ", "ῢ", "ῧ", "φ", "χ", "ψ", "ω",
+ -- "ώ", "ὼ", "ῶ", "ῳ", "ὠ", "ὤ", "ὢ", "ὦ", "ᾠ", "ὡ",
+ -- "ὥ", "ὣ", "ὧ", "ᾡ", "ῴ", "ῲ", "ῷ", "ᾤ", "ᾢ", "ᾥ",
+ -- "ᾣ", "ᾦ", "ᾧ",
+ --
+ -- "Α", "Ά", "Ὰ", "Α͂", "Ἀ", "Ἁ", "Ἄ", "Ἂ", "Ἆ",
+ -- "Ἁ", "Ἅ", "Ἃ", "Ἇ",
+ -- "Β", "Γ", "Δ", "Ε", "Έ", "Ὲ",
+ -- "Ἐ", "Ἔ", "Ἒ", "Ἑ", "Ἕ", "Ἓ", "Ζ", "Η", "Η", "Ή",
+ -- "Ὴ", "Η͂", "Ἠ", "Ἤ", "Ἢ", "Ἦ", "Ἡ", "Ἥ",
+ -- "Ἣ", "Ἧ",
+ -- "Θ", "Ι", "Ί", "Ὶ", "Ι͂", "Ἰ", "Ἴ", "Ἲ",
+ -- "Ἶ", "Ἱ", "Ἵ", "Ἳ", "Ἷ", "Ϊ", "Ϊ́", "Ϊ̀", "Ϊ͂", "Κ",
+ -- "Λ", "Μ", "Ν", "Ξ", "Ο", "Ό", "Ὸ", "Ὀ", "Ὄ", "Ὂ",
+ -- "Ὁ", "Ὅ", "Ὃ", "Π", "Ρ", "Ρ̓", "Ῥ", "Σ", "Σ", "Τ",
+ -- "Υ", "Ύ", "Ὺ", "Υ͂", "Υ̓", "Υ̓́", "Υ̓̀", "Υ̓͂", "Ὑ", "Ὕ",
+ -- "Ὓ", "Ὗ", "Ϋ", "Ϋ́", "Ϋ̀", "Ϋ͂", "Φ", "Χ", "Ψ", "Ω",
+ -- "Ώ", "Ὼ", "Ω͂", "Ὠ", "Ὤ", "Ὢ", "Ὦ", "Ὡ",
+ -- "Ὥ", "Ὣ", "Ὧ",
+ -- },
+ gr = { -- greek
+ "α", "β", "γ", "δ", "ε", "ζ", "η", "θ", "ι", "κ",
+ "λ", "μ", "ν", "ξ", "ο", "π", "ρ", "ς", "τ", "υ",
+ "φ", "χ", "ψ", "ω",
+
+ "Α", "Β", "Γ", "Δ", "Ε", "Ζ", "Η", "Θ", "Ι", "Κ",
+ "Λ", "Μ", "Ν", "Ξ", "Ο", "Π", "Ρ", "Σ", "Τ", "Υ",
+ "Χ", "Ψ", "Ω",
+ },
+ la = { -- latin
+ "a", "ā", "ă", "b", "c", "d", "e", "ē", "ĕ", "f",
+ "g", "h", "i", "ī", "ĭ", "j", "k", "l", "m", "n",
+ "o", "ō", "ŏ", "p", "q", "r", "s", "t", "u", "ū",
+ "ŭ", "v", "w", "x", "y", "ȳ", "y̆", "z", "æ",
+
+ "A", "Ā", "Ă", "B", "C", "D", "E", "Ē", "Ĕ", "F",
+ "G", "H", "I", "Ī", "Ĭ", "J", "K", "L", "M", "N",
+ "O", "Ō", "Ŏ", "P", "Q", "R", "S", "T", "U", "Ū",
+ "Ŭ", "V", "W", "X", "Y", "Ȳ", "Y̆", "Z", "Æ",
+ },
+ it = { -- italian
+ "a", "á", "b", "c", "d", "e", "é", "è", "f", "g",
+ "h", "i", "í", "ì", "j", "k", "l", "m", "n", "o",
+ "ó", "ò", "p", "q", "r", "s", "t", "u", "ú", "ù",
+ "v", "w", "x", "y", "z",
+
+ "A", "Á", "B", "C", "D", "E", "É", "È", "F", "G",
+ "H", "I", "Í", "Ì", "J", "K", "L", "M", "N", "O",
+ "Ó", "Ò", "P", "Q", "R", "S", "T", "U", "Ú", "Ù",
+ "V", "W", "X", "Y", "Z",
+ },
+ ro = { -- romanian
+ "a", "ă", "â", "b", "c", "d", "e", "f", "g", "h",
+ "i", "î", "j", "k", "l", "m", "n", "o", "p", "q",
+ "r", "s", "ș", "t", "ț", "u", "v", "w", "x", "y",
+ "z",
+
+ "A", "Ă", "Â", "B", "C", "D", "E", "F", "G", "H",
+ "I", "Î", "J", "K", "L", "M", "N", "O", "P", "Q",
+ "R", "S", "Ș", "T", "Ț", "U", "V", "W", "X", "Y",
+ "Z",
+ },
+ es = { -- spanish
+ "a", "á", "b", "c", "d", "e", "é", "f", "g", "h",
+ "i", "í", "j", "k", "l", "m", "n", "ñ", "o", "ó",
+ "p", "q", "r", "s", "t", "u", "ú", "ü", "v", "w",
+ "x", "y", "z",
+
+ "A", "Á", "B", "C", "D", "E", "É", "F", "G", "H",
+ "I", "Í", "J", "K", "L", "M", "N", "Ñ", "O", "Ó",
+ "P", "Q", "R", "S", "T", "U", "Ú", "Ü", "V", "W",
+ "X", "Y", "Z",
+ },
+ pt = { -- portuguese
+ "a", "á", "â", "ã", "à", "b", "c", "ç", "d", "e",
+ "é", "ê", "f", "g", "h", "i", "í", "j", "k", "l",
+ "m", "n", "o", "ó", "ô", "õ", "p", "q", "r", "s",
+ "t", "u", "ú", "ü", "v", "w", "x", "y", "z",
+
+ "A", "Á", "Â", "Ã", "À", "B", "C", "Ç", "D", "E",
+ "É", "Ê", "F", "G", "H", "I", "Í", "J", "K", "L",
+ "M", "N", "O", "Ó", "Ô", "Õ", "P", "Q", "R", "S",
+ "T", "U", "Ú", "Ü", "V", "W", "X", "Y", "Z",
+ },
+ lt = { -- lithuanian
+ "a", "ą", "b", "c", ch, "č", "d", "e", "ę", "ė",
+ "f", "g", "h", "i", "į", "y", "j", "k", "l", "m",
+ "n", "o", "p", "r", "s", "š", "t", "u", "ų", "ū",
+ "v", "z", "ž",
+
+ "A", "Ą", "B", "C", CH, "Č", "D", "E", "Ę", "Ė",
+ "F", "G", "H", "I", "Į", "Y", "J", "K", "L", "M",
+ "N", "O", "P", "R", "S", "Š", "T", "U", "Ų", "Ū",
+ "V", "Z", "Ž",
+ },
+ lv = { -- latvian
+ "a", "ā", "b", "c", "č", "d", "e", "ē", "f", "g",
+ "ģ", "h", "i", "ī", "j", "k", "ķ", "l", "ļ", "m",
+ "n", "ņ", "o", "ō", "p", "r", "ŗ", "s", "š", "t",
+ "u", "ū", "v", "z", "ž",
+
+ "A", "Ā", "B", "C", "Č", "D", "E", "Ē", "F", "G",
+ "Ģ", "H", "I", "Ī", "J", "K", "Ķ", "L", "Ļ", "M",
+ "N", "Ņ", "O", "Ō", "P", "R", "Ŗ", "S", "Š", "T",
+ "U", "Ū", "V", "Z", "Ž",
+ },
+ hu = { -- hungarian
+ "a", "á", "b", "c", "d", "e", "é",
+ "f", "g", "h", "i", "í", "j", "k", "l",
+ "m", "n", "o", "ó", "ö", "ő", "p", "q", "r",
+ "s", "t", "u", "ú", "ü", "ű", "v", "w",
+ "x", "y", "z",
+
+ "A", "Á", "B", "C", "D", "E", "É",
+ "F", "G", "H", "I", "Í", "J", "K", "L",
+ "M", "N", "O", "Ó", "Ö", "Ő", "P", "Q", "R",
+ "S", "T", "U", "Ú", "Ü", "Ű", "V", "W",
+ "X", "Y", "Z",
+ },
+ et = { -- estonian
+ "a", "b", "d", "e", "f", "g", "h", "i", "j", "k",
+ "l", "m", "n", "o", "p", "r", "s", "š", "z", "ž",
+ "t", "u", "v", "w", "õ", "ä", "ö", "ü", "x", "y",
+
+ "A", "B", "D", "E", "F", "G", "H", "I", "J", "K",
+ "L", "M", "N", "O", "P", "R", "S", "Š", "Z", "Ž",
+ "T", "U", "V", "W", "Õ", "Ä", "Ö", "Ü", "X", "Y",
+ },
+ -- jp = { -- japanese
+ -- "あ", "い", "う", "え", "お", "か", "き", "く", "け", "こ",
+ -- "さ", "し", "す", "せ", "そ", "た", "ち", "つ", "て", "と",
+ -- "な", "に", "ぬ", "ね", "の", "は", "ひ", "ふ", "へ", "ほ",
+ -- "ま", "み", "む", "め", "も", "や", "ゆ", "よ",
+ -- "ら", "り", "る", "れ", "ろ", "わ", "ゐ", "ゑ", "を", "ん",
+ -- },
+}
+
+local enabled = false
+local language = "en"
+local selector = { }
+
+for k, v in next, lists do
+ selector[#selector+1] = k
+end
+
+table.sort(selector)
+
+local function make_strip()
+ local alphabet = lists[language] or lists.en
+ local selector = "(hide)(" .. table.concat(selector,")(") .. ")"
+ local alphabet = "(" .. language .. ":)(" .. table.concat(alphabet,")(") .. ")"
+ scite.StripShow(selector .. "\n" .. alphabet)
+ enabled = true
+end
+
+local function hide_strip()
+ scite.StripShow("")
+ enabled = false
+end
+
+local function process_strip(control)
+ local value = scite.StripValue(control)
+ if value == "hide" then
+ hide_strip()
+ elseif lists[value] then
+ language = value
+ make_strip()
+ elseif value == language .. ":" then
+ -- ignore
+ else
+ local char = value
+ trace("inserted character: " .. char .. "\n")
+ editor:insert(editor.CurrentPos,char)
+ end
+end
+
+function toggle_strip()
+ if enabled then
+ hide_strip()
+ OnStrip = function() end
+ else
+ make_strip()
+ OnStrip = process_strip
+ end
+end
diff --git a/context/data/scite/scite-ctx.properties b/context/data/scite/scite-ctx.properties
index e7223d762..4bef0e21d 100644
--- a/context/data/scite/scite-ctx.properties
+++ b/context/data/scite/scite-ctx.properties
@@ -27,7 +27,8 @@ ctx.menulist.default=\
sort=sort_text|\
add=add_text|\
check=check_text|\
- reset=reset_text
+ reset=reset_text|\
+ strip=toggle_strip
ctx.menulist.context=\
wrap=wrap_text|\
@@ -38,7 +39,8 @@ ctx.menulist.context=\
compound=compound_text|\
add=add_text|\
check=check_text|\
- reset=reset_text
+ reset=reset_text|\
+ strip=toggle_strip
ctx.menulist.example=\
wrap=wrap_text|\
@@ -50,7 +52,8 @@ ctx.menulist.example=\
compound=compound_text|\
add=add_text|\
check=check_text|\
- reset=reset_text
+ reset=reset_text|\
+ strip=toggle_strip
ctx.wraptext.length=80
@@ -155,3 +158,8 @@ command.subsystem.27.*=3
command.27.*=uncomment_xml
command.save.before.27.*=2
command.groupundo.27.*=yes
+
+command.name.28.*=Character Strip
+command.subsystem.28.*=3
+command.28.*=toggle_strip
+command.shortcut.28.*=Ctrl++
diff --git a/metapost/context/base/mp-grap.mpiv b/metapost/context/base/mp-grap.mpiv
index 00a4d12cb..a7115fc7a 100644
--- a/metapost/context/base/mp-grap.mpiv
+++ b/metapost/context/base/mp-grap.mpiv
@@ -11,6 +11,8 @@
%C therefore copyrighted by \PRAGMA. See licen-en.pdf for
%C details.
+% laboff -> mfun_laboff or use plain_label instead
+
if known context_grap : endinput ; fi ;
boolean context_grap ; context_grap := true ;
@@ -354,7 +356,7 @@ vardef graph_set_bounds@#(expr l, h) =
graph_clear_bounds@# ;
if @#graph_coordinate_type>0 :
@#low = if unknown l :
- whatever
+ whatever
else :
if abs @#graph_coordinate_type=log : graph_mlog fi if string l : scantokens fi l
fi ;
@@ -364,7 +366,7 @@ vardef graph_set_bounds@#(expr l, h) =
if abs @#graph_coordinate_type=log : graph_mlog fi if string h : scantokens fi h
fi ;
else :
- -@#high = if unknown l :
+ -@#high = if unknown l :
whatever
else :
if abs @#graph_coordinate_type=log : graph_mlog fi if string l : scantokens fi l
@@ -644,7 +646,7 @@ enddef ;
% Stash the result drawing command c in the graph_label table using with list w and
% an index based on angle laboff$.
vardef graph_stash_label(suffix $)(text c) text w =
- graph_label[1.5+angle laboff$ /90] = image(c(origin) w) ;
+ graph_label[1.5+angle mfun_laboff$ /90] = image(c(origin) w) ;
enddef ;
@@ -701,7 +703,7 @@ enddef ;
% Generate label positioning arguments appropriate for label suffix $ and
% coordinate u.
def graph_generate_label_position(suffix $)(expr u) =
- if xpart laboff.$=0 : u,whatever else : whatever,u fi
+ if xpart mfun_laboff.$=0 : u,whatever else : whatever,u fi
enddef ;
@@ -715,9 +717,9 @@ vardef graph_gridline_picture@#(suffix $)(expr c, f, u)(text w) =
save p ; path p;
interim warningcheck :=0 ;
graph_autogrid_needed :=false ;
- p = Gtemplate$ zscaled -laboff@#
+ p = Gtemplate$ zscaled -mfun_laboff@#
if c : Gxyscale fi
- shifted (((.5 + laboff@# dotprod (.5,.5)) * laboff@#) Gxyscale) ;
+ shifted (((.5 + mfun_laboff@# dotprod (.5,.5)) * mfun_laboff@#) Gxyscale) ;
image(draw p w ;
label@#(if string f : format(f,u) else : f fi, point 0 of p))
fi
@@ -730,7 +732,7 @@ vardef frame@# text w =
graph_frame_needed :=false ;
picture p_ ;
p_ = image(draw
- if str@#<>"" : subpath round(angle laboff@#*graph_frame_pair_a+graph_frame_pair_b) of fi
+ if str@#<>"" : subpath round(angle mfun_laboff@#*graph_frame_pair_a+graph_frame_pair_b) of fi
unitsquare Gxyscale w) ;
graph_draw_label((whatever,whatever),,draw p_ shifted) ;
enddef ;
@@ -906,7 +908,7 @@ def auto suffix $ =
if graph_select_exponent_mark.graph_exponent :
graph_generate_exponents(graph_exponent,
graph_comma graph_factor_and_exponent_to_string(1,e))
- else :
+ else :
graph_scan_mark(graph_select_mark, graph_modified_lower, graph_modified_higher,
graph_comma graph_factor_and_exponent_to_string(m,e))
fi
diff --git a/metapost/context/base/mp-mlib.mpiv b/metapost/context/base/mp-mlib.mpiv
index abf0eb974..214faec5b 100644
--- a/metapost/context/base/mp-mlib.mpiv
+++ b/metapost/context/base/mp-mlib.mpiv
@@ -99,6 +99,8 @@ newinternal textextoffset ; textextoffset := 0 ;
numeric mfun_tt_w[], mfun_tt_h[], mfun_tt_d[] ; % we can consider using colors (less hash space)
numeric mfun_tt_n ; mfun_tt_n := 0 ;
picture mfun_tt_p ; mfun_tt_p := nullpicture ;
+picture mfun_tt_o ; mfun_tt_o := nullpicture ;
+picture mfun_tt_c ; mfun_tt_c := nullpicture ;
if unknown mfun_trial_run :
boolean mfun_trial_run ;
@@ -117,6 +119,8 @@ fi ;
def mfun_reset_tex_texts =
mfun_tt_n := 0 ;
mfun_tt_p := nullpicture ;
+ mfun_tt_o := nullpicture ; % redundant
+ mfun_tt_c := nullpicture ; % redundant
enddef ;
def mfun_flush_tex_texts =
@@ -131,37 +135,100 @@ extra_beginfig := extra_beginfig & "mfun_reset_tex_texts ;" ;
% flush twice: once in location in order to pick up e.g. color properties,
% and once at the end because we need to flush missing ones.
-vardef rawtextext(expr str) =
+% vardef rawtextext(expr str) =
+% if str = "" :
+% nullpicture
+% elseif mfun_trial_run :
+% mfun_tt_n := mfun_tt_n + 1 ;
+% mfun_tt_o := image(draw origin) ; % save drawoptions
+% addto mfun_tt_p doublepath unitsquare
+% withprescript "tx_number=" & decimal mfun_tt_n
+% withprescript "tx_stage=extra"
+% withpostscript str ;
+% image (
+% addto currentpicture doublepath unitsquare
+% withprescript "tx_number=" & decimal mfun_tt_n
+% withprescript "tx_stage=trial"
+% withprescript "tx_color=" & colordecimals colorpart mfun_tt_o
+% withpostscript str
+% ; )
+% else :
+% mfun_tt_n := mfun_tt_n + 1 ;
+% if known mfun_tt_d[mfun_tt_n] :
+% image (
+% addto currentpicture doublepath unitsquare
+% xscaled mfun_tt_w[mfun_tt_n]
+% yscaled (mfun_tt_h[mfun_tt_n] + mfun_tt_d[mfun_tt_n])
+% withprescript "tx_number=" & decimal mfun_tt_n
+% withprescript "tx_stage=final"
+% % withpostscript str ; % for tracing
+% ; ) shifted (0,-mfun_tt_d[mfun_tt_n])
+% else :
+% image (
+% addto currentpicture doublepath unitsquare
+% ; )
+% fi
+% fi
+% enddef ;
+
+% vardef rawtextext(expr str) = % todo: avoid currentpicture
+% if str = "" :
+% nullpicture
+% else :
+% mfun_tt_n := mfun_tt_n + 1 ;
+% mfun_tt_c := nullpicture ;
+% if mfun_trial_run :
+% mfun_tt_o := nullpicture ;
+% addto mfun_tt_o doublepath origin _op_ ; % save drawoptions
+% addto mfun_tt_p doublepath unitsquare
+% withprescript "tx_number=" & decimal mfun_tt_n
+% withprescript "tx_stage=extra"
+% withpostscript str ;
+% addto mfun_tt_c doublepath unitsquare
+% withprescript "tx_number=" & decimal mfun_tt_n
+% withprescript "tx_stage=trial"
+% withprescript "tx_color=" & colordecimals colorpart mfun_tt_o
+% withpostscript str ;
+% elseif known mfun_tt_d[mfun_tt_n] :
+% addto mfun_tt_c doublepath unitsquare
+% xscaled mfun_tt_w[mfun_tt_n]
+% yscaled (mfun_tt_h[mfun_tt_n] + mfun_tt_d[mfun_tt_n])
+% shifted (0,-mfun_tt_d[mfun_tt_n])
+% withprescript "tx_number=" & decimal mfun_tt_n
+% withprescript "tx_stage=final" ;
+% else :
+% addto mfun_tt_c doublepath unitsquare ; % unitpicture
+% fi ;
+% mfun_tt_c
+% fi
+% enddef ;
+
+vardef rawtextext(expr str) = % todo: avoid currentpicture
if str = "" :
nullpicture
- elseif mfun_trial_run :
+ else :
mfun_tt_n := mfun_tt_n + 1 ;
- addto mfun_tt_p doublepath unitsquare
- withprescript "tx_number=" & decimal mfun_tt_n
- withprescript "tx_stage=extra"
- withpostscript str ;
- image (
- addto currentpicture doublepath unitsquare
+ mfun_tt_c := nullpicture ;
+ if mfun_trial_run :
+ mfun_tt_o := nullpicture ;
+ addto mfun_tt_o doublepath origin _op_ ; % save drawoptions
+ addto mfun_tt_c doublepath unitsquare
withprescript "tx_number=" & decimal mfun_tt_n
withprescript "tx_stage=trial"
- withpostscript str
- )
- else :
- mfun_tt_n := mfun_tt_n + 1 ;
- if known mfun_tt_d[mfun_tt_n] :
- image (
- addto currentpicture doublepath unitsquare
- xscaled mfun_tt_w[mfun_tt_n]
- yscaled (mfun_tt_h[mfun_tt_n] + mfun_tt_d[mfun_tt_n])
- withprescript "tx_number=" & decimal mfun_tt_n
- withprescript "tx_stage=final"
- ; % withpostscript str ;
- ) shifted (0,-mfun_tt_d[mfun_tt_n])
+ withprescript "tx_color=" & colordecimals colorpart mfun_tt_o
+ withpostscript str ;
+ addto mfun_tt_p also mfun_tt_c ;
+ elseif known mfun_tt_d[mfun_tt_n] :
+ addto mfun_tt_c doublepath unitsquare
+ xscaled mfun_tt_w[mfun_tt_n]
+ yscaled (mfun_tt_h[mfun_tt_n] + mfun_tt_d[mfun_tt_n])
+ shifted (0,-mfun_tt_d[mfun_tt_n])
+ withprescript "tx_number=" & decimal mfun_tt_n
+ withprescript "tx_stage=final" ;
else :
- image (
- addto currentpicture doublepath unitsquare ;
- )
- fi
+ addto mfun_tt_c doublepath unitsquare ; % unitpicture
+ fi ;
+ mfun_tt_c
fi
enddef ;
@@ -651,8 +718,8 @@ else :
elseif colormodel p = 7 :
withcolor (cyanpart p,magentapart p,yellowpart p,blackpart p)
fi
- withprescript prescript p
- withpostscript postscript p
+ withprescript prescriptpart p
+ withpostscript postscriptpart p
enddef ;
fi ;
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 69039bd41..2d8f76d93 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{2013.08.26 13:54}
+\newcontextversion{2013.08.28 23:08}
%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/context-version.pdf b/tex/context/base/context-version.pdf
index 142d68af1..465b5c002 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.mkiv b/tex/context/base/context.mkiv
index 333343e45..4a3fd8877 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.08.26 13:54}
+\edef\contextversion{2013.08.28 23:08}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/font-afm.lua b/tex/context/base/font-afm.lua
index ac27d652c..1c68dc706 100644
--- a/tex/context/base/font-afm.lua
+++ b/tex/context/base/font-afm.lua
@@ -637,7 +637,7 @@ local function copytotfm(data)
parameters.x_height = 400
parameters.quad = 1000
--
- if italicangle then
+ if italicangle and italicangle ~= 0 then
parameters.italicangle = italicangle
parameters.italicfactor = math.cos(math.rad(90+italicangle))
parameters.slant = - math.tan(italicangle*math.pi/180)
diff --git a/tex/context/base/font-con.lua b/tex/context/base/font-con.lua
index c5f891f27..4a84d441a 100644
--- a/tex/context/base/font-con.lua
+++ b/tex/context/base/font-con.lua
@@ -380,7 +380,7 @@ function constructors.scale(tfmdata,specification)
targetproperties.mode = properties.mode or "base" -- inherited
--
local askedscaledpoints = scaledpoints
- local scaledpoints, delta = constructors.calculatescale(tfmdata,scaledpoints) -- no shortcut, dan be redefined
+ local scaledpoints, delta = constructors.calculatescale(tfmdata,scaledpoints,nil,specification) -- no shortcut, dan be redefined
--
local hdelta = delta
local vdelta = delta
@@ -1000,21 +1000,11 @@ function constructors.hashinstance(specification,force)
size = math.round(constructors.scaled(size,designsizes[hash]))
specification.size = size
end
- -- local mathsize = specification.mathsize or 0
- -- if mathsize > 0 then
- -- local textsize = specification.textsize
- -- if fallbacks then
- -- return hash .. ' @ ' .. tostring(size) .. ' [ ' .. tostring(mathsize) .. ' : ' .. tostring(textsize) .. ' ] @ ' .. fallbacks
- -- else
- -- return hash .. ' @ ' .. tostring(size) .. ' [ ' .. tostring(mathsize) .. ' : ' .. tostring(textsize) .. ' ]'
- -- end
- -- else
- if fallbacks then
- return hash .. ' @ ' .. tostring(size) .. ' @ ' .. fallbacks
- else
- return hash .. ' @ ' .. tostring(size)
- end
- -- end
+ if fallbacks then
+ return hash .. ' @ ' .. tostring(size) .. ' @ ' .. fallbacks
+ else
+ return hash .. ' @ ' .. tostring(size)
+ end
end
function constructors.setname(tfmdata,specification) -- todo: get specification from tfmdata
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua
index 229915fb8..8b44d1c36 100644
--- a/tex/context/base/font-ctx.lua
+++ b/tex/context/base/font-ctx.lua
@@ -801,12 +801,16 @@ local value = C((leftparent * (1-rightparent)^0 * rightparent + (1-space)
local dimension = C((space/"" + P(1))^1)
local rest = C(P(1)^0)
local scale_none = Cc(0)
-local scale_at = P("at") * Cc(1) * spaces * dimension -- value
-local scale_sa = P("sa") * Cc(2) * spaces * dimension -- value
-local scale_mo = P("mo") * Cc(3) * spaces * dimension -- value
-local scale_scaled = P("scaled") * Cc(4) * spaces * dimension -- value
+local scale_at = P("at") * Cc(1) * spaces * dimension -- dimension
+local scale_sa = P("sa") * Cc(2) * spaces * dimension -- number
+local scale_mo = P("mo") * Cc(3) * spaces * dimension -- number
+local scale_scaled = P("scaled") * Cc(4) * spaces * dimension -- number
+local scale_ht = P("ht") * Cc(5) * spaces * dimension -- dimension
+local scale_cp = P("cp") * Cc(6) * spaces * dimension -- dimension
-local sizepattern = spaces * (scale_at + scale_sa + scale_mo + scale_scaled + scale_none)
+local specialscale = { [5] = "ht", [6] = "cp" }
+
+local sizepattern = spaces * (scale_at + scale_sa + scale_mo + scale_ht + scale_cp + scale_scaled + scale_none)
local splitpattern = spaces * value * spaces * rest
function helpers.splitfontpattern(str)
@@ -884,7 +888,7 @@ local function nice_cs(cs)
end
function commands.definefont_two(global,cs,str,size,inheritancemode,classfeatures,fontfeatures,classfallbacks,fontfallbacks,
- mathsize,textsize,relativeid,classgoodies,goodies,classdesignsize,fontdesignsize)
+ mathsize,textsize,relativeid,classgoodies,goodies,classdesignsize,fontdesignsize,scaledfontmode)
if trace_defining then
report_defining("start stage two: %s (size %s)",str,size)
end
@@ -914,6 +918,7 @@ function commands.definefont_two(global,cs,str,size,inheritancemode,classfeature
local id = tonumber(relativeid) or 0
specification.relativeid = id > 0 and id
end
+ --
specification.name = name
specification.size = size
specification.sub = (sub and sub ~= "" and sub) or specification.sub
@@ -922,6 +927,7 @@ function commands.definefont_two(global,cs,str,size,inheritancemode,classfeature
specification.goodies = goodies
specification.cs = cs
specification.global = global
+ specification.scalemode = scaledfontmode -- context specific
if detail and detail ~= "" then
specification.method = method or "*"
specification.detail = detail
@@ -991,7 +997,9 @@ function commands.definefont_two(global,cs,str,size,inheritancemode,classfeature
csnames[tfmdata] = specification.cs
texdefinefont(global,cs,tfmdata)
-- resolved (when designsize is used):
- setsomefontsize((fontdata[tfmdata].parameters.size or 0) .. "sp")
+ local size = fontdata[tfmdata].parameters.size or 0
+ setsomefontsize(size .. "sp")
+texsetcount("scaledfontsize",size)
lastfontid = tfmdata
else
-- setting the extra characters will move elsewhere
@@ -1016,7 +1024,9 @@ function commands.definefont_two(global,cs,str,size,inheritancemode,classfeature
name,id,nice_cs(cs),classfeatures,fontfeatures,classfallbacks,fontfallbacks)
end
-- resolved (when designsize is used):
- setsomefontsize((tfmdata.parameters.size or 655360) .. "sp")
+ local size = tfmdata.parameters.size or 655360
+ setsomefontsize(size .. "sp")
+texsetcount("scaledfontsize",size)
lastfontid = id
end
if trace_defining then
@@ -1149,9 +1159,25 @@ end)
local calculatescale = constructors.calculatescale
-function constructors.calculatescale(tfmdata,scaledpoints,relativeid)
- local scaledpoints, delta = calculatescale(tfmdata,scaledpoints)
- -- if enable_auto_r_scale and relativeid then -- for the moment this is rather context specific
+function constructors.calculatescale(tfmdata,scaledpoints,relativeid,specification)
+ if specification then
+ local scalemode = specification.scalemode
+ local special = scalemode and specialscale[scalemode]
+ if special then
+ -- we also have available specification.textsize
+ local parameters = tfmdata.parameters
+ local designsize = parameters.designsize
+ if special == "ht" then
+ local height = parameters.ascender * designsize / parameters.units
+ scaledpoints = (scaledpoints/height) * designsize
+ elseif special == "cp" then
+ local height = (tfmdata.descriptions[utf.byte("X")].height or parameters.ascender) * designsize / parameters.units
+ scaledpoints = (scaledpoints/height) * designsize
+ end
+ end
+ end
+ scaledpoints, delta = calculatescale(tfmdata,scaledpoints)
+ -- if enable_auto_r_scale and relativeid then -- for the moment this is rather context specific (we need to hash rscale then)
-- local relativedata = fontdata[relativeid]
-- local rfmdata = relativedata and relativedata.unscaled and relativedata.unscaled
-- local id_x_height = rfmdata and rfmdata.parameters and rfmdata.parameters.x_height
@@ -1165,6 +1191,31 @@ function constructors.calculatescale(tfmdata,scaledpoints,relativeid)
return scaledpoints, delta
end
+local designsizes = constructors.designsizes
+
+function constructors.hashinstance(specification,force)
+ local hash, size, fallbacks = specification.hash, specification.size, specification.fallbacks
+ if force or not hash then
+ hash = constructors.hashfeatures(specification)
+ specification.hash = hash
+ end
+ if size < 1000 and designsizes[hash] then
+ size = math.round(constructors.scaled(size,designsizes[hash]))
+ specification.size = size
+ end
+ if fallbacks then
+ return hash .. ' @ ' .. tostring(size) .. ' @ ' .. fallbacks
+ else
+ local scalemode = specification.scalemode
+ local special = scalemode and specialscale[scalemode]
+ if special then
+ return hash .. ' @ ' .. tostring(size) .. ' @ ' .. special
+ else
+ return hash .. ' @ ' .. tostring(size)
+ end
+ end
+end
+
-- We overload the (generic) resolver:
local resolvers = definers.resolvers
diff --git a/tex/context/base/font-ini.mkvi b/tex/context/base/font-ini.mkvi
index 768fea070..0d356895e 100644
--- a/tex/context/base/font-ini.mkvi
+++ b/tex/context/base/font-ini.mkvi
@@ -700,6 +700,7 @@
\let\somefontsize\zerocount
\newcount\scaledfontmode % also used at the lua end
+\newcount\scaledfontsize % also used at the lua end
\newcount\lastfontid % also used at the lua end / tex end
\newtoks \everydefinefont
@@ -755,6 +756,9 @@
\or
% scaled, don't use this one as it's unpredictable
\d_font_scaled_font_size-\somefontsize\scaledpoint
+ \else % ht cp
+ % experiment, yet undocumented
+ \d_font_scaled_font_size\somefontsize
\fi
\relax
\d_font_scaled_font_size\v_font_size_relative\d_font_scaled_font_size
@@ -770,7 +774,7 @@
\else
\d_font_scaled_text_face\textface
\fi
- \edef\somefontspec{at \number\d_font_scaled_font_size sp}%
+ \edef\somefontspec{at \number\d_font_scaled_font_size sp}% probably no longer used, needs checking
\edef\somefontfile{\truefontname\somefontname}%
\ifx\somefontfile\s!unknown
\edef\somefontfile{\defaultfontfile}%
@@ -797,9 +801,10 @@
"\m_font_class_goodies", % experiment (not yet used)
"\m_font_goodies",
"\m_font_class_designsize",
- "\m_font_designsize"
+ "\m_font_designsize",
+ \number\scaledfontmode
)}%
- \edef\somefontspec{at \number\d_font_scaled_font_size sp}% we need the resolved designsize (for fallbacks)
+ \edef\somefontspec{at \number\scaledfontsize sp}% we need the resolved designsize (for fallbacks)
\expandafter\let\expandafter\lastrawfontcall\csname#csname\endcsname
\the\everydefinefont
\c_font_feature_inheritance_mode\c_font_feature_inheritance_default}
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index 7e267b15b..c694211b9 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -2087,7 +2087,7 @@ local function copytotfm(data,cache_id)
if spaceunits < 2*units/5 then
-- todo: warning
end
- if italicangle then
+ if italicangle and italicangle ~= 0 then
parameters.italicangle = italicangle
parameters.italicfactor = math.cos(math.rad(90+italicangle))
parameters.slant = - math.tan(italicangle*math.pi/180)
diff --git a/tex/context/base/m-hemistich.mkiv b/tex/context/base/m-hemistich.mkiv
index 70c467c7b..55fde7b92 100644
--- a/tex/context/base/m-hemistich.mkiv
+++ b/tex/context/base/m-hemistich.mkiv
@@ -71,7 +71,7 @@
\setuphemistich
[leftcolor=darkred,
- middlecolor=darkgreen,
+ separatorcolor=darkgreen,
rightcolor=darkblue]
\setupwhitespace
diff --git a/tex/context/base/mlib-pps.lua b/tex/context/base/mlib-pps.lua
index 4a887150d..96d5c092f 100644
--- a/tex/context/base/mlib-pps.lua
+++ b/tex/context/base/mlib-pps.lua
@@ -809,6 +809,7 @@ local function tx_reset()
end
local fmt = formatters["%s %s %s % t"]
+local pat = lpeg.tsplitat(":")
local function tx_analyze(object,prescript) -- todo: hash content and reuse them
local tx_stage = prescript.tx_stage
@@ -817,6 +818,12 @@ local function tx_analyze(object,prescript) -- todo: hash content and reuse them
local tx_number = tonumber(prescript.tx_number)
local s = object.postscript or ""
local c = object.color -- only simple ones, no transparency
+ if #c == 0 then
+ local txc = prescript.tx_color
+ if txc then
+ c = lpegmatch(pat,txc)
+ end
+ end
local a = prescript.tr_alternative
local t = prescript.tr_transparency
local h = fmt(tx_number,a or "?",t or "?",c)
diff --git a/tex/context/base/mult-mps.lua b/tex/context/base/mult-mps.lua
index 48fe36b52..fa93f7ef8 100644
--- a/tex/context/base/mult-mps.lua
+++ b/tex/context/base/mult-mps.lua
@@ -51,6 +51,7 @@ return {
"top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt",
--
"redpart", "greenpart", "bluepart", "cyanpart", "magentapart", "yellowpart", "blackpart", "greypart",
+ "prescriptpart", "postscriptpart",
"rgbcolor", "cmykcolor", "greycolor", "graycolor",
"colormodel", "graypart",
"dashpart", "penpart",
diff --git a/tex/context/base/spac-ver.mkiv b/tex/context/base/spac-ver.mkiv
index 12d864e96..3b60c28bb 100644
--- a/tex/context/base/spac-ver.mkiv
+++ b/tex/context/base/spac-ver.mkiv
@@ -984,7 +984,7 @@
\setcharstrut\m_strut
\fi}
-\unexpanded\def\showstruts
+\unexpanded\def\showstruts % adapts .. is wrong
{\setteststrut
\settestcrlf}
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 84a07b1c0..a984f1c6b 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.log b/tex/context/base/status-lua.log
index 4abf13779..ae1d43e6c 100644
--- a/tex/context/base/status-lua.log
+++ b/tex/context/base/status-lua.log
@@ -1,6 +1,6 @@
(cont-yes.mkiv
-ConTeXt ver: 2013.08.26 13:54 MKIV beta fmt: 2013.8.26 int: english/english
+ConTeXt ver: 2013.08.28 23:08 MKIV beta fmt: 2013.8.28 int: english/english
system > 'cont-new.mkiv' loaded
(cont-new.mkiv)
diff --git a/tex/context/base/typo-drp.lua b/tex/context/base/typo-drp.lua
index b7815efc2..1f935802d 100644
--- a/tex/context/base/typo-drp.lua
+++ b/tex/context/base/typo-drp.lua
@@ -6,9 +6,8 @@ if not modules then modules = { } end modules ['typo-drp'] = {
license = "see context related readme files"
}
--- A playground for experiments. Currently we only have a dropped caps as special
--- but there might be more, so for the moment we keep this 'paragraphs' namespace
--- for this.
+-- This ons is sensitive for order (e.g. when combined with first line
+-- processing.
local tonumber, type, next = tonumber, type, next
local ceil = math.ceil
@@ -29,7 +28,9 @@ local hpack_nodes = nodes.hpack
local nodecodes = nodes.nodecodes
local whatsitcodes = nodes.whatsitcodes
-local new_kern = nodes.pool.kern
+local nodepool = nodes.pool
+local new_kern = nodepool.kern
+
local insert_before = nodes.insert_before
local insert_after = nodes.insert_after
@@ -109,6 +110,9 @@ actions[v_default] = function(head,setting)
if setting.font then
first.font = setting.font
end
+ if setting.dynamic > 0 then
+ first[0] = setting.dynamic
+ end
-- can be a helper
local ma = setting.ma or 0
local ca = setting.ca
@@ -121,33 +125,38 @@ actions[v_default] = function(head,setting)
first[a_transparency] = ta
end
--
- local width = first.width
- local height = first.height
- local depth = first.depth
- local distance = setting.distance or 0
- local voffset = setting.voffset or 0
- local hoffset = setting.hoffset or 0
- first.xoffset = - width - hoffset - distance - parindent
- first.yoffset = - height - voffset
- if true then
- -- needed till we can store parindent with localpar
- first.prev = nil
- first.next = nil
- local h = hpack_nodes(first)
- h.width = 0
- h.height = 0
- h.depth = 0
- prev.next = h
- next.prev = h
- h.next = next
- h.prev = prev
- end
+ local width = first.width
+ local height = first.height
+ local depth = first.depth
+ local distance = setting.distance or 0
+ local voffset = setting.voffset or 0
+ local hoffset = setting.hoffset or 0
+ local parindent = tex.parindent
+ local baseline = texget("baselineskip").width
+ local lines = tonumber(setting.n) or 0
+ --
+ first.xoffset = - width - hoffset - distance - parindent
+ first.yoffset = - voffset -- no longer - height here
+ -- We pack so that successive handling cannot touch the dropped cap. Packaging
+ -- in a hlist is also needed because we cannot locally adapt e.g. parindent (not
+ -- yet stored in with localpar).
+ first.prev = nil
+ first.next = nil
+ local h = hpack_nodes(first)
+ h.width = 0
+ h.height = 0
+ h.depth = 0
+ prev.next = h
+ next.prev = h
+ h.next = next
+ h.prev = prev
+
+ -- end of packaging
if setting.location == v_margin then
-- okay
else
- local lines = tonumber(setting.n) or 0
if lines == 0 then -- safeguard, not too precise
- lines = ceil((height+voffset) / texget("baselineskip").width)
+ lines = ceil((height+voffset) / baseline)
end
-- We cannot set parshape yet ... when we can I'll add a slope
-- option (positive and negative, in emwidth).
diff --git a/tex/context/base/typo-drp.mkiv b/tex/context/base/typo-drp.mkiv
index c78ed8d61..78f6df0a2 100644
--- a/tex/context/base/typo-drp.mkiv
+++ b/tex/context/base/typo-drp.mkiv
@@ -52,17 +52,17 @@
\installcommandhandler \??initial {initial} \??initial
-\def\v_typo_initials_auto_scale % magic
- {\the\dimexpr\lineheight*\initialparameter\c!n-\initialparameter\c!voffset\relax}
+\definemeasure[initial:n][\lineheight*\initialparameter\c!n - \strutdp]
\setupinitial
[\c!location=\v!text,
\c!n=3,
% \s!font=Bold sa 4,
- \s!font=Bold at \v_typo_initials_auto_scale,
- \c!distance=.125em,
+ % \s!font=Bold ht \measure{initial:n},
+ \s!font=Bold cp \measure{initial:n},
+ \c!distance=.125\emwidth,
\c!hoffset=\zeropoint,
- \c!voffset=-1ex,
+ \c!voffset=\v!line, % \dimexp\lineheight*\initialparameter\c!n-\lineheight\relax]
\c!style=,
\c!color=,
\c!before=\blank]
@@ -85,6 +85,12 @@
{\dontleavehmode
\begingroup
\edef\currentinitial{#1}%
+ \scratchcounter \initialparameter\c!n\relax
+ \scratchdistance\initialparameter\c!distance\relax
+ \scratchhoffset \initialparameter\c!hoffset \relax
+ \edef\p_voffset{\initialparameter\c!voffset}%
+ \scratchvoffset\dimexpr\ifx\p_voffset\v!line\scratchcounter\lineheight-\lineheight\else\p_voffset\fi\relax
+ \resetfontfeature % might be needed in more places
\doifelsenothing{\initialparameter\c!style}
{\definedfont[\initialparameter\s!font]}
{\useinitialstyleparameter\c!style}%
@@ -92,15 +98,15 @@
\ctxcommand{setinitial{
location = "\initialparameter\c!location",
enabled = true,
- n = \number\initialparameter\c!n,
- distance = \number\dimexpr\initialparameter\c!distance,
- hoffset = \number\dimexpr\initialparameter\c!hoffset,
- voffset = \number\dimexpr\initialparameter\c!voffset,
+ n = \number\scratchcounter,
+ distance = \number\scratchdistance,
+ hoffset = \number\scratchhoffset,
+ voffset = \number\scratchvoffset,
ma = \the\attribute\colormodelattribute ,
ca = \the\attribute\colorattribute ,
ta = \the\attribute\transparencyattribute,
font = \fontid\font,
- dynamic = \number\attribute\zerocount,
+ dynamic = \number\attribute\zerocount, % it's a bit over the top to support this here
}}%
\stopluacode
\kern\zeropoint % we need a node
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index a8679fcdc..ff4758068 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 : 08/26/13 13:54:54
+-- merge date : 08/28/13 23:08:58
do -- begin closure to overcome local limits and interference
@@ -3770,7 +3770,7 @@ function constructors.scale(tfmdata,specification)
targetproperties.script=properties.script or "dflt"
targetproperties.mode=properties.mode or "base"
local askedscaledpoints=scaledpoints
- local scaledpoints,delta=constructors.calculatescale(tfmdata,scaledpoints)
+ local scaledpoints,delta=constructors.calculatescale(tfmdata,scaledpoints,nil,specification)
local hdelta=delta
local vdelta=delta
target.designsize=parameters.designsize
@@ -4286,11 +4286,11 @@ function constructors.hashinstance(specification,force)
size=math.round(constructors.scaled(size,designsizes[hash]))
specification.size=size
end
- if fallbacks then
- return hash..' @ '..tostring(size)..' @ '..fallbacks
- else
- return hash..' @ '..tostring(size)
- end
+ if fallbacks then
+ return hash..' @ '..tostring(size)..' @ '..fallbacks
+ else
+ return hash..' @ '..tostring(size)
+ end
end
function constructors.setname(tfmdata,specification)
if constructors.namemode=="specification" then
@@ -5705,7 +5705,7 @@ local function copytotfm(data)
parameters.space_shrink=333
parameters.x_height=400
parameters.quad=1000
- if italicangle then
+ if italicangle and italicangle~=0 then
parameters.italicangle=italicangle
parameters.italicfactor=math.cos(math.rad(90+italicangle))
parameters.slant=- math.tan(italicangle*math.pi/180)
@@ -7996,7 +7996,7 @@ local function copytotfm(data,cache_id)
parameters.quad=units
if spaceunits<2*units/5 then
end
- if italicangle then
+ if italicangle and italicangle~=0 then
parameters.italicangle=italicangle
parameters.italicfactor=math.cos(math.rad(90+italicangle))
parameters.slant=- math.tan(italicangle*math.pi/180)