21 Sep
2013
21 Sep
'13
6:46 p.m.
Hi, Wolfgang. I tried dropping in the Lua code, but it does not extract the text: \define[1]\StyleChapter{% \StyleChapterFramed{% \framed[align=right, frame=off]{% \startoverlay \color[ColourSecondaryLightest]{% \cldcontext{string.sub(#1,0,1)} } \vskip-1.9em\hskip1.2em#1 \stopoverlay } } } ! LuaTeX error [string "\directlua "]:1: bad argument #1 to 'sub' (string expected, got nil) I've tried a few variations: \directlua{string.sub(tex.sprint("\luatexluaescapestring{#1}") } \directlua{string.sub("\luatexluaescapestring{#1}",0,1)} \directlua{string.sub(tex.sprint("#1"),0,1)} \cldcontext{string.sub(tex.sprint("#1"),0,1)} Any ideas?