* side-by-side
@ 2004-10-30 19:25 David Arnold
2004-10-31 12:16 ` side-by-side Patrick Gundlach
0 siblings, 1 reply; 5+ messages in thread
From: David Arnold @ 2004-10-30 19:25 UTC (permalink / raw)
All,
I have:
\page
\subject{Plotting}
With preliminaries completed, plotting is a simple matter.
\starttyping
>> x=linspace(-2,4);
>> y=x.^2-2*x-3;
>> plot(x,y)
>> xlabel('x')
>> ylabel('y')
>> title('y = x^2 -2x -3')
>> grid on
\stoptyping
\placefigure[none]{}{\externalfigure[slide1.png]}
I'd like to arrange this on my slide side-by-side, the code to the left,
the image to the right. If I we're doing this in Latex, I would probably
use minipage environments for this.
Can someone hint at the Context Way of doing this? I'd like my code
vertically centered on the left, the image on the right.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: side-by-side 2004-10-30 19:25 side-by-side David Arnold @ 2004-10-31 12:16 ` Patrick Gundlach 2004-10-31 18:06 ` side-by-side David Arnold 0 siblings, 1 reply; 5+ messages in thread From: Patrick Gundlach @ 2004-10-31 12:16 UTC (permalink / raw) Hi David, [...] > I'd like to arrange this on my slide side-by-side, the code to the left, > the image to the right. If I we're doing this in Latex, I would probably > use minipage environments for this. > Can someone hint at the Context Way of doing this? I'd like my code > vertically centered on the left, the image on the right. Is this what you want? \starttext \startbuffer >> x=linspace(-2,4); >> y=x.^2-2*x-3; >> plot(x,y) >> xlabel('x') >> ylabel('y') >> title('y = x^2 -2x -3') >> grid on \stopbuffer \placesidebyside{% \framed[align={lohi,right},frame=off]% {\typebuffer}} {\externalfigure [cow] [width=.5\textwidth]} \stoptext Patrick -- ConTeXt wiki: http://contextgarden.net ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: side-by-side 2004-10-31 12:16 ` side-by-side Patrick Gundlach @ 2004-10-31 18:06 ` David Arnold 2004-10-31 19:19 ` David Arnold 0 siblings, 1 reply; 5+ messages in thread From: David Arnold @ 2004-10-31 18:06 UTC (permalink / raw) Patrick, >Is this what you want? > > >\starttext >\startbuffer >>> x=linspace(-2,4); >>> y=x.^2-2*x-3; >>> plot(x,y) >>> xlabel('x') >>> ylabel('y') >>> title('y = x^2 -2x -3') >>> grid on >\stopbuffer > >\placesidebyside{% >\framed[align={lohi,right},frame=off]% > {\typebuffer}} >{\externalfigure > [cow] > [width=.5\textwidth]} >\stoptext Patrick, this would be what I want, but in my preamble I have: \setuptyping [before={\startframedtext[width=\makeupwidth, background=screen, backgroundscreen=0.8]}, after={\stopframedtext}, color=darkred] Which seems to be getting in the way of your idea functioning properly. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: side-by-side 2004-10-31 18:06 ` side-by-side David Arnold @ 2004-10-31 19:19 ` David Arnold 2004-10-31 20:57 ` side-by-side Patrick Gundlach 0 siblings, 1 reply; 5+ messages in thread From: David Arnold @ 2004-10-31 19:19 UTC (permalink / raw) Patrick et al, I got around my last problem by defining a new typing environment, so the idea below is almost working the way I want. I have: \startbuffer >> x=linspace(-2,4); >> y=x.^2-2*x-3; >> plot(x,y) >> xlabel('x') >> ylabel('y') >> title('y = x^2 -2x -3') >> grid on \stopbuffer \placesidebyside{% \framed[align={lohi,right}, frame=on, offset=10pt, background=screen, screen=0.8, foregroundcolor=darkred]{\typebuffer}} {\externalfigure[slide1.pdf]} My graphic slide1.pdf is about the right size, so I didn't have to adjust its width. However, I'd like the graphic to be centered in the remaining room available. Anyway of doing that? I lieu of centering, is there some way I can get a little bit of space between the typebuffer and my graphic? At 10:06 AM 10/31/04 -0800, you wrote: >Patrick, > >>Is this what you want? >> >> >>\starttext >>\startbuffer >>>> x=linspace(-2,4); >>>> y=x.^2-2*x-3; >>>> plot(x,y) >>>> xlabel('x') >>>> ylabel('y') >>>> title('y = x^2 -2x -3') >>>> grid on >>\stopbuffer >> >>\placesidebyside{% >>\framed[align={lohi,right},frame=off]% >> {\typebuffer}} >>{\externalfigure >> [cow] >> [width=.5\textwidth]} >>\stoptext > >Patrick, this would be what I want, but in my preamble I have: > >\setuptyping >[before={\startframedtext[width=\makeupwidth, > background=screen, > backgroundscreen=0.8]}, > after={\stopframedtext}, > color=darkred] > >Which seems to be getting in the way of your idea functioning properly. >_______________________________________________ >ntg-context mailing list >ntg-context@ntg.nl >http://www.ntg.nl/mailman/listinfo/ntg-context > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: side-by-side 2004-10-31 19:19 ` David Arnold @ 2004-10-31 20:57 ` Patrick Gundlach 0 siblings, 0 replies; 5+ messages in thread From: Patrick Gundlach @ 2004-10-31 20:57 UTC (permalink / raw) Hello David, this is far from perfect, but perhaps worth a tryout: -------------------------------------------------- \setupcolors[state=start] \setuptyping [before={\startframedtext[width=\localhsize,background=screen, backgroundscreen=0.8]}, after={\stopframedtext}, color=darkred] \starttext \startbuffer >> x=linspace(-2,4); >> y=x.^2-2*x-3; >> plot(x,y) >> xlabel('x') >> ylabel('y') >> title('y = x^2 -2x -3') >> grid on \stopbuffer \typebuffer % test \placesidebyside{% \framed[align={lohi,right}, frame=on, offset=10pt, background=screen, screen=0.8, width=.5\textwidth, strut=no, foregroundcolor=darkred]{\typebuffer}} {\framed[frame=off,width=.5\textwidth]{\externalfigure[cow.pdf][width=4cm,height=4cm]}} \stoptext -------------------------------------------------- Patrick -- ConTeXt wiki: http://contextgarden.net ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-31 20:57 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-10-30 19:25 side-by-side David Arnold 2004-10-31 12:16 ` side-by-side Patrick Gundlach 2004-10-31 18:06 ` side-by-side David Arnold 2004-10-31 19:19 ` David Arnold 2004-10-31 20:57 ` side-by-side Patrick Gundlach
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).