Re: [NTG-context] deeptextcommand and firstcharacter

2013-09-21 Thread Hans Hagen
On 9/21/2013 7:50 AM, Thangalin wrote: Hi, The attached file does not compile in ConTeXt. However, if the \placeindex is substituted for \completeindex, then the document compiles. Any idea how to use a deeptextcommand and firstcharacter as shown in the attachment while also using the

Re: [NTG-context] deeptextcommand and firstcharacter

2013-09-21 Thread Thangalin
Hi, Most programming languages allow extraction of a character or substring from a string. For example, if I wanted to stylize the word Index: *I...* Index *...X* It would be handy to do something like: \bold{\getcharacter[1]{#!}}... #1 ...\bold{\getcharacter[\stringlength{#!}]} That is a

Re: [NTG-context] deeptextcommand and firstcharacter

2013-09-21 Thread Thangalin
Sorry, I missed a {#1}: \bold{\getcharacter[1]{#1}}... #1 ...\bold{\getcharacter[\ stringlength{#1}{#1}]} Best regards. ___ If your question is of interest to others as well, please add an entry to the Wiki!

Re: [NTG-context] deeptextcommand and firstcharacter

2013-09-21 Thread Wolfgang Schuster
Am 21.09.2013 um 19:11 schrieb Thangalin thanga...@gmail.com: Hi, Most programming languages allow extraction of a character or substring from a string. For example, if I wanted to stylize the word Index: I... Index ...X It would be handy to do something like:

Re: [NTG-context] deeptextcommand and firstcharacter

2013-09-21 Thread Thangalin
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)} }

Re: [NTG-context] deeptextcommand and firstcharacter

2013-09-21 Thread Thangalin
Ah, I think this does it: \cldcontext{string.sub(#1,0,1)}% Automatically expands the macro. Nice. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

Re: [NTG-context] deeptextcommand and firstcharacter

2013-09-21 Thread Wolfgang Schuster
Am 21.09.2013 um 20:46 schrieb Thangalin thanga...@gmail.com: 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

Re: [NTG-context] deeptextcommand and firstcharacter

2013-09-21 Thread Hans Hagen
On 9/21/2013 7:11 PM, Thangalin wrote: Hi, Most programming languages allow extraction of a character or substring from a string. For example, if I wanted to stylize the word Index: *I...* Index *...X* It would be handy to do something like: \bold{\getcharacter[1]{#!}}... #1

[NTG-context] deeptextcommand and firstcharacter

2013-09-20 Thread Thangalin
Hi, The attached file does not compile in ConTeXt. However, if the \placeindex is substituted for \completeindex, then the document compiles. Any idea how to use a deeptextcommand and firstcharacter as shown in the attachment while also using the firstcharacter macro? Thank you. Kindest