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?
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to