Hey folks, This code, as far as I remember, was working fine a few days ago but now craps out with: system > begin file Source/Handbook.tex at line 1 system > begin file Source/Environment at line 2 ! LuaTeX error ...text/tex/texmf-context/tex/context/base/data-env.lua:234: bad argument #1 to 'gsub' (string expected, got nil). system > tex > error on line 1 in file Source/Handbook.tex: LuaTeX error ... 1 >> \startproduct Handbook 2 \environment Source/Environment /Makefile --------------------------------------------- CONTEXT_PRODUCT = Source/Handbook.tex ALL_SOURCE = $(shell find Source/ -type f -name '*.tex' -exec echo "{}" \; | sed 's/ /\\ /g') OUTPUT = Handbook.pdf CONTEXT_OPTIONS = --purgeresult --nonstopmode all: $(OUTPUT) Makefile $(OUTPUT): $(ALL_SOURCE) context $(CONTEXT_PRODUCT) --result=$(OUTPUT) $(CONTEXT_OPTIONS) clean: @ context --purgeall --nonstopmode --noconsole #&> /dev/null @ rm -vf $(OUTPUT) Handbook.pdf -------------------------------------- /Source/Environment.tex --------------------------------------------- \startenvironment Environment % Speedup typescripting considerably at the cost of using additional memory... \preloadtypescripts %\usemodule[units,simplefonts] \usemodule[units] % Setup PDF metadata... \setupinteraction [state=start, color=red, title=Handbook] % Show the PDF bookmarks and expand to the chapter and section level... \placebookmarks[chapter,section,subsection,subsubsection][chapter,section] \setupinteractionscreen[option=bookmark] \setupbackgrounds [rightpage] [background=] % Set compression level, default is 3, so set to maximum... \setupbackend [level=9] \setupsystem [\c!random=\v!big] \setuplayout [\c!location=\v!middle, \c!style=\ss, \c!backspace=2.5cm, \c!topspace=1.5cm, \c!width=16cm, \c!margindistance=.25cm, \c!margin=2.5cm, \c!height=\v!middle] % re-defined because the default rscale=1.075 for modern doesn't % look right \starttypescript [palatino] \definetypeface [palatino] [rm] [serif] [palatino] [default] \definetypeface [palatino] [ss] [sans] [modern] [default] \definetypeface [palatino] [tt] [mono] [modern] [default] \definetypeface [palatino] [mm] [math] [palatino] [default] \stoptypescript \usetypescript[palatino][ec] \setupbodyfont[palatino,11pt] %\setupbodyfont[ubuntu,11pt][file:ubuntu-r][features=default] \definefontsynonym[chapternumberfont][RegularBold] \definefontsynonym[chaptertextfont] [RegularBold] \definebodyfont[11pt][rm][bfe=RegularBold at 30pt] \definebodyfont[11pt][rm][bft=RegularBold at 30pt] %\setmainfont[Ubuntu] %\switchtobodyfont[11pt] \definelayout [fullpage] [\c!backspace=0pt, \c!topspace=0pt, \c!width=\v!middle, \c!height=\v!middle, \c!header=0pt, \c!footer=0pt] \setuppagenumbering [\c!alternative=\v!doublesided] \def\startchapter#1% {\chapter[#1]{#1}\index{#1}} \def\startsection#1% {\section[#1]{#1}\index{#1}} \def\startsubsection#1% {\subsection[#1]{#1}\index{#1}} \def\startsubsubsection#1% {\subsubsection[#1]{#1}\index{#1}} \def\StartTimelineDate#1% {\subsubsubject{\bf #1}} \def\StopTimelineDate% { \crlf } \def\StartTimelineDocument% { \crlf \startframedtext[width=broad,bottom=\vss,top= \vss,align=right,corner=round] \it } \def\StopTimelineDocument% { \stopframedtext \crlf } % Usage: \href{http://www.someurl.com}{Text} \def\href#1#2{\useURL[#2][{#2}][][{#1}]\goto{\url[#2]}[url(#1)]} \def\ahref#1{\color[linkcolor]{\ttx \href{#1}{<#1>}}} \def\fullahref#1{\color[linkcolor]{\ttx \href{#1}{#1}}} \def\mailto#1{\useURL[#1][mailto:#1][][#1]\from[{#1}]} \def\MailTo#1#2{\useURL[#1][mailto:#1][][#2]\from[{#1}]} \def\ShellExample#1 { \blank \startframedtext[width=broad,bottom=\vss,top= \vss,align=right,corner=round] \tt {#1} \stopframedtext \blank } \def\startexample {\blank \begingroup} \def\stopexample {\endgroup \blank} \def\startreality {\blank \page[\v!preference] \begingroup} \def\stopreality {\relax \endgroup \blank} \defineframedtext [MiniFile] [\c!width=25em, \c!offset=0.25ex, \c!bodyfont=7pt, \c!background=\v!color, \c!backgroundcolor=GrayColor, \c!backgroundoffset=.25ex, \c!frame=\v!off, \c!before=, \c!after=] % Number formulae etc. using the chapter number... \setupnumbering [way=bychapter] \setuppagenumbering [\c!location=] \setuptolerance [\v!verytolerant,\v!stretch] \setupblank [\v!medium] \setupwhitespace [\v!medium] \setuptyping [\c!blank=\v!medium] \setupheadertexts [\v!margin] [][\hfill\pagenumber\hfill] \setupfootertexts [\v!margin] [][{\hfill\doifnotmode{*\v!frontpart}{\getmarking[\v!chapter\v! number]}\hfill}] \setupheadertexts [\v!text] [][{\hfill\getmarking[\v!chapter]\hfill}] %\setupfootertexts % [\v!text] % [][{\hfill\getmarking[\v!section]\hfill}] \setupbodyfontenvironment [default] [em=italic] \setupsectionblock[\v!frontpart] [\c!page=\v!yes] \setupsectionblock[\v!bodypart] [\c!page=\v!yes] \setupsectionblock[\v!appendix] [\c!page=\v!yes] \setupsectionblock[\v!frontpart] [\c!before=,\c!after=] \setuphead [\v!chapter] [\c!command=\PlaceSection, \c!page=\v!yes, \c!before=, \c!header=\v!nomarking, \c!style=\bfd] \setuphead [\v!title] [\c!command=\PlaceSection, \c!page=\v!right, \c!before=, \c!header=\v!nomarking, \c!style=\bfd] \setuphead [\v!section] [\c!command=\PlaceSection, \c!inbetween=, \c!style=\bfb] \setuphead [\v!subsection] [\c!command=\PlaceSection, \c!before=\blank, \c!style=\bfa] \setuphead [\v!subsubsection] [\c!command=\PlaceSection, \c!before=\blank, \c!style=\bsa] \def\PlaceSection#1#2% {\goodbreak \vbox {\localheadsetup \begstrut \inleftmargin{\hbox to \leftmarginwidth{\hss#1\hss}}% #2}} \setupcaptions[width=14cm,align=right] \setMPtext{text}{some test text} \startusableMPgraphic{text} picture r ; r := image ( graphictext \MPstring{text} randomized .4pt scaled 6pt withfillcolor .8\MPcolor{maincolor} withpen pencircle scaled 1pt ; ) ; draw r ; \stopusableMPgraphic \setuptype [\c!option=\v!slanted] \setuptyping [\c!option=\v!slanted] \setuplist [\v!section] [\c!width=3em] \defineregister [texmacro] [texmacros] \setupregister [texmacro] [\c!indicator=\v!off, \c!distance=1em minus .25em] \setupfootnotes [\c!rule=\v!on] \setuphead [\v!chapter] [\c!header=\v!empty] \setupitemgroup[\v!itemize] [\v!each] [\c!headstyle=\v!bold] \setupitemgroup[\v!itemize] [\v!each] [\v!stopper] \setupsubpagenumber [\c!way=\v!by\v!chapter, \c!state=\v!start] \stopenvironment --------------------------------------------- /Source/Handbook.tex --------------------------------------------- \startproduct Handbook \environment Source/Environment \startfrontmatter \completecontent \stopfrontmatter \startbodymatter \component Source/Preface/Preface \stopbodymatter \startappendices \completeindex \stopappendices \startbackmatter \stopbackmatter \stopproduct --------------------------------------------- /Source/Preface/Preface.tex --------------------------------------------- \startchapter{Preface} Foo --------------------------------------------- Any help would be much appreciated. I am using ConTeXt version 2011.06.23 23:59. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com