problem: long descriptions
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? Another unrelated question: is there a bold typewriter (CM) font somewhere?
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 -------------------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Zeljko Vrba