ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* hangaround in right side of column?
@ 2009-03-23 17:27 Jelle Huisman
  2009-03-23 17:41 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Jelle Huisman @ 2009-03-23 17:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

I try to get text flowing nicely around a figure but since I'm working 
in a columns environment \placefloat related stuff doesn't work. Using 
\starthangaround I get precisely what I want but I need to place figures 
to the right instead of to the left. I modified the definition for 
\starthangaround (from cont-new.tex) but I'm afraid I don't understand 
enough of it to get it working, anyone who can help?

\starttext
\def\startmyhangaround
  {\noindent\bgroup
   \dowithnextbox
     {\ifdim\nextboxht>\strutht\setbox\nextbox\tbox{\flushnextbox}\fi
      \setbox\nextbox\hbox{\flushnextbox\hskip\@@hadistance}%
      \getboxheight\scratchdimen\of\box\nextbox
      \getnoflines\scratchdimen
      \nextboxdp\strutdp
      \nextboxht\strutht
      \hangindent\nextboxwd
      \hangafter-\noflines
      \rlap{\flushnextbox}\ignorespaces}
   \hbox}
\startcolumns[n=2,balance=yes]
\dorecurse{2}{\input tufte \par}
\startmyhangaround{\externalfigure[cow]}    % figure placement is right but,
\input tufte                                                     % this 
text needs to start left...
\stophangaround
\stopcolumns
\stoptext

Thanks,

Jelle
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: hangaround in right side of column?
  2009-03-23 17:27 hangaround in right side of column? Jelle Huisman
@ 2009-03-23 17:41 ` Wolfgang Schuster
  2009-03-23 19:30   ` Jelle Huisman
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2009-03-23 17:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 23.03.2009 um 18:27 schrieb Jelle Huisman:

> Hi all,
>
> I try to get text flowing nicely around a figure but since I'm  
> working in a columns environment \placefloat related stuff doesn't  
> work. Using \starthangaround I get precisely what I want but I need  
> to place figures to the right instead of to the left. I modified the  
> definition for \starthangaround (from cont-new.tex) but I'm afraid I  
> don't understand enough of it to get it working, anyone who can help?

\unprotect

\def\stopmyhangaround
   {\endgraf
    \egroup}

\def\startmyhangaround
   {\noindent\bgroup
    \dowithnextbox
      {\ifdim\nextboxht>\strutht\setbox\nextbox\tbox{\flushnextbox}\fi
       \setbox\nextbox\hbox{\hskip\@@hadistance\flushnextbox}%
       \getboxheight\scratchdimen\of\box\nextbox
       \getnoflines\scratchdimen
       \nextboxht\strutht
       \nextboxdp\strutdp
       \hangindent-\nextboxwd
       \hangafter-\noflines
       \rlap{\hskip\hsize\llap{\flushnextbox}}\ignorespaces}
    \hbox}

\protect

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: hangaround in right side of column?
  2009-03-23 17:41 ` Wolfgang Schuster
@ 2009-03-23 19:30   ` Jelle Huisman
  0 siblings, 0 replies; 3+ messages in thread
From: Jelle Huisman @ 2009-03-23 19:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:
> Am 23.03.2009 um 18:27 schrieb Jelle Huisman:
>
>> Hi all,
>>
>> I try to get text flowing nicely around a figure but since I'm 
>> working in a columns environment \placefloat related stuff doesn't 
>> work. Using \starthangaround I get precisely what I want but I need 
>> to place figures to the right instead of to the left. I modified the 
>> definition for \starthangaround (from cont-new.tex) but I'm afraid I 
>> don't understand enough of it to get it working, anyone who can help?


Thanks, Wolfgang! That's precisely what I needed.

Jelle
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2009-03-23 19:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-23 17:27 hangaround in right side of column? Jelle Huisman
2009-03-23 17:41 ` Wolfgang Schuster
2009-03-23 19:30   ` Jelle Huisman

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