\enablemode[paper]

\usemodule[pre-60]

\setupinteractionscreen
  [option=max]

\useMPlibrary
  [lua]

\setupcolors
  [state=start]

\definecolor[pagecolor]      [a=1,t=.125,r=.5]
\definecolor[textcolor]      [a=1,t=.5,  r=.5]
\definecolor[morecolor]      [a=1,t=.5,  b=.5]
\definecolor[luaplanetcolor] [a=1,t=.125,b=.5]
\definecolor[luaholecolor]   [a=1,t=.125,s=1]
\definecolor[luaorbitcolor]  [a=1,t=.125,s=.5]

\startuseMPgraphic{moon}
    fill OverlayBox withcolor \MPcolor{pagecolor} ;
    \includeMPgraphic{lualogo}
    luaextraangle := 0 ;
    picture p ; p := lualogo ;
    if LastPageNumber > 2 :
        luaextraangle := - PageFraction * 360 ;
    else :
        luaextraangle := 0 ;
    fi ;
    picture q ; q := lualogo ;
    setbounds q to boundingbox p ;
    numeric delta ; delta := 150 ;
    numeric delta ; delta := 25 ;
    draw q xsized (OverlayWidth-delta) shifted center OverlayBox ;
    setbounds currentpicture to boundingbox OverlayBox ;
\stopuseMPgraphic

\setuppapersize
  [S66][S66]

\setuplayout
  [width=middle,
   height=middle,
   backspace=60pt,
   topspace=60pt,
   header=0pt,
   footer=0pt]

\setuplayout
  [bottom=20pt,
   bottomspace=50pt]

\setupinteraction
  [state=start,
   click=off,
   menu=on,
   style=,
   color=luaplanetcolor,
   contrastcolor=luaplanetcolor]

\startinteractionmenu[bottom]
  \but [firstpage]               \symbol[firstpage]      \\
  \but [previouspage]            \symbol[previouspage]   \\
  \but [InvokeStepper] \StartBusy\symbol[PauseRendering]\StopBusy \\
  \but [nextpage]                \symbol[nextpage]       \\
  \but [lastpage]                \symbol[lastpage]       \\
  \but [CloseDocument]           \symbol[CloseDocument]  \\
\stopinteractionmenu

\setupinteractionmenu
  [bottom]
  [color=luaplanetcolor,
   contrastcolor=luaplanetcolor,
   style=\tfa, % acceptable
   left=\hfill,
   middle=,
   right=,
   height=\bottomheight,
   width=2\bottomheight,
   offset=overlay,
   frame=off]

\setupbackgrounds
  [page]
  [background=moon]

\defineoverlay
  [moon]
  [\useMPgraphic{moon}]

\setupcolors[state=start]

\setuphead
  [chapter]
  [number=no,
   style=\bfc,
   color=textcolor]

\setupitemize
  [each]
  [packed]

\setupitemize
  [each]
  [color=morecolor]

\usetypescriptfile[type-ghz]

% \definetypeface [mainface] [ss] [sans] [optima-nova] [default]
% \definetypeface [mainface] [tt] [mono] [modern]      [default]

\definebodyfontenvironment[20pt]

\usetypescript[optima-nova][texnansi]
\setupbodyfont[optima,20pt]

\starttext

\startstandardmakeup
    \vfill
    \scale
      [factor=max]
      {\framed
         [align={lohi},foregroundcolor=textcolor,frame=off]
         {More or Less\\Less or More}}
    \vfill
    \vfill
\stopstandardmakeup

\chapter{Objectives}

\StartSteps

\startitemize
\item add (non macro based) scripting to \TeX \FlushStep
\item bring OpenType into the engine \FlushStep
\item provide interfaces to internals for macro writers \FlushStep
\item make the engine suitable for more complex scripts \FlushStep
\stopitemize

\StopSteps

\chapter{Status}

\StartSteps

\startitemize
\item triggered by experiment with SciTE and Lua \FlushStep
\item started as a pet project of Hans and Hartmut \FlushStep
\item Taco got interested as well \FlushStep
\item became adopted by the pdf\TeX\ team \FlushStep
\item got a development grant from csu (Idris) \FlushStep
\item beta version will be launched at TUG 2007 \FlushStep
\item production version available somewhere in 2008 \FlushStep
\stopitemize

\StopSteps

\chapter{Development}

\StartSteps

\startitemize
\item mainly done by Taco and Hans (man-years) \FlushStep
\item quite extensive exchange of code and tests (Skype) \FlushStep
\item testing in real situations (manuals, documents) \FlushStep
\item throw away code and redesign when needed \FlushStep
\item still on a (very tight) schedule \FlushStep
\stopitemize

\StopSteps

\chapter{Tasks}

\StartSteps

\startitemize
\item switch to 16/32 bits where needed \FlushStep
\item replace the io machinery \FlushStep
\item replace the file searching \FlushStep
\item incorporate aleph features when applicable \FlushStep
\item add open type font readers and embedders \FlushStep
\item provide more flexible hyphenation \FlushStep
\item provide list manipulation \FlushStep
\stopitemize

\StopSteps

\chapter{Experiments}

\StartSteps

\startitemize
\item logging at several levels \FlushStep
\item reading from zip and using protocols \FlushStep
\item conversions normally done in macros \FlushStep
\item error handling (much work to be done) \FlushStep
\item caching data when possible (speed-up) \FlushStep
\item (virtual) fonts finally accessible \FlushStep
\stopitemize

\StopSteps

\chapter{Insights}

\StartSteps

\startitemize
\item 8 bit output: using private area in unicode (\type{"10FF00}) \FlushStep
\item use lua\TeX\ as Lua engine (\type{--luaonly}, \type{luatexlua}, \type{*.lua/luc}) \FlushStep
\item bytecode arrays, ini files, starting up issues \FlushStep
\item stick to Lua state 0 for main things \FlushStep
\item looping over bytepairs and UTF-8 \FlushStep
\item rounding around zero (non E syntax) \FlushStep
\item include a couple of libraries \FlushStep
\item many small details (that we try to document in a history) \FlushStep
\stopitemize

\StopSteps

\chapter{\TeX}

\StartSteps

\startitemize
\item tables: texio, kpse, tex, font, statistics, texconfig, callback \FlushStep
\item libraries and extensions: lua, lfs, zip, unicode \FlushStep
\item access to \TeX's internal variables (will be more) \FlushStep
\item access to registers \FlushStep
\item access to box dimensions \FlushStep
\item hooks into logging (start/stop etc) \FlushStep
\item defining fonts \FlushStep
\item loading fonts \FlushStep
\stopitemize

\StopSteps

\chapter{Communication}

\StartSteps

\startitemize
\item \type {tex.print}      : lines \FlushStep
\item \type {tex.sprint}     : no space and endline stuff \FlushStep
\item \type {tex.write}      : just text \FlushStep
\item \type {texio.write}    : terminal or log \FlushStep
\item \type {texio.write_nl} : terminal or log on line \FlushStep
\stopitemize

\StopSteps

\chapter{Kpse}

\StartSteps

\startitemize
\item locating files \FlushStep
\item loading files (handles or blobs) \FlushStep
\item only pops in when used \FlushStep
\item can be completely overloaded \FlushStep
\stopitemize

\StopSteps

\chapter{Not so Lua}

\StartSteps

\startitemize
\item catcode tables \FlushStep
\item clear marks \FlushStep
\item scantextokens \FlushStep
\item (everyline) \FlushStep
\item \unknown \FlushStep
\stopitemize

\StopSteps

\chapter{Impact}

\StartSteps

\startitemize
\item less files (esp fonts) \FlushStep
\item simple tree \FlushStep
\item zip based distributions \FlushStep
\item different solutions for similar problems \FlushStep
\item stable for many years due to simplicity \FlushStep
\item stand out in font handling \FlushStep
\stopitemize

\StopSteps

\chapter{Is this all?}

\StartSteps

\startitemize
\item even I forget what is already there \FlushStep
\item there will be more (and less) \FlushStep
\stopitemize

\StopSteps

\stoptext
