From e2826d557235ef9db2f9f8abb8c7b03496efbc0b Mon Sep 17 00:00:00 2001 From: Marius Date: Sun, 12 May 2013 16:00:23 +0300 Subject: beta 2013.05.12 14:50 --- tex/context/base/cont-fil.mkiv | 2 + tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4127 -> 4137 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/data-con.lua | 4 +- tex/context/base/font-map.lua | 54 ++-- tex/context/base/s-pre-41.mkiv | 297 +++++++++++++++++++++ tex/context/base/status-files.pdf | Bin 24684 -> 24712 bytes tex/context/base/status-lua.pdf | Bin 211585 -> 211447 bytes tex/generic/context/luatex/luatex-fonts-merged.lua | 4 +- 10 files changed, 339 insertions(+), 26 deletions(-) create mode 100644 tex/context/base/s-pre-41.mkiv (limited to 'tex') diff --git a/tex/context/base/cont-fil.mkiv b/tex/context/base/cont-fil.mkiv index db7505bcb..db09cee3e 100644 --- a/tex/context/base/cont-fil.mkiv +++ b/tex/context/base/cont-fil.mkiv @@ -81,6 +81,8 @@ %definefilesynonym [pre-more] [pre-29] %definefilesynonym [pre-more] [pre-30] +\definefilesynonym [pre-tiles] [pre-41] + \definefilesynonym [pre-stepwise] [pre-60] \definefilesynonym [pre-stepper] [pre-61] diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index d266c2c21..84d3a9d99 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.05.10 15:05} +\newcontextversion{2013.05.12 14:50} %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 0d3c8129a..daa7129a4 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 3bd3dcdf2..627f42e62 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.05.10 15:05} +\edef\contextversion{2013.05.12 14:50} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/data-con.lua b/tex/context/base/data-con.lua index ef1635714..240538df2 100644 --- a/tex/context/base/data-con.lua +++ b/tex/context/base/data-con.lua @@ -74,11 +74,11 @@ function containers.define(category, subcategory, version, enabled) end end -function containers.is_usable(container, name) +function containers.is_usable(container,name) return container.enabled and caches and caches.is_writable(container.writable, name) end -function containers.is_valid(container, name) +function containers.is_valid(container,name) if name and name ~= "" then local storage = container.storage[name] return storage and storage.cache_version == container.version diff --git a/tex/context/base/font-map.lua b/tex/context/base/font-map.lua index 4f16a1704..6988b9b9e 100644 --- a/tex/context/base/font-map.lua +++ b/tex/context/base/font-map.lua @@ -111,29 +111,43 @@ local function fromunicode16(str) return tonumber(str,16) else local l, r = match(str,"(....)(....)") - return (tonumber(l,16)- 0xD800)*0x400 + tonumber(r,16) - 0xDC00 + return (tonumber(l,16))*0x400 + tonumber(r,16) - 0xDC00 end end ---~ This is quite a bit faster but at the cost of some memory but if we ---~ do this we will also use it elsewhere so let's not follow this route ---~ now. I might use this method in the plain variant (no caching there) ---~ but then I need a flag that distinguishes between code branches. ---~ ---~ local cache = { } ---~ ---~ function mappings.tounicode16(unicode) ---~ local s = cache[unicode] ---~ if not s then ---~ if unicode < 0x10000 then ---~ s = format("%04X",unicode) ---~ else ---~ s = format("%04X%04X",unicode/1024+0xD800,unicode%1024+0xDC00) ---~ end ---~ cache[unicode] = s ---~ end ---~ return s ---~ end +-- Slightly slower: +-- +-- local p = C(4) * (C(4)^-1) / function(l,r) +-- if r then +-- return (tonumber(l,16))*0x400 + tonumber(r,16) - 0xDC00 +-- else +-- return tonumber(l,16) +-- end +-- end +-- +-- local function fromunicode16(str) +-- return lpegmatch(p,str) +-- end + +-- This is quite a bit faster but at the cost of some memory but if we +-- do this we will also use it elsewhere so let's not follow this route +-- now. I might use this method in the plain variant (no caching there) +-- but then I need a flag that distinguishes between code branches. +-- +-- local cache = { } +-- +-- function mappings.tounicode16(unicode) +-- local s = cache[unicode] +-- if not s then +-- if unicode < 0x10000 then +-- s = format("%04X",unicode) +-- else +-- s = format("%04X%04X",unicode/0x400+0xD800,unicode%0x400+0xDC00) +-- end +-- cache[unicode] = s +-- end +-- return s +-- end mappings.loadlumtable = loadlumtable mappings.makenameparser = makenameparser diff --git a/tex/context/base/s-pre-41.mkiv b/tex/context/base/s-pre-41.mkiv new file mode 100644 index 000000000..c0465934c --- /dev/null +++ b/tex/context/base/s-pre-41.mkiv @@ -0,0 +1,297 @@ +%D \module +%D [ file=s-pre-41, +%D version=2013.03.24, +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Environment 41, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D The Bacho\TeX\ 2013 style. + +\setupbodyfont[palatino,14.4pt] + +\setuppapersize[S6][S6] + +\definecolor[primarycolor] [.50(darkblue,darkgreen)] +\definecolor[secondarycolor][.25(darkblue,darkyellow)] +\definecolor[mixedcolor] [s=.35] + +\setupcolors + [textcolor=white] + +\setupalign + [flushleft,nothyphenated] + +\definemeasure[layoutunit][\dimexpr\paperheight/25] + +\setuplayout + [backspace=\measured{layoutunit}, + topspace=\measured{layoutunit}, + width=middle, + height=middle, + header=0pt, + footer=0pt] + +\definelayout + [content] + [backspace=.5\measured{layoutunit}, + topspace=.5\measured{layoutunit}] + +\definemeasure [topiclistwidth] [ + (\textwidth+\backspace)/ + \ifcase\numexpr\structurelistsize\relax 1 % 0 + \or1\or1\or1\or2\or1\or3\or3\or3\or3 % 1 - 9 + \or3\or3\or3\or3\or3\or3\or4 % 10 - 16 + \or4\or4\or4\or4\or % 17 - 20 + \else5 % 21 - 25 + \fi + -\backspace +] + +\definemeasure [topiclistheight] [ + (\textheight+\topspace)/ + \ifcase\numexpr\structurelistsize\relax 1 % 0 + \or1\or2\or3\or2\or5\or2\or3\or3\or3 % 1 - 9 + \or4\or4\or4\or4\or4\or4\or4 % 10 - 16 + \or5\or5\or5\or5\or5 % 17 - 20 + \else5 % 21 - 25 + \fi + -\topspace +] + +\definemeasure [topiclistfont] [\measured{topiclistwidth}/10] +\definemeasure [titlepagefont] [2\measured{layoutunit}] + +\defineframed + [topiclistentry] + [width=\measure{topiclistwidth}, + height=\measure{topiclistheight}, + background=color, + frame=off, + foregroundstyle={\definedfont[Bold at \measure{topiclistfont}]}, + backgroundcolor=primarycolor, + foregroundcolor=white] + +\setupwhitespace + [big] + +\setupblank + [big] + +\setupinteraction + [state=start, + color=, + contrastcolor=, + click=off] + +\definemakeup + [topic] + [standard] + [top=,bottom=] + +\definemakeup + [content] + [standard] + [top=,bottom=] + +\startsetups[topic:start] + \starttopicmakeup +\stopsetups + +\startsetups[topic:stop] + \vfill + \stoptopicmakeup +\stopsetups + +\predefinefont[MyTopicTitleFont][SerifBold*default at \measure{layoutunit}] + +\definehead + [topic] + [chapter] + [before=, + style=MyTopicTitleFont, + page=, + number=off, + interaction=list, + beforesection=\directsetup{topic:start}, + aftersection=\directsetup{topic:stop}] + +\setuplist + [topic] + [alternative=topic, + interaction=all] + +\definelistalternative + [topic] + [alternative=horizontal, + renderingsetup=topic:list] + +\startsetups[topic:list] + \dontleavehmode + \startcurrentlistentrywrapper + \topiclistentry{\currentlistentrytitle} + \stopcurrentlistentrywrapper + \blankspace +\stopsetups + +\defineoverlay[nextpage][\overlaybutton{nextpage}] +\defineoverlay[prevpage][\overlaybutton{prevpage}] +\defineoverlay[menupage][\overlaybutton{menupage}] +\defineoverlay[homepage][\overlaybutton{homepage}] + +\setupbackgrounds + [text] + [backgroundoffset=.5\measured{layoutunit}] + +% begin of buttons + +\defineframed + [bb] + [width=\dimexpr\overlaywidth/10, + height=\dimexpr\overlayheight/10, + background=color, + foregroundstyle=\bfa, + frame=off] + +\defineframed[nb] [bb] [empty=yes] +\defineframed[rb] [bb] [backgroundcolor=white,foregroundcolor=secondarycolor] +\defineframed[db] [bb] [backgroundcolor=mixedcolor,foregroundcolor=white] + +\definepushbutton [prev] +\definepushbutton [next] +\definepushbutton [menu] +\definepushbutton [home] + +\definepushsymbol [prev] [n] [\nb{prev}] +\definepushsymbol [prev] [r] [\rb{prev}] +\definepushsymbol [prev] [d] [\db{prev}] + +\definepushsymbol [next] [n] [\nb{next}] +\definepushsymbol [next] [r] [\rb{next}] +\definepushsymbol [next] [d] [\db{next}] + +\definepushsymbol [menu] [n] [\nb{menu}] +\definepushsymbol [menu] [r] [\rb{menu}] +\definepushsymbol [menu] [d] [\db{menu}] + +\definepushsymbol [home] [n] [\nb{home}] +\definepushsymbol [home] [r] [\rb{home}] +\definepushsymbol [home] [d] [\db{home}] + +\definelayer + [buttons] + [width=\dimexpr\textwidth+\measured{layoutunit}\relax, + height=\dimexpr\textheight+\measured{layoutunit}\relax] % a setups + +\startsetups [document:buttons] + + \setlayer + [buttons] + [preset=leftbottom,offset=-.25\measured{layoutunit}] + {\pushbutton[prev][previouspage]} + + \setlayer + [buttons] + [preset=rightbottom,offset=-.25\measured{layoutunit}] + {\pushbutton[next][nextpage]} + + \setlayer + [buttons] + [preset=lefttop,offset=-.25\measured{layoutunit}] + {\pushbutton[home][homepage]} + + \setlayer + [buttons] + [preset=righttop,offset=-.25\measured{layoutunit}] + {\pushbutton[menu][menupage]} + +\stopsetups + +\defineoverlay[setbuttons][\directsetup{document:buttons}] + +% end of buttons + +\startsetups [document:titlepage] + + \definebodyfontenvironment + [\measure{titlepagefont}] + + \setupbackgrounds + [page] + [background={color,menupage}, + backgroundcolor=secondarycolor] + + \setupbackgrounds + [text] + [background={color,menupage}, + backgroundcolor=secondarycolor] + + \starttopicmakeup[reference=homepage] + + \switchtobodyfont[\measure{titlepagefont}] + + \let\\=\crlf + + \startalignment[flushleft] + \bf + \setupinterlinespace + \begstrut\getvariable{document}{title}\endstrut\par + \stopalignment + + \vfill + + \startalignment[flushright] + \bf + \setupinterlinespace + \begstrut\getvariable{document}{subtitle}\endstrut\par + \stopalignment + + \stoptopicmakeup + + \setupbackgrounds + [page] + [background={color,homepage}, + backgroundcolor=secondarycolor] + + \setupbackgrounds + [text] + [background={color,menupage}, + backgroundcolor=secondarycolor] + + \startcontentmakeup[reference=menupage] + + \setupalign[tolerant,stretch,paragraph] + \flexiblebaselines + \placelist[topic][criterium=text] + + \stopcontentmakeup + + \setupbackgrounds + [page] + % [background={color,menupage}, + [background={color,invoke}, + backgroundcolor=primarycolor] + + \setupbackgrounds + [text] + % [background={color,nextpage,setbuttons,buttons}, + [background={color,setbuttons,buttons}, + backgroundcolor=secondarycolor] + +\stopsetups + +\setupdocument + [before=\directsetup{document:titlepage}] + +\continueifinputfile{s-pre-41.mkiv} + +\startdocument[title=Whatever We\\Want Here,subtitle=Whatever We\\Want There] + + \dorecurse{12}{\starttopic[title=Topic #1]\input tufte \stoptopic} + +\stopdocument diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 40d22aa6f..95976ecb7 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index 4d49447fb..ebf1e3758 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 008b02af7..0cc61b40d 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 : 05/10/13 15:05:28 +-- merge date : 05/12/13 14:50:50 do -- begin closure to overcome local limits and interference @@ -4650,7 +4650,7 @@ local function fromunicode16(str) return tonumber(str,16) else local l,r=match(str,"(....)(....)") - return (tonumber(l,16)- 0xD800)*0x400+tonumber(r,16)-0xDC00 + return (tonumber(l,16))*0x400+tonumber(r,16)-0xDC00 end end mappings.loadlumtable=loadlumtable -- cgit v1.2.3