ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Guy Worthington <guyw@multiline.com.au>
Subject: Re: color band
Date: 23 Mar 2003 15:47:40 +0800	[thread overview]
Message-ID: <uisuar0bn.fsf@multiline.com.au> (raw)
In-Reply-To: <3E7CEABD.9DEBD96B@lamar.colostate.edu>

Idris S Hamid <ishamid@lamar.colostate.edu> 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).

  parent reply	other threads:[~2003-03-23  7:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-22 22:59 Idris S Hamid
2003-03-23  2:07 ` Matthew Huggett
2003-03-23  7:47 ` Guy Worthington [this message]
2003-03-23 21:15   ` Idris S Hamid
2003-03-23  8:56 ` Patrick Gundlach
2003-03-23 22:04 ` Idris S Hamid
2003-03-23 22:09   ` Re[2]: " Giuseppe Bilotta
2003-03-23 22:24     ` Idris S Hamid
2003-03-23 23:07       ` Re[2]: " Giuseppe Bilotta
2003-03-23 23:30         ` Re[3]: " Giuseppe Bilotta
2003-03-24  9:29         ` Re[2]: " Hans Hagen
2003-03-25 15:31           ` Idris S Hamid
2003-03-25 17:10             ` Hans Hagen
2003-03-25 17:14             ` Patrick Gundlach
2003-03-25 22:25               ` Idris S Hamid
2003-03-25 22:41                 ` Bill McClain
2003-03-25 22:44                 ` Patrick Gundlach
2003-03-27 15:42                   ` Idris S Hamid
2003-03-27 16:20                     ` Patrick Gundlach
2003-03-27 21:38                       ` Idris S Hamid
2003-03-27 17:16                     ` Hans Hagen
2003-03-27 15:45                   ` Idris S Hamid
2003-03-26  7:31               ` Hans Hagen
2003-03-26  8:01             ` Patrick Gundlach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uisuar0bn.fsf@multiline.com.au \
    --to=guyw@multiline.com.au \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).