summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2016-11-28 14:23:17 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-11-28 14:23:17 +0100
commitb8a38bef2eaacea0dd17897dc99f1ef09b46a7e3 (patch)
treee53017157648c5d4abab9b14ddfd23db0e43de38 /tex
parentf4d0ad2ba2c4ca5bfae469650e535fd46749b3f4 (diff)
downloadcontext-b8a38bef2eaacea0dd17897dc99f1ef09b46a7e3.tar.gz
2016-11-28 13:36:00
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/lpdf-wid.lua9
-rw-r--r--tex/context/base/mkiv/math-ali.mkiv16
-rw-r--r--tex/context/base/mkiv/meta-imp-txt.mkiv1
-rw-r--r--tex/context/base/mkiv/mlib-pdf.lua13
-rw-r--r--tex/context/base/mkiv/mlib-run.lua55
-rw-r--r--tex/context/base/mkiv/mult-fun.lua8
-rw-r--r--tex/context/base/mkiv/mult-mps.lua3
-rw-r--r--tex/context/base/mkiv/scrn-wid.lua1
-rw-r--r--tex/context/base/mkiv/scrn-wid.mkvi4
-rw-r--r--tex/context/base/mkiv/spac-ver.mkiv2
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25654 -> 25675 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin368575 -> 368575 bytes
-rw-r--r--tex/context/base/mkiv/strc-mat.mkiv12
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin803816 -> 803704 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60766 -> 60766 bytes
-rw-r--r--tex/context/modules/mkiv/s-present-organic.mkiv4
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
21 files changed, 54 insertions, 84 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 64462979d..d995f06c7 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2016.11.24 12:05}
+\newcontextversion{2016.11.28 13:30}
%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/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index c7d81e7b0..11f36726e 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2016.11.24 12:05}
+\edef\contextversion{2016.11.28 13:30}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index f58ae0d1a..3f2c6f62d 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.11.24 12:05}
+\newcontextversion{2016.11.28 13:30}
%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 8459165bf..ba9036a15 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.11.24 12:05}
+\edef\contextversion{2016.11.28 13:30}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/lpdf-wid.lua b/tex/context/base/mkiv/lpdf-wid.lua
index 6b0024a51..fceae49cb 100644
--- a/tex/context/base/mkiv/lpdf-wid.lua
+++ b/tex/context/base/mkiv/lpdf-wid.lua
@@ -33,6 +33,7 @@ local v_hidden = variables.hidden
local v_auto = variables.auto
local v_embed = variables.embed
local v_max = variables.max
+local v_yes = variables.yes
local pdfconstant = lpdf.constant
local pdfdictionary = lpdf.dictionary
@@ -381,7 +382,7 @@ function codeinjections.attachmentid(filename) -- not used in context
return filestreams[filename]
end
-local nofcomments, usepopupcomments, stripleading = 0, false, true
+local nofcomments, usepopupcomments = 0, false
local defaultattributes = {
["xmlns"] = "http://www.w3.org/1999/xhtml",
@@ -415,10 +416,12 @@ end
function nodeinjections.comment(specification) -- brrr: seems to be done twice
nofcomments = nofcomments + 1
- local text = stripstring(specification.data or "")
- if stripleading then
+ local text = specification.data or ""
+ if specification.space ~= v_yes then
+ text = stripstring(text)
text = gsub(text,"[\n\r] *","\n")
end
+ text = gsub(text,"\r","\n")
local name, appearance = analyzesymbol(specification.symbol,comment_symbols)
local tag = specification.tag or "" -- this is somewhat messy as recent
local title = specification.title or "" -- versions of acrobat see the title
diff --git a/tex/context/base/mkiv/math-ali.mkiv b/tex/context/base/mkiv/math-ali.mkiv
index d57a0b955..d8693f697 100644
--- a/tex/context/base/mkiv/math-ali.mkiv
+++ b/tex/context/base/mkiv/math-ali.mkiv
@@ -767,8 +767,10 @@
\def\math_matrix_stop
{\crcr
- \mathstrut\crcr
- \noalign{\kern-\baselineskip}%
+ % \ifgridsnapping \else
+ \mathstrut\crcr
+ \noalign{\vskip-\baselineskip}%
+ % \fi
\egroup
\popmacro\math_matrix_NC
\egroup
@@ -1297,7 +1299,7 @@
\def\strc_math_number_right_overflow_outside
{\vpack\bgroup
\strc_math_flush_box_framed_fit_inline
- \hskip\zeropoint % nicely breaks the line with out introducing funny vertical spacing ... why o why
+% \hskip\zeropoint % nicely breaks the line without introducing funny vertical spacing ... why o why
\hpack to \displaywidth\bgroup
\hss
\math_box_llapped_math_no
@@ -1310,7 +1312,7 @@
\math_box_rlapped_math_no
\hss
\egroup
- \hskip\zeropoint % nicely breaks the line with out introducing funny vertical spacing ... why o why
+ \hskip\zeropoint % nicely breaks the line without introducing funny vertical spacing ... why o why
\strc_math_flush_box_framed_fit_inline
\egroup}
@@ -1481,6 +1483,11 @@
\unexpanded\def\strc_math_box_stop
{\stopforceddisplaymath
\egroup
+ % % not needed, attribute driven
+ % \ifgridsnapping
+ % \snaptogrid[\v!math]\vbox
+ % \fi
+ % \bgroup
% check number
\d_strc_math_number_width\wd\b_strc_formulas_number
%
@@ -1533,6 +1540,7 @@
\else
\strc_math_flush_box
\fi
+ % \egroup
\egroup}
\defineinnermathhandler\v!left {\strc_math_box_start\plusone }{\strc_math_box_stop}
diff --git a/tex/context/base/mkiv/meta-imp-txt.mkiv b/tex/context/base/mkiv/meta-imp-txt.mkiv
index 1ce847f67..c6ecc6f03 100644
--- a/tex/context/base/mkiv/meta-imp-txt.mkiv
+++ b/tex/context/base/mkiv/meta-imp-txt.mkiv
@@ -130,6 +130,7 @@
\unexpanded\def\getshapetext % option: unvbox
{\vbox\bgroup
\forgetall
+ \dontcomplain
\setbox\scratchbox\vbox to \parheight
{\expanded{\switchtobodyfont[\@@shbodyfont]}% evt strutheight en
\splittopskip\strutheight % lineheight opslaan
diff --git a/tex/context/base/mkiv/mlib-pdf.lua b/tex/context/base/mkiv/mlib-pdf.lua
index 5989b5b55..4d1756c43 100644
--- a/tex/context/base/mkiv/mlib-pdf.lua
+++ b/tex/context/base/mkiv/mlib-pdf.lua
@@ -31,6 +31,7 @@ local pen_info = mplib.pen_info
local object_fields = mplib.fields
local save_table = false
+local force_stroke = false
metapost = metapost or { }
local metapost = metapost
@@ -68,6 +69,10 @@ directives.register("metapost.savetable",function(v)
end
end)
+trackers.register("metapost.forcestroke",function(v)
+ force_stroke = v
+end)
+
local pdfliteral = function(pdfcode)
local literal = copy_node(mpsliteral)
literal.data = pdfcode
@@ -560,7 +565,9 @@ function metapost.flush(result,flusher,askedfig)
else
flushnormalpath(path,result,open)
end
- if objecttype == "fill" then
+ if force_stroke then
+ result[#result+1] = open and "S" or "h S"
+ elseif objecttype == "fill" then
result[#result+1] = evenodd and "h f*" or "h f" -- f* = eo
elseif objecttype == "outline" then
if both then
@@ -597,7 +604,9 @@ function metapost.flush(result,flusher,askedfig)
else
flushnormalpath(path,result,open)
end
- if objecttype == "fill" then
+ if force_stroke then
+ result[#result+1] = open and "S" or "h S"
+ elseif objecttype == "fill" then
result[#result+1] = evenodd and "h f*" or "h f" -- f* = eo
elseif objecttype == "outline" then
result[#result+1] = open and "S" or "h S"
diff --git a/tex/context/base/mkiv/mlib-run.lua b/tex/context/base/mkiv/mlib-run.lua
index 10adb7709..0ef80892a 100644
--- a/tex/context/base/mkiv/mlib-run.lua
+++ b/tex/context/base/mkiv/mlib-run.lua
@@ -466,67 +466,12 @@ function metapost.process(mpx, data, trialrun, flusher, multipass, isextrapass,
-- table.insert(data,2,"")
for i=1,#data do
process(data[i],i)
--- local d = data[i]
--- -- d = string.gsub(d,"\r","")
--- if d then
--- if trace_graphics then
--- tra.inp:write(formatters["\n%% begin snippet %s\n"](i))
--- tra.inp:write(d)
--- tra.inp:write(formatters["\n%% end snippet %s\n"](i))
--- end
--- starttiming(metapost.exectime)
--- result = mpx:execute(d) -- some day we wil use a coroutine with textexts
--- stoptiming(metapost.exectime)
--- if trace_graphics and result then
--- local str = result.log or result.error
--- if str and str ~= "" then
--- tra.log:write(str)
--- end
--- end
--- if not metapost.reporterror(result) then
--- if metapost.showlog then
--- local str = result.term ~= "" and result.term or "no terminal output"
--- if not emptystring(str) then
--- metapost.lastlog = metapost.lastlog .. "\n" .. str
--- report_metapost("log: %s",str)
--- end
--- end
--- if result.fig then
--- converted = metapost.convert(result, trialrun, flusher, multipass, askedfig)
--- end
--- end
--- else
--- report_metapost("error: invalid graphic component %s",i)
--- end
end
else
if trace_tracingall then
data = "tracingall;" .. data
end
process(data)
--- starttiming(metapost.exectime)
--- result = mpx:execute(data)
--- stoptiming(metapost.exectime)
--- if trace_graphics and result then
--- local str = result.log or result.error
--- if str and str ~= "" then
--- tra.log:write(str)
--- end
--- end
--- -- todo: error message
--- if not result then
--- report_metapost("error: no result object returned")
--- elseif result.status > 0 then
--- report_metapost("error: %s",(result.term or "no-term") .. "\n" .. (result.error or "no-error"))
--- else
--- if metapost.showlog then
--- metapost.lastlog = metapost.lastlog .. "\n" .. result.term
--- report_metapost("info: %s",result.term or "no-term")
--- end
--- if result.fig then
--- converted = metapost.convert(result, trialrun, flusher, multipass, askedfig)
--- end
--- end
end
if trace_graphics then
local banner = "\n% end graphic\n\n"
diff --git a/tex/context/base/mkiv/mult-fun.lua b/tex/context/base/mkiv/mult-fun.lua
index b04b7aae3..df127eb5c 100644
--- a/tex/context/base/mkiv/mult-fun.lua
+++ b/tex/context/base/mkiv/mult-fun.lua
@@ -19,11 +19,7 @@ return {
"crossingscale", "crossingoption",
},
commands = {
- "loadmodule",
- --
- "dispose",
- --
- "transparency",
+ "loadmodule", "dispose", "nothing", "transparency", "tolist", "topath", "tocycle",
--
"sqr", "log", "ln", "exp", "inv", "pow", "pi", "radian",
"tand", "cotd", "sin", "cos", "tan", "cot", "atan", "asin", "acos",
@@ -130,7 +126,7 @@ return {
"drawlineoptions", "drawpointoptions", "drawcontroloptions", "drawlabeloptions",
"draworiginoptions", "drawboundoptions", "drawpathoptions", "resetdrawoptions",
--
- "undashed",
+ "undashed", "pencilled",
--
"decorated", "redecorated", "undecorated",
--
diff --git a/tex/context/base/mkiv/mult-mps.lua b/tex/context/base/mkiv/mult-mps.lua
index fb8ed3489..1d7252c29 100644
--- a/tex/context/base/mkiv/mult-mps.lua
+++ b/tex/context/base/mkiv/mult-mps.lua
@@ -12,7 +12,7 @@ return {
"tracingmacros", "tracingonline", "tracingoutput", "tracingrestores",
"tracingspecs", "tracingstats", "tracingtitles", "truecorners",
"warningcheck", "year",
- "false", "nullpicture", "pencircle", "true",
+ "false", "nullpicture", "pencircle", "penspec", "true",
"and", "angle", "arclength", "arctime", "ASCII", "boolean", "bot",
"char", "color", "cosd", "cycle", "decimal", "directiontime", "floor", "fontsize",
"hex", "infont", "intersectiontimes", "known", "length", "llcorner",
@@ -33,6 +33,7 @@ return {
"randomseed", "also", "contour", "doublepath",
"withcolor", "withcmykcolor", "withpen",
"dashed",
+ "envelope",
"if", "else", "elseif", "fi", "for", "endfor", "forever", "exitif", "within",
"forsuffixes", "step", "until",
"charlist", "extensible", "fontdimen", "headerbyte", "kern", "ligtable",
diff --git a/tex/context/base/mkiv/scrn-wid.lua b/tex/context/base/mkiv/scrn-wid.lua
index b9855546e..3ce904349 100644
--- a/tex/context/base/mkiv/scrn-wid.lua
+++ b/tex/context/base/mkiv/scrn-wid.lua
@@ -192,6 +192,7 @@ implement {
{ "symbol" },
{ "buffer" },
{ "layer" },
+ { "space" },
}
}
}
diff --git a/tex/context/base/mkiv/scrn-wid.mkvi b/tex/context/base/mkiv/scrn-wid.mkvi
index f4679684c..f19da57f7 100644
--- a/tex/context/base/mkiv/scrn-wid.mkvi
+++ b/tex/context/base/mkiv/scrn-wid.mkvi
@@ -378,6 +378,7 @@
\c!depth=\v!fit,
\c!nx=40,
\c!ny=10,
+ \c!buffer=\v!comment,
\c!location=\v!high]
\appendtoks
@@ -473,8 +474,9 @@
transparencyvalue \numexpr\thetransparencyattribute{\commentparameter\c!color}\relax
option {\commentparameter\c!option}% % todo
symbol {\commentparameter\c!symbol}%
- buffer {\v!comment}%
+ buffer {\commentparameter\c!buffer}% {\v!comment}%
layer {\commentparameter\c!textlayer}%
+ space {\commentparameter\c!space}%
\relax
\wd\b_scrn_comment_link\currentcommentwidth
\ht\b_scrn_comment_link\currentcommentheight
diff --git a/tex/context/base/mkiv/spac-ver.mkiv b/tex/context/base/mkiv/spac-ver.mkiv
index f9d1dd656..58486c177 100644
--- a/tex/context/base/mkiv/spac-ver.mkiv
+++ b/tex/context/base/mkiv/spac-ver.mkiv
@@ -1474,7 +1474,6 @@
\attribute \snapvboxattribute\attribute\snapmethodattribute
\fi}
-
\unexpanded\def\definegridsnapping
{\dodoubleargument\spac_grids_define}
@@ -1524,6 +1523,7 @@
\definegridsnapping[\v!strict] [\v!maxdepth:0.8,\v!maxheight:0.8,\v!strut]
\definegridsnapping[\v!tolerant] [\v!maxdepth:1.2,\v!maxheight:1.2,\v!strut]
+\definegridsnapping[\v!math] [\v!maxdepth:1.05,\v!maxheight:1.05,\v!strut] % experimental, maybe 1.1
\definegridsnapping[\v!top] [\v!minheight,\v!maxdepth,\v!strut]
\definegridsnapping[\v!bottom] [\v!maxheight,\v!mindepth,\v!strut]
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 49f91f277..a452c1190 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 14a32cdd0..0695b4d0f 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/strc-mat.mkiv b/tex/context/base/mkiv/strc-mat.mkiv
index 0062948a5..52ab811b0 100644
--- a/tex/context/base/mkiv/strc-mat.mkiv
+++ b/tex/context/base/mkiv/strc-mat.mkiv
@@ -33,7 +33,7 @@
%\c!margin=,
%\c!align=,
%\c!separator=,
- %\c!grid=,
+ \c!grid=\v!math,
\c!location=\v!right,
\c!left=(,
\c!right=),
@@ -625,8 +625,12 @@
\def\strc_math_obey_depth
{\ifvmode\ifdim\prevdepth<\zeropoint\else\ifdim\prevdepth<\strutdp
% maybe add a tracing option here
- \kern\dimexpr\strutdp-\prevdepth\relax
- \prevdepth\strutdp
+ \ifgridsnapping
+ \directvspacing\v!depth
+ \else
+ \kern\dimexpr\strutdp-\prevdepth\relax
+ \prevdepth\strutdp
+ \fi
\fi\fi\fi}
\setvalue{\??mathdisplayspacemodel\v!before:3}%
@@ -646,7 +650,7 @@
\fi\fi}
\setvalue{\??mathdisplayspacemodel\v!after:3}%
- {\prevdepth\strutdp
+ {\prevdepth\strutdp % \directvspacing\v!depth
\ifx\p_spaceafter\v!none
% nothing
\else\ifx\p_spaceafter\empty
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 9fb2817ae..67f49ef4a 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 8ded8acd6..afdf58c3b 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/context/modules/mkiv/s-present-organic.mkiv b/tex/context/modules/mkiv/s-present-organic.mkiv
index f45a5f53e..657b786f2 100644
--- a/tex/context/modules/mkiv/s-present-organic.mkiv
+++ b/tex/context/modules/mkiv/s-present-organic.mkiv
@@ -174,8 +174,8 @@
seed := uniformdeviate 100 ;
if alternative > 10 :
- superness := .85 + ((\realfolio-1)/\lastpage) * .15 ;
- squeezeness := 12pt - ((\realfolio-1)/\lastpage) * 10pt ;
+ superness := .85 + ((\realfolio-1)/max(\lastpage,1)) * .15 ;
+ squeezeness := 12pt - ((\realfolio-1)/max(\lastpage,1)) * 10pt ;
else :
superness := .90 ;
squeezeness := 12pt ;
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index f41935acc..d2c032c5b 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 : 11/24/16 12:05:11
+-- merge date : 11/28/16 13:30:27
do -- begin closure to overcome local limits and interference