# Re: [NTG-context] side figure and typing

[EMAIL PROTECTED] wrote:

Hi all !

let us imagine we have defined the following command:

\def\SideFigure#1#2#3#4#5%
{
\placefigure[#1]{#2}{\externalfigure[#3][width=#4\makeupwidth]}
#5
}

which can be used to put a figure aside a companion text...

but, what happens if the text is to be typed... ??

I guess this won't work:

\SideFigure{right}{pack2}{../figures/tcltk/pack2.jpg}{0.25}
{
\starttyping
pack .ok .cancel .help -side top
\stoptyping
}

How can I make it to work?

hm, you could just omit #5 and it would probably work

otherwise you would need to do do a multi step like:

\def\XXX#1#2#3#4%
{\begingroup
\obeylines\doXXX{#1}{#2}{#3}{#4}}

\long\def\doXXX#1#2#3#4#5%
{\place....[]{}{}\scantokens{#5}}

or so (untested and probably not correct)

Hans

-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context