[NTG-context] Styling of included buffers or files
Jan U. Hasecke
juh+ntg-context at mailbox.org
Mon May 18 09:37:04 CEST 2020
Am 17.05.20 um 19:04 schrieb Marco Patzer:
>>
>> Is it somehow possible to apply styles to all buffers that gets
>> included via \getbuffer by defining a special getbuffer-style?
>
> \setupbuffer has before and after keys which can be used. Example:
>
> \setupbuffer
> [before=\blank\blackrule\startnarrower\BufferStyle,
> after=\stopnarrower\blackrule\blank]
>
> %% alternatively define custom buffers
> \definebuffer
> [foobar]
>
> \setupblackrules
> [width=1cm,
> height=1pt,
> color=gray]
>
> \definehighlight
> [BufferStyle]
> [style=smallitalic,
> color=blue]
>
> \startbuffer
> \samplefile{knuth}
> \stopbuffer
>
> \starttext
> \samplefile{knuth}
> \getbuffer
> \samplefile{knuth}
>
> \stoptext
>
So easy! I am humbled. For some reason I wasn't able to find this in
setup-en.pdf.
Thanks a lot.
juh
More information about the ntg-context
mailing list