Re: [NTG-context] help at layout
Boris Pedrofiets wrote: Hello, I want to make a layout where a vertical line is putted at the rigth of the left margin. Capters and paragraphs must indent in the left margin, and be boxed. Someting like: The important trick is to define a special command that does the typesetting of the chapter number + text, I hope you're not too scared of low-level TeX, because in the actual example below I've added some low-level stuff to fiddle with the outdent. This is the basic setup for the chapter command: \setupcolors[state=start] \def\Boxedchapter#1#2% {\framed[background=color, backgroundcolor=white]{#1.~#2}} \setuphead[chapter][command=\Boxedchapter] The color commands are needed so that the background of the chapter head overwrites the line in the margin. That line is a single command, btw: \setupbackgrounds[text][leftmargin][state=start,rightframe=on] Also, I've added a \blank in the example below so that a bit of the line sticks out above the framed text, that looks better, I think. You can look up other options for \setupbackgrounds, \framed and \setuphead in http://texshow.contextgarden.net, or use your local 'texshow' command. Greetings, Taco % start \setupcolors[state=start] \setupbackgrounds[text][leftmargin][state=start,rightframe=on] \newdimen\outdentchapter \outdentchapter=1cm % change this for more or less outdent \def\Boxedchapter#1#2% {\advance\hsize\outdentchapter \vbox {\moveleft\outdentchapter \vbox {\blank[2*line] \framed[background=color, backgroundcolor=white]{#1.~#2 \setuphead[chapter][command=\Boxedchapter] \starttext \chapter{The first chapter} \input knuth \stoptext % end ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] help at layout
Thank you Taco. This is exactly what i needed! btw. I think I need to do layouts more often. What is good litterature about this subject? Boris From: Taco Hoekwater [EMAIL PROTECTED] Reply-To: mailing list for ConTeXt users ntg-context@ntg.nl To: mailing list for ConTeXt users ntg-context@ntg.nl Subject: Re: [NTG-context] help at layout Date: Tue, 13 Sep 2005 11:22:21 +0200 Boris Pedrofiets wrote: Hello, I want to make a layout where a vertical line is putted at the rigth of the left margin. Capters and paragraphs must indent in the left margin, and be boxed. Someting like: The important trick is to define a special command that does the typesetting of the chapter number + text, I hope you're not too scared of low-level TeX, because in the actual example below I've added some low-level stuff to fiddle with the outdent. This is the basic setup for the chapter command: \setupcolors[state=start] \def\Boxedchapter#1#2% {\framed[background=color, backgroundcolor=white]{#1.~#2}} \setuphead[chapter][command=\Boxedchapter] The color commands are needed so that the background of the chapter head overwrites the line in the margin. That line is a single command, btw: \setupbackgrounds[text][leftmargin][state=start,rightframe=on] Also, I've added a \blank in the example below so that a bit of the line sticks out above the framed text, that looks better, I think. You can look up other options for \setupbackgrounds, \framed and \setuphead in http://texshow.contextgarden.net, or use your local 'texshow' command. Greetings, Taco % start \setupcolors[state=start] \setupbackgrounds[text][leftmargin][state=start,rightframe=on] \newdimen\outdentchapter \outdentchapter=1cm % change this for more or less outdent \def\Boxedchapter#1#2% {\advance\hsize\outdentchapter \vbox {\moveleft\outdentchapter \vbox {\blank[2*line] \framed[background=color, backgroundcolor=white]{#1.~#2 \setuphead[chapter][command=\Boxedchapter] \starttext \chapter{The first chapter} \input knuth \stoptext % end ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context _ Stuur een voiceclip met MSN Messenger 7.5 http://www1.imagine-msn.com/Messenger/Video.aspx ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] help at layout
Boris Pedrofiets wrote: Thank you Taco. This is exactly what i needed! btw. I think I need to do layouts more often. What is good litterature about this subject? Just a few starters, hoping other people will can add stuff Do you want 'hands-on material'? - dunno. Or 'study material'? - R. Brinkhurst's 'The elements of typographic style' - Edward.R.Tufte (who writes about the presentation of information) Or documentation on 'How do I do this in ConTeXt'? - the standard context manuals have lots of examples - Knuth's TeX book - there are lots of things and pointers at http://contextgarden.net - ask this list Or just some fun stuff on the web? - http://www.philobiblon.com Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] help at layout
Hello, I want to make a layout where a vertical line is putted at the rigth of the left margin. Capters and paragraphs must indent in the left margin, and be boxed. Someting like: | | [ 2. Chapter ] -- | I'm new on this, so please help me out. Boris Vind alles terug op je PC: MSN Search Toolbar klik hier ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context