summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-01-31 12:15:06 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-01-31 12:15:06 +0100
commit7874dbe9834f98579d88719fc4fbe3a67c042492 (patch)
treed8a28fa5d842703384dbd2121b02e69ee128697c /tex/context/base/mkiv
parent397508ee8dca010aec5a9c6951b68434e5657f14 (diff)
downloadcontext-7874dbe9834f98579d88719fc4fbe3a67c042492.tar.gz
2016-01-31 11:45:00
Diffstat (limited to 'tex/context/base/mkiv')
-rw-r--r--tex/context/base/mkiv/buff-ver.lua49
-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/status-files.pdfbin9092 -> 9117 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin270265 -> 270266 bytes
-rw-r--r--tex/context/base/mkiv/strc-flt.mkvi8
-rw-r--r--tex/context/base/mkiv/syst-ini.mkiv10
7 files changed, 58 insertions, 13 deletions
diff --git a/tex/context/base/mkiv/buff-ver.lua b/tex/context/base/mkiv/buff-ver.lua
index 0168c551d..448d1a60c 100644
--- a/tex/context/base/mkiv/buff-ver.lua
+++ b/tex/context/base/mkiv/buff-ver.lua
@@ -627,6 +627,17 @@ local function getstrip(lines,first,last)
return first, last, last - first + 1
end
+-- we look for text (todo):
+--
+-- "foo" : start after line with "foo"
+-- "=" : ignore first blob
+-- "=foo" : start at "foo"
+-- "!foo" : maybe a not "foo"
+
+-- % - # lines start a comment
+
+local comment = "^[%%%-#]"
+
local function getrange(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere
local noflines = #lines
local first = first or 1
@@ -634,7 +645,7 @@ local function getrange(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere
if last < 0 then
last = noflines + last
end
- local what = settings_to_array(range)
+ local what = settings_to_array(range) -- maybe also n:m
local r_first = what[1]
local r_last = what[2]
local f = tonumber(r_first)
@@ -644,11 +655,26 @@ local function getrange(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere
if f > first then
first = f
end
- else
+ elseif r_first == "=" then
for i=first,last do
- if find(lines[i],r_first) then
+ if find(lines[i],comment) then
first = i + 1
+ else
+ break
+ end
+ end
+ elseif r_first ~= "" then
+ local exact, r_first = match(r_first,"^([=]?)(.*)")
+ for i=first,last do
+ if find(lines[i],r_first) then
+ if exact == "=" then
+ first = i
+ else
+ first = i + 1
+ end
break
+ else
+ first = i
end
end
end
@@ -664,11 +690,24 @@ local function getrange(lines,first,last,range) -- 1,3 1,+3 fromhere,tothere
if l < last then
last = l
end
- else
+ elseif r_first == "=" then
+ for i=first,last do
+ if find(lines[i],comment) then
+ break
+ else
+ last = i
+ end
+ end
+ elseif r_last ~= "" then
+ local exact, r_last = match(r_last,"^([=]?)(.*)")
for i=first,last do
if find(lines[i],r_last) then
- last = i - 1
+ if exact == "=" then
+ last = i
+ end
break
+ else
+ last = i
end
end
end
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index e9dddbb0f..9edb260fc 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.01.29 19:00}
+\newcontextversion{2016.01.31 11:42}
%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 727363db8..cd310cd07 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.01.29 19:00}
+\edef\contextversion{2016.01.31 11:42}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 35df55af7..5c70adcd8 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 8d31b4caa..2fde12e0f 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-flt.mkvi b/tex/context/base/mkiv/strc-flt.mkvi
index fb621c997..48f264319 100644
--- a/tex/context/base/mkiv/strc-flt.mkvi
+++ b/tex/context/base/mkiv/strc-flt.mkvi
@@ -1913,13 +1913,19 @@
% these could be \??floatpreparesidecaption
+% \setupfloat[figure][location=left]
+% \setupcaption[figure][width=max]
+%
+% \placefigure{my figure caption my figure caption}{\framed[width=4cm,height=1cm]{}} \input tufte
+% \placefigure{my figure caption} {\framed[width=4cm,height=1cm]{}} \input tufte
+
\def\strc_floats_prepare_side_caption_max
{\setbox\b_strc_floats_caption\vbox
{\strc_floats_caption_set_align
\hsize\wd\b_strc_floats_content
\strc_floats_make_complete_caption}}
-\def\strc_floats_prepare_side_caption_fit
+\def\strc_floats_prepare_side_caption_fit % or center when smaller
{\ifdim\wd\b_strc_floats_caption>\wd\b_strc_floats_content\relax
\setbox\b_strc_floats_caption\vbox
{\forgetall % needed?
diff --git a/tex/context/base/mkiv/syst-ini.mkiv b/tex/context/base/mkiv/syst-ini.mkiv
index 37ffc5768..a99f6f0da 100644
--- a/tex/context/base/mkiv/syst-ini.mkiv
+++ b/tex/context/base/mkiv/syst-ini.mkiv
@@ -452,17 +452,17 @@
%D Some expected plain variants follow. We don't reuse registers because we
%D don't want clashes.
-\newdimen\p@ \p@ \onepoint
-\newcount\m@ne \m@ne \minusone
-\newdimen\z@ \z@ \zeropoint
+\let \p@ \onepoint
+\let \m@ne \minusone
+\let \z@ \zeropoint
\let \@ne \plusone
\let \tw@ \plustwo
\let \thr@@ \plusthree
\let \sixt@@n \plussixteen
\let \@cclv \pluscclv
\let \@cclvi \pluscclvi
-\newbox \voidb@x
-\newtoks \toks@
+\let \voidb@x \voidbox
+\newtoks \toks@ % \scratchtoks
%D We define \type {\newif} a la plain \TEX, but will redefine it later. As
%D Knuth says: