From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/8366 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: midalignment Date: Sun, 23 Jun 2002 23:58:30 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <5.1.0.14.1.20020623235737.036c4d30@remote-1> References: <200206152115.47518.ishamid@attbi.com> <200206152115.47518.ishamid@attbi.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1035398776 26963 80.91.224.250 (23 Oct 2002 18:46:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:46:16 +0000 (UTC) Cc: ntg-context@ntg.nl, Giuseppe Bilotta Original-To: Patrick Gundlach In-Reply-To: <87ofe4s44j.fsf@gundla.ch> Xref: main.gmane.org gmane.comp.tex.context:8366 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:8366 At 11:39 PM 6/21/2002 +0200, Patrick Gundlach wrote: >Idris S Hamid writes: > > > Dear folks, > > > > In the following example, \midalign is not placing its argument in the > center > > of the line but rather offset to the right a bit. > >this is because \midalign (and other alignment macros) do not look at >the \leftskip and the \rightskip the \startnarrow sets. If you run >(pdf)etex you can try this code before the \midalign: > > >\def\doalignline#1#2% \\ == newline > {\bgroup > \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}% > \dowithnextbox > {\noindent\hbox to \dimexpr(\hsize - \rightskip - \leftskip) > {\strut#1\unhbox\nextbox#2}\egroup} > \hbox} > > >Hans should fix this. Sorry I don't have the time to put this into >bugzilla. better is: \def\doalignline#1#2% \\ == newline {\bgroup \setlocalhsize % new \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}% \dowithnextbox {\noindent\hbox to \localhsize{\strut#1\unhbox\nextbox#2}\egroup} \hbox} Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------