From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79778 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Q about hangaround commands Date: Thu, 06 Dec 2012 17:57:49 +0100 Message-ID: <50C0CE8D.9090401@wxs.nl> 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: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1354813079 21361 80.91.229.3 (6 Dec 2012 16:57:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Dec 2012 16:57:59 +0000 (UTC) Cc: "Mikael P. Sundqvist" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Dec 06 17:58:09 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 1Tgem0-0005at-HN for gctc-ntg-context-518@m.gmane.org; Thu, 06 Dec 2012 17:58:08 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2B2CD1026A; Thu, 6 Dec 2012 17:57:56 +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 nGrI09qaQiJp; Thu, 6 Dec 2012 17:57:53 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 0EDDB10225; Thu, 6 Dec 2012 17:57:53 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 22D0510225 for ; Thu, 6 Dec 2012 17:57:51 +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 OZGt3dMjUZJs for ; Thu, 6 Dec 2012 17:57:49 +0100 (CET) Original-Received: from filter3-utr.mf.surf.net (filter3-utr.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id AE06D10222 for ; Thu, 6 Dec 2012 17:57:49 +0100 (CET) Original-Received: from smtp.ziggozakelijk.nl (D57D1DA2.static.ziggozakelijk.nl [213.125.29.162]) by filter3-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qB6GvmVs021014 for ; Thu, 6 Dec 2012 17:57:48 +0100 X-Default-Received-SPF: pass (skip=loggedin (res=PASS)) x-ip-name=10.100.1.100; Original-Received: from [10.100.1.100] (unverified [10.100.1.100]) by pragma-net.nl (SurgeMail 6.1c) with ESMTP (TLS) id 6510-1713362 for multiple; Thu, 06 Dec 2012 17:57:44 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.2; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 In-Reply-To: X-Authenticated-User: hagen@controller-9 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.125.29.162; country=NL; region=16; city=Zeewolde; latitude=52.3302; longitude=5.5364; http://maps.google.com/maps?q=52.3302,5.5364&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 08IwgVMFa - efb346291d2d - 20121206 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 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:79778 Archived-At: On 12/6/2012 10:58 AM, Mikael P. Sundqvist wrote: > On Wed, Nov 3, 2010 at 7:51 AM, Wolfgang Schuster > > 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 as mkiv has a starthangaround but uses a different parameter handler, this works: \unexpanded\def\starthangaround {\dontleavehmode\bgroup \dosingleempty\spac_hanging_around_start} \def\spac_hanging_around_start[#1]% {\edef\m_spac_hanging_location{#1}% \dowithnextboxcs\spac_hanging_around_finish\hbox} \def\spac_hanging_around_finish {\scratchdistance\directhangingparameter\c!distance\relax \ifdim\ht\nextbox>\strutht \setbox\nextbox\tbox{\box\nextbox}% \fi \getboxheight\scratchdimen\of\box\nextbox \getnoflines\scratchdimen \ht\nextbox\strutht \dp\nextbox\strutdp \hangafter-\noflines \scratchwidth\dimexpr\wd\nextbox+\scratchdistance\relax \ifx\m_spac_hanging_location\v!right \hangindent-\scratchwidth \rlap{\hskip\dimexpr\hsize-\wd\nextbox\relax\box\nextbox}% \else \hangindent\scratchwidth \llap{\box\nextbox\hskip\scratchdistance}% \fi \ignorespaces} i adapted the core code > 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 > > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ > -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________