summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/back-exp.lua11
-rw-r--r--tex/context/base/cont-new.mkiv91
-rw-r--r--tex/context/base/context-version.pdfbin4387 -> 4388 bytes
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/lpdf-tag.lua47
-rw-r--r--tex/context/base/math-noa.lua8
-rw-r--r--tex/context/base/math-tag.lua19
-rw-r--r--tex/context/base/mult-low.lua2
-rw-r--r--tex/context/base/page-sid.mkiv57
-rw-r--r--tex/context/base/spac-ver.mkiv29
-rw-r--r--tex/context/base/status-files.pdfbin24729 -> 24753 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin333492 -> 333496 bytes
-rw-r--r--tex/context/base/strc-flt.mkvi1
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
14 files changed, 144 insertions, 125 deletions
diff --git a/tex/context/base/back-exp.lua b/tex/context/base/back-exp.lua
index 7350d927f..54a53b280 100644
--- a/tex/context/base/back-exp.lua
+++ b/tex/context/base/back-exp.lua
@@ -265,7 +265,7 @@ local namespaces = {
mstacker = "m",
mstackertop = "m",
mstackermid = "m",
- mstackernbot = "m",
+ mstackerbot = "m",
}
setmetatableindex(namespaced, function(t,k)
@@ -1304,7 +1304,7 @@ do
local data = di.data
local size = #data
if size == 1 then
- -- else firefox complains
+ -- else firefox complains ... code in math-tag (for pdf tagging)
di.element = "msqrt"
elseif size == 2 then
data[1], data[2] = data[2], data[1]
@@ -1554,13 +1554,6 @@ do
extras.msup = extras.msub
--- function extras.mroot(result,element,detail,n,fulltag,di)
--- local data = di.data
--- if size == #data then
--- data[1], data[2] = data[2], data[1]
--- end
--- end
-
end
do
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 2da1fb0f6..bd70f3566 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{2014.10.08 00:33}
+\newcontextversion{2014.10.08 16:51}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
@@ -60,95 +60,6 @@
% \saveparnumber\doifelselessparlines {2}\ActionY\ActionN 5.1 nop \par
% \saveparnumber\doifelselessparlines {2}\ActionY\ActionN 6.1 yes \par
-\newcount \c_typo_par_current
-\newcount \c_typo_par_saved
-\newconstant\c_typo_par_state
-\newconstant\c_typo_par_lines
-\newconstant\c_typo_par_criterium
-
-\appendtoks
- \advance\c_typo_par_current\plusone % local
-\to \everypar
-
-\unexpanded\def\saveparnumber
- {\c_typo_par_saved\tagparcounter} % local
-
-\def\savedparnumber {\number\c_typo_par_saved}
-\def\currentparnumber{\number\c_typo_par_current}
-
-\unexpanded\def\nofparlines
- {\numexpr
- \ifhmode
- \maxdimen
- \else\ifnum\c_typo_par_current=\c_typo_par_current
- % we have not yet started a new one
- \prevgraf
- \else\ifnum\c_typo_par_current>\c_typo_par_current
- % we are somewhere in the future
- \maxdimen
- \else
- \zerocount
- \fi\fi\fi
- \relax}
-
-\unexpanded\def\setnofparlinesstate
- {\c_typo_par_state\numexpr
- \ifhmode
- \zerocount
- \else\ifnum\c_typo_par_current=\c_typo_par_current
- % we have not yet started a new one
- \plusone
- \else\ifnum\c_typo_par_current>\c_typo_par_current
- % we are somewhere in the future
- \plustwo
- \else
- \plusthree
- \fi\fi\fi
- \relax}
-
-\unexpanded\def\shownofparlines
- {\dontleavehmode\hbox\bgroup
- \infofont
- [%
- \number\c_typo_par_current:\number\c_typo_par_current:\space
- \ifcase\c_typo_par_state
- unknown%
- \or
- \ifnum\c_typo_par_lines<\c_typo_par_criterium
- \darkred
- \number\c_typo_par_lines<\number\c_typo_par_criterium
- \else
- \darkgreen
- \number\c_typo_par_lines>=\number\c_typo_par_criterium
- \fi
- \or
- ahead%
- \else
- behind%
- \fi
- ]%
- \egroup}
-
-\unexpanded\def\doifelselessparlines#1%
- {\c_typo_par_criterium#1\relax
- \c_typo_par_lines\prevgraf
- \setnofparlinesstate
- \ifnum\nofparlines<#1\relax
- \expandafter\firstoftwoarguments
- \else
- \expandafter\secondoftwoarguments
- \fi}
-
-\unexpanded\def\doiflessparlines#1%
- {\c_typo_par_criterium#1\relax
- \c_typo_par_lines\prevgraf
- \setnofparlinesstate
- \ifnum\nofparlines<#1\relax
- \expandafter\firstofoneargument
- \else
- \expandafter\gobbleoneargument
- \fi}
-
%D Maybe:
\unexpanded\def\tightvbox{\dowithnextbox{\dp\nextbox\zeropoint\box\nextbox}\vbox}
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index d7d03f969..cfd9a2785 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 8e9d95fa3..b10c6885f 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -28,7 +28,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2014.10.08 00:33}
+\edef\contextversion{2014.10.08 16:51}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/lpdf-tag.lua b/tex/context/base/lpdf-tag.lua
index 5f0d35b53..9b54f39ec 100644
--- a/tex/context/base/lpdf-tag.lua
+++ b/tex/context/base/lpdf-tag.lua
@@ -11,6 +11,7 @@ local format, match, concat = string.format, string.match, table.concat
local lpegmatch, P, S, C = lpeg.match, lpeg.P, lpeg.S, lpeg.C
local utfchar = utf.char
local settings_to_hash = utilities.parsers.settings_to_hash
+local formatters = string.formatters
local trace_tags = false trackers.register("structures.tags", function(v) trace_tags = v end)
@@ -109,6 +110,7 @@ local function finishstructure()
Nums = nums
}
-- we need to split names into smaller parts (e.g. alphabetic or so)
+ -- we already have code for that somewhere
if add_ids then
local kids = pdfdictionary {
Limits = pdfarray { names[1], names[#names-1] },
@@ -191,6 +193,11 @@ end
local function makeelement(fulltag,parent)
local tag, n = lpegmatch(dashsplitter,fulltag)
+ if tag == "ignore" then
+ return false
+-- elseif tag == "mstackertop" or tag == "mstackerbot" or tag == "mstackermid"then
+-- return true
+ end
local tg, detail = lpegmatch(colonsplitter,tag)
local k, r = pdfarray(), pdfreserveobject()
local a = userproperties[fulltag]
@@ -215,9 +222,13 @@ local function makeelement(fulltag,parent)
end
local kids = parent.kids
kids[#kids+1] = s
- elements[fulltag] = { tag = tag, pref = s, kids = k, knum = r, pnum = pagenum }
+ local e = { tag = tag, pref = s, kids = k, knum = r, pnum = pagenum }
+ elements[fulltag] = e
+ return e
end
+local f_BDC = formatters["/%s <</MCID %s>>BDC"]
+
local function makecontent(parent,start,stop,slist,id)
local tag = parent.tag
local kids = parent.kids
@@ -225,7 +236,7 @@ local function makecontent(parent,start,stop,slist,id)
if id == "image" then
local d = pdfdictionary {
Type = pdf_mcr,
- Pg = pageref,
+ -- Pg = pageref,
MCID = last,
Alt = "image",
}
@@ -235,15 +246,15 @@ local function makecontent(parent,start,stop,slist,id)
else
local d = pdfdictionary {
Type = pdf_mcr,
- Pg = pageref,
+ -- Pg = pageref,
MCID = last,
}
-- kids[#kids+1] = pdfreference(pdfflushobject(d))
kids[#kids+1] = d
end
--
- local bliteral = pdfliteral(format("/%s <</MCID %s>>BDC",tag,last))
- local eliteral = pdfliteral("EMC")
+ local bliteral = pdfliteral(f_BDC(tag,last))
+ local eliteral = pdfliteral("EMC") -- could be a copy
-- use insert instead:
local prev = getprev(start)
if prev then
@@ -301,7 +312,7 @@ local function collectranges(head,list)
last = nil
else
local nl = getlist(n)
- slide_nodelist(nl) -- temporary hack till math gets slided (tracker item)
+ -- slide_nodelist(nl) -- temporary hack till math gets slided (tracker item)
collectranges(nl,n)
end
end
@@ -332,15 +343,25 @@ function nodeinjections.addtags(head)
local noftags, tag = #tags, nil
for j=1,noftags do
local tag = tags[j]
- if not elements[tag] then
- makeelement(tag,prev)
+ local prv = elements[tag] or makeelement(tag,prev)
+ if prv == false then
+ -- ignore this one
+ prev = false
+ break
+ elseif prv == true then
+ -- skip this one
+ else
+ prev = prv
end
- prev = elements[tag]
end
- local b, e = makecontent(prev,start,stop,list,id)
- if start == head then
- report_tags("this can't happen: parent list gets tagged")
- head = b
+ if prev then
+ local b, e = makecontent(prev,start,stop,list,id)
+ if start == head then
+ report_tags("this can't happen: parent list gets tagged")
+ head = b
+ end
+ else
+ -- ignored content
end
end
finishpage()
diff --git a/tex/context/base/math-noa.lua b/tex/context/base/math-noa.lua
index 3a0af01cc..9ff3e6bda 100644
--- a/tex/context/base/math-noa.lua
+++ b/tex/context/base/math-noa.lua
@@ -170,10 +170,10 @@ local function process(start,what,n,parent)
elseif id == math_char or id == math_textchar or id == math_delim then
break
elseif id == math_noad then
-if prev then
- -- we have no proper prev in math nodes yet
- setfield(start,"prev",prev)
-end
+-- if prev then
+-- -- we have no proper prev in math nodes yet
+-- setfield(start,"prev",prev)
+-- end
local noad = getfield(start,"nucleus") if noad then process(noad,what,n,start) end -- list
noad = getfield(start,"sup") if noad then process(noad,what,n,start) end -- list
diff --git a/tex/context/base/math-tag.lua b/tex/context/base/math-tag.lua
index 6b555650e..26782bd9c 100644
--- a/tex/context/base/math-tag.lua
+++ b/tex/context/base/math-tag.lua
@@ -64,6 +64,8 @@ local glue_code = nodecodes.glue
local kern_code = nodecodes.kern
local math_code = nodecodes.math
+local processnoads = noads.process
+
local a_tagged = attributes.private('tagged')
local a_taggedpar = attributes.private('taggedpar')
local a_exportstatus = attributes.private('exportstatus')
@@ -144,6 +146,21 @@ local function getunicode(n) -- instead of getchar
return data.unicode or char
end
+-------------------
+
+local content = { }
+local found = false
+
+content[math_char_code] = function() found = true end
+
+local function hascontent(head)
+ found = false
+ processnoads(head,content,"content")
+ return found
+end
+
+--------------------
+
process = function(start) -- we cannot use the processor as we have no finalizers (yet)
local mtexttag = nil
while start do
@@ -423,7 +440,7 @@ process = function(start) -- we cannot use the processor as we have no finalizer
process(left) -- root symbol, ignored
stop_tagged()
end
- if degree then -- not good enough, can be empty mlist
+ if degree and hascontent(degree) then
setattr(start,a_tagged,start_tagged("mroot"))
processsubsup(start)
process(degree)
diff --git a/tex/context/base/mult-low.lua b/tex/context/base/mult-low.lua
index 21f7c53cc..b0d46f256 100644
--- a/tex/context/base/mult-low.lua
+++ b/tex/context/base/mult-low.lua
@@ -311,7 +311,7 @@ return {
--
"offinterlineskip", "oninterlineskip", "nointerlineskip",
--
- "strut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "begstrut", "endstrut", "lineheight",
+ "strut", "halfstrut", "quarterstrut", "depthstrut", "setstrut", "strutbox", "strutht", "strutdp", "strutwd", "struthtdp", "begstrut", "endstrut", "lineheight",
--
"ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing",
"ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing",
diff --git a/tex/context/base/page-sid.mkiv b/tex/context/base/page-sid.mkiv
index 4760ca2f6..adb662808 100644
--- a/tex/context/base/page-sid.mkiv
+++ b/tex/context/base/page-sid.mkiv
@@ -199,17 +199,62 @@
\global\setfalse\c_page_sides_short
\global\setfalse\c_page_sides_flag}
+% \def\page_sides_flush_floats_indeed
+% {\global\advance\d_page_sides_vsize-\d_page_sides_bottomskip
+% \begingroup
+% \let\page_sides_flush_floats\relax
+% \forgetall
+% \doloop
+% {\strut
+% \iftracesidefloats
+% \color[darkgray]{\ruledhbox{\strut\kern\d_page_sides_width}}%
+% \fi
+% \par
+% % \ifdim\dimexpr\d_page_sides_vsize-\pagetotal\relax>\zeropoint
+% \ifdim\dimexpr\d_page_sides_vsize-\d_page_sides_bottomskip-\pagetotal\relax>\zeropoint
+% \ifnum\recurselevel>\plushundred % safeguard, sort of deadcycles
+% \exitloop
+% \fi
+% \else
+% \exitloop
+% \fi}%
+% \endgroup
+% \ifdim\parskip>\zeropoint % why this test ?
+% \ifdim\d_page_sides_bottomskip>\parskip
+% % \nowhitespace
+% % \vskip\d_page_sides_bottomskip
+% \blank[\v!nowhite,\the\dimexpr\d_page_sides_bottomskip]
+% \fi
+% \else
+% \blank[\the\d_page_sides_bottomskip]% new, so needs checking
+% \fi}
+
+\installcorenamespace{sidefloatsteps}
+
+\setvalue{\??sidefloatsteps\v!line }{\strut}
+\setvalue{\??sidefloatsteps\v!big }{\strut}
+\setvalue{\??sidefloatsteps\v!medium}{\halfstrut}
+\setvalue{\??sidefloatsteps\v!small }{\quarterstrut}
+\setvalue{\??sidefloatsteps\v!depth }{\depthstrut}
+
+% we don't officially know what kind of float we flush
+
\def\page_sides_flush_floats_indeed
{\global\advance\d_page_sides_vsize-\d_page_sides_bottomskip
\begingroup
\let\page_sides_flush_floats\relax
+ \edef\m_pages_strut{\executeifdefined{\??sidefloatsteps\rootfloatparameter\c!step}\strut}%
\forgetall
\doloop
- {\strut
- \iftracesidefloats
- \color[darkgray]{\ruledhbox{\strut\kern\d_page_sides_width}}%
+ {\iftracesidefloats
+ \dontleavehmode
+ \ruledhbox{\m_pages_strut\kern\d_page_sides_width}%
+ \else
+ \m_pages_strut
\fi
\par
+ \nointerlineskip
+ % \ifdim\dimexpr\d_page_sides_vsize-\d_page_sides_bottomskip-\pagetotal\relax>\zeropoint
\ifdim\dimexpr\d_page_sides_vsize-\pagetotal\relax>\zeropoint
\ifnum\recurselevel>\plushundred % safeguard, sort of deadcycles
\exitloop
@@ -222,10 +267,12 @@
\ifdim\d_page_sides_bottomskip>\parskip
% \nowhitespace
% \vskip\d_page_sides_bottomskip
- \blank[\v!nowhite,\the\dimexpr\d_page_sides_bottomskip]
+% \blank[\v!nowhite,\the\dimexpr\d_page_sides_bottomskip]
+ \blank[\v!nowhite,\rootfloatparameter\c!sidespaceafter]
\fi
\else
- \blank[\the\d_page_sides_bottomskip]% new, so needs checking
+% \blank[\the\d_page_sides_bottomskip]% new, so needs checking
+ \blank[\rootfloatparameter\c!sidespaceafter]% new, so needs checking
\fi}
% alternative method (unsnapped)
diff --git a/tex/context/base/spac-ver.mkiv b/tex/context/base/spac-ver.mkiv
index 7257b4ef9..7dc00a529 100644
--- a/tex/context/base/spac-ver.mkiv
+++ b/tex/context/base/spac-ver.mkiv
@@ -962,6 +962,35 @@
\let\normalstrut\strut
+\unexpanded\def\halfstrut
+ {\relax
+ \dontleavehmode
+ \begingroup
+ \setbox\scratchbox\copy\strutbox
+ \ht\scratchbox\dimexpr\strutht/\plustwo\relax
+ \dp\scratchbox\dimexpr\strutdp/\plustwo\relax
+ \box\scratchbox
+ \endgroup}
+
+\unexpanded\def\quarterstrut
+ {\relax
+ \dontleavehmode
+ \begingroup
+ \setbox\scratchbox\copy\strutbox
+ \ht\scratchbox\dimexpr\strutht/\plusfour\relax
+ \dp\scratchbox\dimexpr\strutdp/\plusfour\relax
+ \box\scratchbox
+ \endgroup}
+
+\unexpanded\def\depthstrut
+ {\relax
+ \dontleavehmode
+ \begingroup
+ \setbox\scratchbox\copy\strutbox
+ \ht\scratchbox\dimexpr\strutht-\struthtdp/\plustwo\relax % assumes that ht > lineheight/2
+ \box\scratchbox
+ \endgroup}
+
%D Sometimes a capstrut comes in handy
%D
%D \starttabulate[|Tl|l|l|]
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index b77dd85a1..427395f63 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 ac68be555..67dc5c4f2 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/strc-flt.mkvi b/tex/context/base/strc-flt.mkvi
index 3f6822adb..08f469011 100644
--- a/tex/context/base/strc-flt.mkvi
+++ b/tex/context/base/strc-flt.mkvi
@@ -133,6 +133,7 @@
\c!outermargin=\zeropoint, % idem
\c!leftmargindistance=\zeropoint,
\c!rightmargindistance=\floatparameter\c!leftmargindistance,
+ \c!step=\v!big, % the flish side float step (big=line, medium=halfline, small=quarterline, depth=halfline with normaldepth)
\c!ntop=2,
\c!nbottom=0,
\c!nlines=4, % used?
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index e1d1c59a7..9fce2bfad 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 : 10/08/14 00:33:41
+-- merge date : 10/08/14 16:51:38
do -- begin closure to overcome local limits and interference