From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/11593 Path: main.gmane.org!not-for-mail From: Guy Worthington Newsgroups: gmane.comp.tex.context Subject: Re: color band Date: 23 Mar 2003 15:47:40 +0800 Sender: ntg-context-admin@ntg.nl Message-ID: References: <3E7CEABD.9DEBD96B@lamar.colostate.edu> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1048405432 1254 80.91.224.249 (23 Mar 2003 07:43:52 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 23 Mar 2003 07:43:52 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sun Mar 23 08:43:51 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18x091-0000K6-00 for ; Sun, 23 Mar 2003 08:43:51 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id A105610B42; Sun, 23 Mar 2003 08:43:59 +0100 (MET) Original-Received: from mail.multiline.com.au (mail.multiline.com.au [203.5.127.26]) by ref.ntg.nl (Postfix) with ESMTP id 470DE10AE8 for ; Sun, 23 Mar 2003 08:41:03 +0100 (MET) Original-Received: from ARROWCOMPUTER (maxppp253.multiline.com.au [202.154.72.53] guyw@multiline.com.au) by mail.multiline.com.au with ESMTP (IOA-IPAD 3.70g/96) id 29D4F00 for ; Sun, 23 Mar 2003 15:38:49 +0800 X-Mailer: emacs 21.2.1 (via feedmail 8 I) Original-To: ntg-context@ntg.nl In-Reply-To: <3E7CEABD.9DEBD96B@lamar.colostate.edu> Original-Lines: 63 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:11593 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:11593 Idris S Hamid writes: > Dear syndicate, > > For a book cover I want a green-colored rectangular band, centered, at > the very top of the page, with text in some other color (to be > determined) overlapping the band. The band is small, just, say, 2cm > high and 12 cm wide. Since it's at the top it is surrounded by white > on only three sides. I'm not even sure where to get started here (I > don't think the LaTeX Graphics Companion will be much help:->) The LaTeX Graphics Companion always helps; in this case chapter 3. In chapter 3, you'll find an excellent package called mfpic (I've been meaning to trial it with ConTeXt, but have just put it off). The package mfpic is plain-compatible and is a much better solution to the one I'm posting. Note: this is a plain-TeX file and should be run with command the pdfTeX. If this file doesn't work on your system, it's because to get the kind of access privileges to run it, you may have to sleep with your computer technician. ----- %output=pdf \input supp-pdf \immediate\openout0=\jobname.mp \toks0={beginfig(1) verbatimtex \font\titlefont=cmr7 scaled \magstep 5 etex ; fill unitsquare xscaled 12cm yscaled 2cm withcolor 0.5green ; label.top(btex \titlefont My label etex,(6cm,0.5cm)) withcolor white; endfig; end .} \immediate\write0{\the\toks0} \immediate\closeout0 \immediate\write18{mpost \jobname.mp} \centerline{\convertMPtoPDF{\jobname.1}{1}{1}} \vskip 3cm \noindent MY ABSTRACT \bye ----- Although the metapost graphic looks imposing, it is fairly self-contained, with the title font switch (\titlefont) declared in the verbatimtex block, and the position of the title text inside the green rectangular band being positioned manually at (6cm,0.5cm). Similary, I've chosen the color of the rectangle by eye (0.5green) and the color of the text (white). > [snipped] If you're having trouble with the \shipout routine, best follow up to comp.text.tex (even though Hans Hagen's handle on plain-TeX is second only to DEK's).