From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79766 Path: news.gmane.org!not-for-mail From: "Mikael P. Sundqvist" Newsgroups: gmane.comp.tex.context Subject: Re: Q about hangaround commands Date: Thu, 6 Dec 2012 10:58:13 +0100 Message-ID: References: <4571F63D-01DA-4FBA-9661-72581BDD1A51@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1078221938==" X-Trace: ger.gmane.org 1354787910 11061 80.91.229.3 (6 Dec 2012 09:58:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Dec 2012 09:58:30 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Dec 06 10:58:43 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TgYE3-0004uv-92 for gctc-ntg-context-518@m.gmane.org; Thu, 06 Dec 2012 10:58:39 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B8EDD1021D; Thu, 6 Dec 2012 10:58:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id l1chDo2LfaLw; Thu, 6 Dec 2012 10:58:23 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 23CE910200; Thu, 6 Dec 2012 10:58:23 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4847510200 for ; Thu, 6 Dec 2012 10:58:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id gyRAO3cfEd+c for ; Thu, 6 Dec 2012 10:58:20 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id AA763101F9 for ; Thu, 6 Dec 2012 10:58:20 +0100 (CET) Original-Received: from mail-oa0-f41.google.com (mail-oa0-f41.google.com [209.85.219.41]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qB69wD9U021535 for ; Thu, 6 Dec 2012 10:58:14 +0100 Original-Received: by mail-oa0-f41.google.com with SMTP id k14so7766240oag.14 for ; Thu, 06 Dec 2012 01:58:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=7zRvlsBCW751497r20w7tpj2R6EqPSJ10mZsUxVpOuQ=; b=eSA8HI0nuU87/PkusAh4rYfsXq9peOReUnqyz4Q362eO4o2pzGT973bvpBmzs8YkCx jAWmwqOnD/FwxLAD8+I6Oe93dNjcpydrnrcYPXttVBxyW2B3WdAOTjxn61QN984SUjyZ NwzyOLmAbBIpt+2wTm/pE8LWH/0uDx6k1HJ8jdN+ge12kPKx7bFX3jH5naTtLGEXtbvF AcNN/xXygJRJh0CcU7LIFr+AOATEPFgzLI64wFj8LVoC4JEpz8AWp00NVLQsBp21bKeJ nrdiYJINBCjKytQei2DlAy93a6wny9J9LgwsDcTbluL1tNeY8Nuf6rsNECi5UPom4Vsh 4vQg== Original-Received: by 10.182.162.69 with SMTP id xy5mr457587obb.95.1354787893209; Thu, 06 Dec 2012 01:58:13 -0800 (PST) Original-Received: by 10.60.165.3 with HTTP; Thu, 6 Dec 2012 01:58:13 -0800 (PST) In-Reply-To: <4571F63D-01DA-4FBA-9661-72581BDD1A51@gmail.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.219.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QIw9WeJb - 7733d652cbba - 20121206 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:79766 Archived-At: --===============1078221938== Content-Type: multipart/alternative; boundary=e89a8f83a7171eeb7a04d02c236a --e89a8f83a7171eeb7a04d02c236a Content-Type: text/plain; charset=ISO-8859-1 On Wed, Nov 3, 2010 at 7:51 AM, Wolfgang Schuster < schuster.wolfgang@googlemail.com> wrote: > > Am 03.11.2010 um 05:47 schrieb Vladimir Lomov: > > > Hi. > > > > Some answers I found myself :) > > > > P.S. I have feeling that feature like 'hangaround' doesn't fit well > > with tex (page layout ...?) model. > > Hangaround is a very robust command and works in more cases than > \placefigure[left] but you have a conflict with the \item command > which place the itemize symbol before the following text which > is indented in your case. > > \unprotect > > \def\stophangaround > {\endgraf > \egroup} > > \def\starthangaround > {\dosingleempty\dostarthangaround} > > \def\dostarthangaround[#1]% > {\doifelse{#1}{\v!right} > {\dostartrighthangaround} > {\dostartlefthangaround }} > > \def\dostartlefthangaround > {\noindent\bgroup > \dowithnextbox > {\ifdim\nextboxht>\strutht\setbox\nextbox\tbox{\flushnextbox}\fi > \setbox\nextbox\hbox{\flushnextbox\hskip\@@hadistance}% > \getboxheight\scratchdimen\of\box\nextbox > \getnoflines\scratchdimen > \nextboxht\strutht > \nextboxdp\strutdp > \hangindent\nextboxwd > \hangafter-\noflines > \llap{\flushnextbox}\ignorespaces} > \hbox} > > \def\dostartrighthangaround > {\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 > > \starttext > > \starthangaround{\externalfigure[cow][scale=500]} > \input tufte > \stophangaround > > \blank > > \starthangaround[right]{\externalfigure[cow][scale=500]} > \input tufte > \stophangaround > > \stoptext > > 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 : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > ___________________________________________________________________________________ > Dear ConTeXt list, I apologize for digging up an old thread. I was searching for \starthangaround[right] and found this thread. I tried the code that Wolfgang gave in this thread but I guess something has changed since then, because it does not work with latest minimals. Would it be possible to get (a working) version of \starthangaround[right]? I think it even would be nice to have it in the core. As a minimal nonworking example, see the email from Wolgang in this thread. With best regards, Mikael --e89a8f83a7171eeb7a04d02c236a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Nov 3, 2010 at 7:51 AM, Wolfgang Schuster <schuster= .wolfgang@googlemail.com> wrote:

Am 03.11.2010 um 05:47 schrieb Vladimir Lomov:

> Hi.
>
> Some answers I found myself :)
>
> P.S. I have feeling that feature like 'han= garound' doesn't fit well
> with tex (page layout ...?) model.

Hangaround is a very robust command and works in more cases than
\placefigure[left] but you have a conflict with the \item command
which place the itemize symbol before the following text which
is indented in your case.

\unprotect

\def\stophangaround
=A0 {\endgraf
=A0 =A0\egroup}

\def\starthangaround
=A0 {\dosingleempty\dostarthangaround}

\def\dostarthangaround[#1]%
=A0 {\doifelse{#1}{\v!right}
=A0 =A0 =A0{\dostartrighthangaround}
=A0 =A0 =A0{\dostartlefthangaround }}

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

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

\protect

\starttext

\starthangaround{\externalfigure[cow][scale=3D500]}
\input tufte
\stophangaround

\blank

\starthangaround[right]{\externalfigure[cow][scale=3D500]}
\input tufte
\stophangaround

\stoptext

Wolfgang

___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-context@ntg.nl / <= a href=3D"http://www.ntg.nl/mailman/listinfo/ntg-context" target=3D"_blank"= >http://www.ntg.nl/mailman/listinfo/ntg-context
webpage =A0: http://= www.pragma-ade.nl / http://tex.aanhet.net
archive =A0: http://foundry.supelec.fr/projects/contextrev/
wiki =A0 =A0 : http:= //contextgarden.net
___________________________________________________________________________= ________

Dear ConTeXt list,

I apologize fo= r digging up an old thread. I was searching for \starthangaround[right] and= found this thread. I tried the code that Wolfgang gave in this thread but = I guess something has changed since then, because it does not work with lat= est minimals. Would it be possible to get (a working) version of \starthang= around[right]? I think it even would be nice to have it in the core.

As a minimal nonworking example, see the email from Wolgang in this thr= ead.

With best regards, Mikael
--e89a8f83a7171eeb7a04d02c236a-- --===============1078221938== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1078221938==--