ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* side figure and typing
@ 2004-07-23 10:12 jimarin
  2004-07-23 18:43 ` Hans Hagen Outside
  2004-07-23 19:14 ` Willi Egger
  0 siblings, 2 replies; 4+ messages in thread
From: jimarin @ 2004-07-23 10:12 UTC (permalink / raw)


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?

thanks !

-------------------------------------------------
Jose Ignacio Marín Alberdi

Bayes Inference, S.A.
c/ Gran Vía, Nº39, 5º, E-28013 MADRID
 Tfn (91) 532.74.40, Fax (91) 532.26.36
-------------------------------------------------
email: jimarin@bayesinf.com
-------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: side figure and typing
  2004-07-23 10:12 side figure and typing jimarin
@ 2004-07-23 18:43 ` Hans Hagen Outside
  2004-07-23 19:14 ` Willi Egger
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen Outside @ 2004-07-23 18:43 UTC (permalink / raw)


jimarin@bayesinf.com 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
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: side figure and typing
  2004-07-23 10:12 side figure and typing jimarin
  2004-07-23 18:43 ` Hans Hagen Outside
@ 2004-07-23 19:14 ` Willi Egger
  2004-07-24  6:29   ` Hans Hagen Outside
  1 sibling, 1 reply; 4+ messages in thread
From: Willi Egger @ 2004-07-23 19:14 UTC (permalink / raw)


Hi,

If you place the 5th parameter in a buffer, it works with the following 
version of ConTeXt and pdfTeX.

pdfeTeXk, Version 3.141592-1.11a-2.1 (Web2c 7.5.2)
ConTeXt  ver: 2004.6.30 (beta)

\startbuffer[test]
\starttyping
pack .ok .cancel .help -side top
\stoptyping
\stopbuffer

\starttext

\SideFigure{right}{pack2}{figure.jpg}{0.25}
{
\getbuffer[test]
}

\stoptext


kind regards Willi

jimarin@bayesinf.com 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?
> 
> thanks !
> 
> -------------------------------------------------
> Jose Ignacio Marín Alberdi
> 
> Bayes Inference, S.A.
> c/ Gran Vía, Nº39, 5º, E-28013 MADRID
>  Tfn (91) 532.74.40, Fax (91) 532.26.36
> -------------------------------------------------
> email: jimarin@bayesinf.com
> -------------------------------------------------
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: side figure and typing
  2004-07-23 19:14 ` Willi Egger
@ 2004-07-24  6:29   ` Hans Hagen Outside
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen Outside @ 2004-07-24  6:29 UTC (permalink / raw)


Willi Egger wrote:

> \startbuffer[test]
> \starttyping
> pack .ok .cancel .help -side top
> \stoptyping
> \stopbuffer

\startbuffer[test]
pack . ....
\stopbuffer

> \starttext
>
> \SideFigure{right}{pack2}{figure.jpg}{0.25}
> {
> \getbuffer[test]

\typebuffer[test]

> }

Hans

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-07-24  6:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-23 10:12 side figure and typing jimarin
2004-07-23 18:43 ` Hans Hagen Outside
2004-07-23 19:14 ` Willi Egger
2004-07-24  6:29   ` Hans Hagen Outside

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).