From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/14793 Path: main.gmane.org!not-for-mail From: Jonathan Nicholl Newsgroups: gmane.comp.tex.context Subject: alignment of marginal material Date: Sun, 22 Feb 2004 20:40:44 +0000 Sender: ntg-context-admin@ntg.nl Message-ID: <62D6C135-6577-11D8-A7EB-000A956A3A8A@kcl.ac.uk> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v612) Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1077482695 15202 80.91.224.253 (22 Feb 2004 20:44:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 22 Feb 2004 20:44:55 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sun Feb 22 21:44:46 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Av0T0-0004CQ-00 for ; Sun, 22 Feb 2004 21:44:46 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id ED19A10B30; Sun, 22 Feb 2004 21:42:47 +0100 (MET) Original-Received: from ent.umds.ac.uk (ent.umds.ac.uk [159.92.16.14]) by ref.ntg.nl (Postfix) with SMTP id 461A210B30 for ; Sun, 22 Feb 2004 21:41:45 +0100 (MET) Original-Received: (qmail 3869 invoked by uid 0); 22 Feb 2004 21:29:00 -0000 Original-Received: from redwood.kcl.ac.uk (137.73.66.71) by ent.umds.ac.uk with SMTP; 22 Feb 2004 21:29:00 -0000 Original-Received: from [80.189.152.53] (gr.189.152.53.dial.global.net.uk [80.189.152.53]) by redwood.kcl.ac.uk with ESMTP id i1MKf33C014627 for ; Sun, 22 Feb 2004 20:41:04 GMT Original-To: ntg-context@ntg.nl X-Mailer: Apple Mail (2.612) X-KCL-MailScanner: Found to be CLEAN Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:14793 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:14793 I am trying to write a macro which places a picture in the margin. I=20 would like the centre of the picture to be aligned vertically with the=20= centre of the paragraph in which I call the macro. The following works=20= in simple cases: \def\hazard#1{% The argument is the text of the = paragraph \setbox0=3D\vbox{#1}% I do this to work out the height = of the paragraph \inleft [low] {% \framed% [height=3D\ht0,% This makes the height of = the frame equal to the=20 height of the paragraph top=3D\vss,% bottom=3D\vss,% These two lines centre the = picture in the frame frame=3Doff]% {\externalfigure [sharp turn sign]}% }% #1}% It goes wrong if = you replace #1 with \box0 If I type something like \hazard{=85paragraph text=85} this produces what I want. But it breaks down with mathematics. \hazard{% \startformula =85mathematics=85 \stopformula } produces the picture aligned with the bottom of the mathematics. A solution to this problem escapes me. Can anyone suggest an improved=20 macro? Best wishes, Jonathan ----------------------- Jonathan Nicholl Department of Philosophy King's College London