ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: "ConTeXt" <ntg-context@ntg.nl>
Subject: Re: Framed + Textrule
Date: Thu, 15 Feb 2001 09:37:52 +0100	[thread overview]
Message-ID: <3.0.6.32.20010215093752.0163db10@server-1> (raw)
In-Reply-To: <009f01c096d2$0c1d01a0$a3ccfea9@nuovo>

At 03:41 PM 2/14/01 +0100, Giuseppe Bilotta wrote:
>I wrote:
>
>> >Hello, is there a way to combine framing and textrule?
>> >
>> >The effect I would like to obtain is something of the sort:
>> >[fixed width chars to see it properly]
>> >
>> >+---- A title text --------------+
>> >
>> >| Text text text text text text  |
>> >| text text text text text text  |
>> >| text text text text text text  |
>> >| text text text text text text  |
>> >
>> >+--------------------------------+
>
>Uwe Koloska wrote:
>> 
>> Just have a look at the metafun manual p. 196 (screen).  You only have to 
>> delete the frame around "A title text" (or "Zapf (1)" in the manual)
>> 
>> Maybe it's possible without context by tricking with overlay ...
>> 
>
>Well, that's surely a workaround, and it would also allow funnier
>frames (ovals, etc) with text. But I was hoping for a ConTeXt-only

You can do this with just frames, that is:

\def\LessBeautiful%
  {\startoverlay
     {\framed
        [corner=round,
         width=\overlaywidth,
         height=\overlayheight]
        {}}
     {\vbox to \overlayheight
        {\vskip-\ht\strutbox
         \hbox to \overlaywidth
           {\hskip3em
            \framed
              [corner=round,
               background=color,
               backgroundcolor=white]
              {\LessBeautifulString}
            \hss}
         \vfill}}
   \stopoverlay}

\setupcolors[state=start]

\defineoverlay[LessBeautiful][\LessBeautiful]

\def\LessBeautifulString{Whow}

\startframedtext[background=LessBeautiful,frame=off]
  \input tufte
\stopframedtext

But mp graphics are of course better. 

>solution, without pulling in metafun (it slows down compilation
>a lot, you know, and if it's not strictly necessary I would
>prefer to go without).

The slow down depends on what you do, if you reuse graphics, the trade off
is not that high. For this kind of docs, you can also run texexec with
--nomprun and process the graphics afterwards. 

Hans
-------------------------------------------------------------------------
                                  Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


      reply	other threads:[~2001-02-15  8:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-13 15:19 Giuseppe Bilotta
2001-02-14  1:23 ` Uwe Koloska
2001-02-14 14:41   ` Giuseppe Bilotta
2001-02-15  8:37     ` Hans Hagen [this message]

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=3.0.6.32.20010215093752.0163db10@server-1 \
    --to=pragma@wxs.nl \
    --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).