[NTG-context] margin in TocEntry definition

jbf roma83537 at gmail.com
Fri Mar 12 01:03:31 CET 2021


Re: indented line in TocEntry definition:

I have come up with what is probably an inelegant solution (using \-\ so 
that \hskip is recognised at the beginning of a line), but it works! 
Maybe someone could suggest how to make it more elegant, but for the 
moment, it's all I need!

\define[1]\SectionTocEntry{%
#1\crlf% title
\-\ \hskip 
.5cm\doifnot{\structurelistuservariable{author}}{}{\structurelistuservariable{author}}%
}

Julian

On 12/3/21 9:04 am, Bruce Horrocks wrote:
>> On 11 Mar 2021, at 02:20, jbf <roma83537 at gmail.com> wrote:
>>
>> Hi list,
>>
>> I have:
>>
>> \define[1]\SectionTocEntry{%
>> #1\crlf% title
>> \doifnot{\structurelistuservariable{author}}{}{\structurelistuservariable{author}}%
>>    }
>>
>> which successfully gives me a ToC with:
>>
>> Chapter title
>> Author name
>>
>> But I want the author name indented by .5cm and do not know how to use 'margin' in the above definition, or some other way of getting the indentation. I have tried various versions of 'margin' before the \doifnot part of the definition, but to no avail.
> There is a very similar previous question that might be what you are looking for.
> <https://www.mail-archive.com/ntg-context@ntg.nl/msg97548.html>
>
> Try that but use 'flushleft' instead of 'middle'.
>
>> Bruce Horrocks
> Hampshire, UK
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


More information about the ntg-context mailing list