diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-06-10 22:31:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-06-10 22:31:00 +0200 |
commit | d417ab69ba3ef350b2c576d1eacb9b555df9c870 (patch) | |
tree | 4b1988720b972926c5725b16d4b81a39f55a400e /tex | |
parent | b4a7a2353b029fcff03f5e3668d98ef61f03df3f (diff) | |
download | context-d417ab69ba3ef350b2c576d1eacb9b555df9c870.tar.gz |
beta 2013.06.10 22:31
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/char-def.lua | 3 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4131 -> 4104 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/math-act.lua | 4 | ||||
-rw-r--r-- | tex/context/base/math-stc.mkvi | 2 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24645 -> 24634 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 213142 -> 213137 bytes | |||
-rw-r--r-- | tex/context/base/strc-con.mkvi | 6 | ||||
-rw-r--r-- | tex/context/base/strc-not.mkvi | 22 | ||||
-rw-r--r-- | tex/context/base/supp-box.lua | 55 | ||||
-rw-r--r-- | tex/context/base/supp-box.mkiv | 99 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
13 files changed, 147 insertions, 50 deletions
diff --git a/tex/context/base/char-def.lua b/tex/context/base/char-def.lua index f64efa5c3..22c498ddd 100644 --- a/tex/context/base/char-def.lua +++ b/tex/context/base/char-def.lua @@ -57675,11 +57675,12 @@ characters.data={ adobename="overline", category="po", cjkwd="a", + comment=[[mathspec={ { class="topaccent", name="overbar" }, { class="botaccent", name="underbar" } }"]], description="OVERLINE", direction="on", linebreak="al", mathextensible="l", - comment=[[mathspec={ { class="topaccent", name="overbar" }, { class="botaccent", name="underbar" } }"]], + mathfiller="barfill", mathspec={ { class="under", diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 7b585b38a..2dfef3f31 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.06.10 12:24} +\newcontextversion{2013.06.10 22:31} %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 Binary files differindex 8aed0b0df..f3726f9a2 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 0e48ae1c4..2efac7624 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.06.10 12:24} +\edef\contextversion{2013.06.10 22:31} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/math-act.lua b/tex/context/base/math-act.lua index ddc4de179..7c75dc56e 100644 --- a/tex/context/base/math-act.lua +++ b/tex/context/base/math-act.lua @@ -298,7 +298,7 @@ end local function accent_to_extensible(target,newchr,original,oldchr,height,depth) local characters = target.characters --- if not characters[newchr] then + -- if not characters[newchr] then -- xits needs an enforce local olddata = characters[oldchr] if olddata then height = height or 0 @@ -350,7 +350,7 @@ local function accent_to_extensible(target,newchr,original,oldchr,height,depth) end end end --- end + -- end end function tweaks.fixoverline(target,original) diff --git a/tex/context/base/math-stc.mkvi b/tex/context/base/math-stc.mkvi index 8d5b1d18f..ae601bc4c 100644 --- a/tex/context/base/math-stc.mkvi +++ b/tex/context/base/math-stc.mkvi @@ -750,6 +750,7 @@ {\expandafter\let\csname\??mathextensiblefallbacks\number#2\expandafter\endcsname\csname#1\endcsname \expandafter\let\csname #1\expandafter\endcsname\csname#1\endcsname} +\defineextensiblefiller [barfill] ["203E] \defineextensiblefiller [relfill] ["002D] \defineextensiblefiller [equalfill] ["003D] \defineextensiblefiller [leftarrowfill] ["2190] @@ -771,6 +772,7 @@ \defineextensiblefiller [Leftarrowfill] ["27F8] \defineextensiblefiller [Rightarrowfill] ["27F9] \defineextensiblefiller [Leftrightarrowfill] ["27FA] +\defineextensiblefiller [Leftrightarrowfill] ["27FA] %D Extra: diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 022b6158e..a5197f7b8 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 8c4c25ffa..c124504c2 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/strc-con.mkvi b/tex/context/base/strc-con.mkvi index 11cd31983..2d49a60db 100644 --- a/tex/context/base/strc-con.mkvi +++ b/tex/context/base/strc-con.mkvi @@ -709,7 +709,8 @@ \startsetups[\??constructionrenderings:\v!serried:\v!fit] \let\\=\crlf \noindent - \ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox + \ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox % why copy? leftover? + \penalty\plustenthousand % new \hskip\constructionsheaddistance\relax \useconstructionstyleandcolor\c!style\c!color \ignorespaces @@ -718,8 +719,9 @@ \startsetups[\??constructionrenderings:\v!serried:\v!broad] \let\\=\crlf \noindent - \ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox + \ifhbox\constructionheadbox\unhcopy\else\copy\fi\constructionheadbox % why copy? leftover? \ifconditional\c_strc_constructions_distance_none \else + \penalty\plustenthousand % new \hskip\constructionsheaddistance \!!plus .5\constructionsheaddistance \!!minus .25\constructionsheaddistance\relax \fi \useconstructionstyleandcolor\c!style\c!color diff --git a/tex/context/base/strc-not.mkvi b/tex/context/base/strc-not.mkvi index 19f84e906..d2c916daa 100644 --- a/tex/context/base/strc-not.mkvi +++ b/tex/context/base/strc-not.mkvi @@ -1177,16 +1177,17 @@ \usesetupsparameter\noteparameter % experimental \doifelse{\noteparameter\c!paragraph}\v!yes {\nointerlineskip + \vboxtohboxslack.5\emwidth % we can instead use \hboxestohboxslack later \startvboxtohbox - \handlenoteitself{#tag}{#id}% - % add some slack + \handlenoteitself{#tag}{#id}% + \strc_notes_between_paragraphs \stopvboxtohbox} {\handlenoteitself{#tag}{#id}}% \egroup \the\everyafternoteinsert \endgroup} -\unexpanded\def\betweennoteitself#tag% +\unexpanded\def\betweennoteitself#tag% used ? {\edef\currentnote{#tag}% \doif{\noteparameter\c!paragraph}\v!yes\strc_notes_between_paragraphs} @@ -1345,18 +1346,11 @@ \def\strc_notes_between_paragraphs_first {\glet\strc_notes_between_paragraphs_indeed\strc_notes_between_paragraphs}% shape works reverse -\def\strc_notes_flush_global % will be done in lua instead +\def\strc_notes_flush_global {\doifelse{\noteparameter\c!paragraph}\v!yes - {\vbox - {\beginofshapebox - \iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber - \endofshapebox - \let\strc_notes_between_paragraphs_indeed\strc_notes_between_paragraphs_first % shape works reverse - \doreshapebox - {\hbox{\unhbox\shapebox\strc_notes_between_paragraphs_indeed}} - \donothing \donothing \donothing % get rid of penalties etc - \innerflushshapebox - \convertvboxtohbox}} + {\vbox\starthboxestohbox + \iftrialtypesetting\unvcopy\else\unvbox\fi\currentnoteinsertionnumber + \stophboxestohbox} {\iftrialtypesetting\unvcopied\else\unvboxed\fi\currentnoteinsertionnumber}} %D Supporting end notes is surprisingly easy. Even better, we diff --git a/tex/context/base/supp-box.lua b/tex/context/base/supp-box.lua index c7382834a..8e75b4f63 100644 --- a/tex/context/base/supp-box.lua +++ b/tex/context/base/supp-box.lua @@ -22,10 +22,14 @@ local glue_code = nodecodes.glue local glyph_code = nodecodes.glyph local new_penalty = nodes.pool.penalty +local new_hlist = nodes.pool.hlist +local new_glue = nodes.pool.glue local free_node = node.free -local copynodelist = node.copy_list -local copynode = node.copy +local copy_list = node.copy_list +local copy_node = node.copy +local find_tail = node.tail + local texbox = tex.box local function hyphenatedlist(list) @@ -73,9 +77,9 @@ local function applytochars(list,what,nested) applytochars(current.list,what,nested) context.endhbox() elseif id ~= glyph_code then - noaction(copynode(current)) + noaction(copy_node(current)) else - doaction(copynode(current)) + doaction(copy_node(current)) end current = current.next end @@ -90,10 +94,10 @@ local function applytowords(list,what,nested) local id = current.id if id == glue_code then if start then - doaction(copynodelist(start,current)) + doaction(copy_list(start,current)) start = nil end - noaction(copynode(current)) + noaction(copy_node(current)) elseif nested and (id == hlist_code or id == vlist_code) then context.beginhbox() applytowords(current.list,what,nested) @@ -104,9 +108,46 @@ local function applytowords(list,what,nested) current = current.next end if start then - doaction(copynodelist(start)) + doaction(copy_list(start)) end end commands.applytochars = applytochars commands.applytowords = applytowords + +function commands.vboxlisttohbox(original,target,inbetween) + local current = texbox[original].list + local head = nil + local tail = nil + while current do + if current.id == hlist_code then + local list = current.list + if head then + if inbetween > 0 then + local n = new_glue(0,0,inbetween) + tail.next = n + n.prev = tail + tail = n + end + tail.next = list + list.prev = tail + else + head = list + end + tail = find_tail(list) + tail.next = nil + current.list = nil + end + current = current.next + end + local result = new_hlist() + result.list = head + texbox[target] = result +end + +function commands.hboxtovbox(original) + local b = texbox[original] + local factor = tex.baselineskip.width / tex.hsize + b.depth = 0 + b.height = b.width * factor +end diff --git a/tex/context/base/supp-box.mkiv b/tex/context/base/supp-box.mkiv index 833096222..f78a8554c 100644 --- a/tex/context/base/supp-box.mkiv +++ b/tex/context/base/supp-box.mkiv @@ -1730,35 +1730,56 @@ %D These macros are used in reformatting footnotes, so they do %D what they're meant for. -\unexpanded\def\setvboxtohbox - {\bgroup - \ifdim\baselineskip<16pt \relax - \scratchdimen\baselineskip - \multiply\scratchdimen 1024 - \else - \message{cropping \baselineskip to 16pt}% - \scratchdimen\maxdimen - \fi - \divide\scratchdimen \hsize - \multiply\scratchdimen 64 - \xdef\vboxtohboxfactor{\withoutpt\the\scratchdimen}% - \egroup} +\newdimen\vboxtohboxslack +\newdimen\hboxestohboxslack + +% Create line and fake height of paragraph by messign with heights: +% a nice hack by DEK himself. + +%\unexpanded\def\setvboxtohbox +% {\bgroup +% \ifdim\baselineskip<16pt \relax +% \scratchdimen\baselineskip +% \multiply\scratchdimen 1024 +% \else +% \message{cropping \baselineskip to 16pt}% +% \scratchdimen\maxdimen +% \fi +% \divide\scratchdimen \hsize +% \multiply\scratchdimen 64 +% \xdef\vboxtohboxfactor{\withoutpt\the\scratchdimen}% +% \egroup} +% +% \unexpanded\def\startvboxtohbox +% {\bgroup +% \setvboxtohbox +% \setbox\scratchbox\hbox\bgroup} +% +% \unexpanded\def\stopvboxtohbox +% {\ifcase\vboxtohboxslack\else\hskip\zeropoint\!!minus\vboxtohboxslack\fi +% \egroup +% \dp\scratchbox\zeropoint +% \ht\scratchbox\vboxtohboxfactor\wd\scratchbox +% \box\scratchbox +% \egroup} + +% More modern: \unexpanded\def\startvboxtohbox - {\bgroup - \setvboxtohbox - \setbox\scratchbox\hbox\bgroup} + {\bgroup + \setbox\scratchbox\hbox\bgroup} \unexpanded\def\stopvboxtohbox - {\egroup - \dp\scratchbox\zeropoint - \ht\scratchbox\vboxtohboxfactor\wd\scratchbox + {\ifcase\vboxtohboxslack\else\hskip\zeropoint\!!minus\vboxtohboxslack\fi + \egroup + \ctxcommand{hboxtovbox(\number\scratchbox)}% \box\scratchbox \egroup} +% A possible reconstruction: + \unexpanded\def\convertvboxtohbox - {\setvboxtohbox - \makehboxofhboxes + {\makehboxofhboxes \setbox0\hbox{\unhbox0 \removehboxes}% \noindent\unhbox0\par} @@ -1776,6 +1797,42 @@ {\removehboxes}\unhbox0 \fi} +% And one special for notes: + +% \unexpanded\def\starthboxestohbox +% {\bgroup +% \beginofshapebox} +% +% \unexpanded\def\stophboxestohbox +% {\endofshapebox +% \doreshapebox +% {\hbox\bgroup +% \unhbox\shapebox +% \ifcase\hboxestohboxslack\else\hskip\zeropoint\!!minus\hboxestohboxslack\fi +% \egroup}% +% \donothing +% \donothing +% \donothing % get rid of penalties etc +% \innerflushshapebox +% \convertvboxtohbox +% \par +% \egroup} + +% More modern: + +\unexpanded\def\starthboxestohbox + {\bgroup + \setbox\scratchbox\vbox\bgroup} + +\unexpanded\def\stophboxestohbox + {\egroup + \ctxcommand{vboxlisttohbox(\number\scratchbox,\number\nextbox,\number\dimexpr\hboxestohboxslack)}% + \dontleavehmode + \unhbox\nextbox + \removeunwantedspaces + \par + \egroup} + %D \macros %D {unhhbox} %D diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 81e3fec30..406e567b3 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 : 06/10/13 12:24:08 +-- merge date : 06/10/13 22:31:59 do -- begin closure to overcome local limits and interference |