[NTG-context] block with different formatting per line?

Aditya Mahajan adityam at umich.edu
Wed Feb 6 20:45:44 CET 2013


On Wed, 6 Feb 2013, Bill Meahan wrote:

> On 02/01/2013 06:16 PM, Ingo Hohmann wrote:
>> Hi,
>> 
>> is it possible to define a block, where lines are automatically formatted 
>> differently?
>> For example:
>> first line in caps,
>> second in bold,
>> others normal.
>> 
>> Is this possible? And how?
>
> My #1 "Wish List" item for ConTeXt is /allowing/ "stylesheets" at the 
> paragraph level. That would allow closer correspondence with what CSS/CSS3, 
> Scribus, ODT, EPUB3 &al do and make it much easier to write transformation 
> scripts whether XSLT, lua code, Perl code or whatever favorite tool one 
> wishes to use.
>
> I envision something like (psuedo code):
>
> \setupstylesheet[myparagraphstyle]
>  [font=AccanthisADF,
>  fontsize=12pt,
>  fontstyle=italic,
>  alignment=justified,
>  frame=no,
>  color=blue,
>  width=\textwidth,
>  &c ....
>  ]
>
> \starttext
>
>  \startparagraph[style=mystylesheet]
>    \input tufte
>  \stopparagraph
>
>  \input knuth
>
> \stoptext

framedtext already does most of this (except that it makes the paragraphs 
unbreakable across pages). I don't remember if backgrounds has all the 
relevant keys.

Aditya


More information about the ntg-context mailing list