From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79777 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 17:53:06 +0100 Message-ID: References: <4571F63D-01DA-4FBA-9661-72581BDD1A51@gmail.com> <716B08DF-6EBB-49E9-A0A8-A8B9E6F42CFB@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0091853756==" X-Trace: ger.gmane.org 1354812808 19113 80.91.229.3 (6 Dec 2012 16:53:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Dec 2012 16:53:28 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Dec 06 17:53:41 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 1Tgehf-0000Pk-1h for gctc-ntg-context-518@m.gmane.org; Thu, 06 Dec 2012 17:53:39 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 9249D10263; Thu, 6 Dec 2012 17:53: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 CwcLafoVZvzP; Thu, 6 Dec 2012 17:53:22 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 9E18B10222; Thu, 6 Dec 2012 17:53:22 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id BAE4010222 for ; Thu, 6 Dec 2012 17:53:20 +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 Txwlk64HK8vM for ; Thu, 6 Dec 2012 17:53:09 +0100 (CET) Original-Received: from filter2-utr.mf.surf.net (filter2-utr.mf.surf.net [195.169.124.153]) by balder.ntg.nl (Postfix) with ESMTP id B85B01021D for ; Thu, 6 Dec 2012 17:53:09 +0100 (CET) Original-Received: from mail-oa0-f41.google.com (mail-oa0-f41.google.com [209.85.219.41]) by filter2-utr.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qB6Gr7Wk019578 for ; Thu, 6 Dec 2012 17:53:08 +0100 Original-Received: by mail-oa0-f41.google.com with SMTP id k14so8294262oag.14 for ; Thu, 06 Dec 2012 08:53:06 -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=FQRdjdIwN3qYi33pCiL753LpNYejFGNC39c9499NUDc=; b=znNRI1jHoCOJjcirx0xF5Q3HVZ+mYUqquORwtQxcysPo9iF8PW30j7DofRUgjc6VB1 KxPMaEZwBZM+y9I+kElxZ8Wm7sajzrMndZq40RxANkj1TOSXTvxMY0+mYhlHBTE3THmL k1ZFSQWOdgvxrdThs+UCjegr6OoYEAvf7sKgiLs3Vdc3inIG60xb0f9e7hK6TwonSfyl qNBD/JnJozsDccmV4DOjp7jDVwNC55xy4Cw8oWwKzdh8gti2KuHRktfWc37dfOEknjFy GHPSh0lvN3BPBSNHQ0H+xS9hxDU7HX2zeNt5wGkh8IG0obLC2FAY0PG6Y6pgSlS+IokV byOw== Original-Received: by 10.60.31.142 with SMTP id a14mr1377167oei.118.1354812786691; Thu, 06 Dec 2012 08:53:06 -0800 (PST) Original-Received: by 10.60.165.3 with HTTP; Thu, 6 Dec 2012 08:53:06 -0800 (PST) In-Reply-To: <716B08DF-6EBB-49E9-A0A8-A8B9E6F42CFB@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: 04IwgR7V2 - 37991027e3fe - 20121206 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 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:79777 Archived-At: --===============0091853756== Content-Type: multipart/alternative; boundary=e89a8fb1edaae34e5404d031eeb1 --e89a8fb1edaae34e5404d031eeb1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Dec 6, 2012 at 11:44 AM, Otared Kavian wrote: > Hi Mikael, > > The example given by Wolfgang works fine for me with mkii, but not in > mkiv: probably something has changed in mkiv, for example the way > [scale=3D500] must be used in mkiv. > > Best regards: OK > > On 6 d=E9c. 2012, at 10:58, "Mikael P. Sundqvist" wrot= e: > > 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=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 t= o >> 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 ge= t > (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 threa= d. > > 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 > > _________________________________________________________________________= __________ > > > > > _________________________________________________________________________= __________ > 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 > > _________________________________________________________________________= __________ > Hi Otared, thank you for your answer. I work in mkiv, so I have to wait for a fix if there will be one. (I work in a two-column document, so \placefigure[right]... does not work, it seems, otherwise I could have used that) Best regards, Mikael --e89a8fb1edaae34e5404d031eeb1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Dec 6, 2012 at 11:44 AM, Otared Kavian <otared@gmail.com> wrote:
Hi Mikael,

The examp= le given by Wolfgang works fine for me with mkii, but not in mkiv: probably= something has changed in mkiv, for example the way [scale=3D500] must be u= sed in mkiv.

Best regards: OK

<= div>
On 6 d=E9c. 2012, at 10:58, "Mikael P. Sundqvist" <mickep@gmail.com>= ; wrote:

On Wed, Nov 3, 2010 at 7:51 AM, Wolfgang Schu= ster <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
=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-cont= ext@ntg.nl / 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
___________________________________________________________________________= ________
If your question is of interest to others as well, please add a= n entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/li= stinfo/ntg-context
webpage =A0: http://= www.pragma-ade.nl / http://tex.aanhet.net
archive =A0: http://foundry.supelec.fr/proj= ects/contextrev/
wiki =A0=A0=A0=A0: h= ttp://contextgarden.net
____________________________________________= _______________________________________

<= /div>

_______________________________________________________________________= ____________
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
___________________________________________________________________________= ________

Hi Otared,

thank you for your answ= er. I work in mkiv, so I have to wait for a fix if there will be one.

(I work in a two-column document, so \placefigure[right]... does not wo= rk, it seems, otherwise I could have used that)

Best regards, Mikael=

--e89a8fb1edaae34e5404d031eeb1-- --===============0091853756== 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 ___________________________________________________________________________________ --===============0091853756==--