From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/30626 Path: news.gmane.org!not-for-mail From: "Paul Jones" Newsgroups: gmane.comp.tex.context Subject: Re: xpos.sty Date: Fri, 1 Sep 2006 20:44:29 -0600 Message-ID: References: <44F4CE93.8020001@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0736534900==" X-Trace: sea.gmane.org 1157165106 18751 80.91.229.2 (2 Sep 2006 02:45:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 2 Sep 2006 02:45:06 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Sat Sep 02 04:45:05 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1GJLVD-0008V7-Uf for gctc-ntg-context-518@m.gmane.org; Sat, 02 Sep 2006 04:45:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E77F41FDC7; Sat, 2 Sep 2006 04:44:58 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03337-02; Sat, 2 Sep 2006 04:44:43 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 5EAF31FD0A; Sat, 2 Sep 2006 04:44:43 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B70401FD0A for ; Sat, 2 Sep 2006 04:44:38 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 01503-04-2 for ; Sat, 2 Sep 2006 04:44:31 +0200 (CEST) Original-Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.238]) by ronja.ntg.nl (Postfix) with SMTP id B662B1FD08 for ; Sat, 2 Sep 2006 04:44:30 +0200 (CEST) Original-Received: by wx-out-0506.google.com with SMTP id s12so1169419wxc for ; Fri, 01 Sep 2006 19:44:29 -0700 (PDT) Original-Received: by 10.90.78.1 with SMTP id a1mr900252agb; Fri, 01 Sep 2006 19:44:29 -0700 (PDT) Original-Received: by 10.90.67.7 with HTTP; Fri, 1 Sep 2006 19:44:29 -0700 (PDT) Original-To: "mailing list for ConTeXt users" In-Reply-To: <44F4CE93.8020001@wxs.nl> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:30626 Archived-At: --===============0736534900== Content-Type: multipart/alternative; boundary="----=_Part_59576_10887925.1157165069148" ------=_Part_59576_10887925.1157165069148 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Again, that is exactly what we needed. Thank you so much. paul On 8/29/06, Hans Hagen wrote: > > Paul Jones wrote: > > > > Thank you again for very timely and great answers to my question > > yesterday. I am finding that implementing things in Context is > > usually easier than I expect. This is very nice. Our company decided > > to switch to context from latex recently. It seems to have been a > > very good decision. Thanks for all the work you do to make context so > > fun to use. > > > > We have one last thing to get translated from latex to context. David > > Kastrup wrote a bit of latex for us (included below) that magically > > writes out the absolute xy position of each paragraph and image to a > > log file for us. We pass some extra information to the commands that > > get put in the log file for us, but in the end we mainly need a way to > > get the absolute xy coordinates of the bounding boxes for each > > paragraph, each section title, each image and each image caption. Is > > there a way to get this information with context already? Or do I need > > to get a new module written? > i dunno about that code but context has support for positions for years > now, in your case you probably need something > > \starttext > > \let\CurrentPos\empty > > \def\StartPos#1% > {\pushmacro\CurrentPos > \edef\CurrentPos{mypos:#1}% > \dontleavehmode\bpos\CurrentPos > \ignorespaces} > > \def\StopPos > {\removeunwantedspaces > \epos\CurrentPos > \popmacro\CurrentPos} > > \def\BoxPos#1% > {\dowithnextbox{\hbox{\hpos{mypos:#1}{\box\nextbox}}}\vbox} > > \StartPos{x}\input tufte \StopPos > > \StartPos{y}\input zapf \StopPos > > \placefigure > {} > {\BoxPos{q}{\framed[width=3cm,height=4cm]{}}} > > \stoptext > > in the *.tui/tuo file you can grep for mypos > > > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com > | www.pragma-pod.nl > ----------------------------------------------------------------- > > _______________________________________________ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > ------=_Part_59576_10887925.1157165069148 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Again, that is exactly what we needed.  Thank you so much.

paul

On 8/29/06, Hans Hagen <pragma@wxs.nl> wrote:
Paul Jones wrote:
>
> Thank you again for very timely and great answers to my question
> yesterday.  I am finding that implementing things in Context is
> usually easier than I expect.  This is very nice.  Our company decided
> to switch to context from latex recently.  It seems to have been a
> very good decision.  Thanks for all the work you do to make context so
> fun to use.
>
> We have one last thing to get translated from latex to context.  David
> Kastrup wrote a bit of latex for us (included below) that magically
> writes out the absolute xy position of each paragraph and image to a
> log file for us.  We pass some extra information to the commands that
> get put in the log file for us, but in the end we mainly need a way to
> get the absolute xy coordinates of the bounding boxes for each
> paragraph, each section title, each image and each image caption.  Is
> there a way to get this information with context already? Or do I need
> to get a new module written?
i dunno about that code but context has support for positions for years now, in your case you probably need something

\starttext

\let\CurrentPos\empty

\def\StartPos#1%
  {\pushmacro\CurrentPos
   \edef\CurrentPos{mypos:#1}%
   \dontleavehmode\bpos\CurrentPos
   \ignorespaces}

\def\StopPos
  {\removeunwantedspaces
   \epos\CurrentPos
   \popmacro\CurrentPos}

\def\BoxPos#1%
  {\dowithnextbox{\hbox{\hpos{mypos:#1}{\box\nextbox}}}\vbox}

\StartPos{x}\input tufte \StopPos

\StartPos{y}\input zapf \StopPos

\placefigure
  {}
  {\BoxPos{q}{\framed[width=3cm,height=4cm]{}}}

\stoptext

in the *.tui/tuo file you can grep for mypos



-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

------=_Part_59576_10887925.1157165069148-- --===============0736534900== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context --===============0736534900==--