ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: problem: long descriptions
Date: Sat, 09 Nov 2002 18:23:55 +0100	[thread overview]
Message-ID: <5.1.0.14.1.20021109182252.033e34e0@remote-1> (raw)
In-Reply-To: <20021109080616.GA1623@fly.srk.fer.hr>

At 09:06 AM 11/9/2002 +0100, you wrote:

>Hi! I'm writing reference manual for a C/C++ library and I have the
>following problem: When I define a description, long prototypes are not
>line-broken. For example, I've set up
>
>\definedescription
>   [methref]
>   [location=top,headstyle=\tt]
>
>When I have
>\startmethref{a very long prototype.........................}
>blah blah blah
>\stopmethref
>
>the argument is not line-broken and it goes out of the page boundary. The
>text shows properly only in the next line. I have something like the following
>in mind, but I don't know how to do it:
>
>I'd like the typeset layout to look something like this
>
>a very long prototype proto..  Text describing the method
>proto proto proto proto proto  Text describing the method
>proto proto                    Text describinb the method
>More text describing the method. More text. More text
>More text.
>
>Prototype may be framed. The text widths should be 0.5 and 0.5 of textwidth
>for both the prototype and the description.
>
>I hope you understood what I want :) I was thinking something like typesetting
>prototype in the box and then using floating mechanism (\startXXXleft, would
>that work at all?), but is there a more straightforward way?

How about:

\definefloat[Prototype]
\setupfloat[Prototype][default={left,none}]

% default is a new parameter, you need a recent version fot this, else
% \placePrototype[left]{none}

\defineframedtext[Prototype][width=.5\textwidth,bodyfont=8pt]

\placePrototype\empty
\startPrototype
\input knuth
\stopPrototype
\input tufte

\def\StartPrototype{\placePrototype\empty\startPrototype}
\def\StopPrototype {\stopPrototype}

\StartPrototype
\input knuth
\StopPrototype
\input tufte

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

      reply	other threads:[~2002-11-09 17:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-09  8:06 Zeljko Vrba
2002-11-09 17:23 ` 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=5.1.0.14.1.20021109182252.033e34e0@remote-1 \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ref.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).