From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15156 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: \externalfigure and dvi-output Date: Mon, 17 May 2004 10:54:57 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <6.0.1.1.2.20040517105421.01e3cd28@server-1> References: Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1084784233 5567 80.91.224.253 (17 May 2004 08:57:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 17 May 2004 08:57:13 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Mon May 17 10:57:02 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 1BPdvi-00039I-00 for ; Mon, 17 May 2004 10:57:02 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 2C5C310B63; Mon, 17 May 2004 10:52:34 +0200 (MEST) Original-Received: from mailrelay02.solcon.nl (maillb.solcon.nl [212.45.32.200]) by ref.ntg.nl (Postfix) with ESMTP id B204210B5F for ; Mon, 17 May 2004 10:50:45 +0200 (MEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay02.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id i4H8t85R031546 for ; Mon, 17 May 2004 10:55:08 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id BA4FB21591; Mon, 17 May 2004 10:55:08 +0200 (CEST) Original-Received: from laptop-3.wxs.nl (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 97FAE206F2 for ; Mon, 17 May 2004 08:55:07 +0000 (UTC) X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Original-To: ntg-context@ntg.nl In-Reply-To: Original-References: X-Virus-Scanned: clamd / ClamAV version 0.70, clamav-milter version 0.70j 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:15156 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15156 At 07:51 16/05/2004, Peter M=FCnster wrote: >Hello, >when using \externalfigure, the figure is shifted to the right in >dvi-output. How could I fix this? >TIA for any help, Peter > >Here an example: > >%\setupoutput[pdftex] >\starttext >X\externalfigure[example][width=3D3cm,frame=3Don]X >\stoptext > >The eps-file is in the attachment. put this in cont-new.tex: \def\dogetobject#1#2#3#4#5#6#7% {\initializepaper \forgetall \dontshowcomposition \setbox\scratchbox\vbox {\doinsertobject{#1}{#2}}% \setbox\scratchbox#3% {\vbox to #5\scaledpoint {\ifdim\ht\scratchbox>#5\scaledpoint % or \ifdim\wd\scratchbox>#4\scaledpoint \vss\hbox to #4\scaledpoint{\hss\box\scratchbox\hss}\vss \else \vss\box\scratchbox \fi}}% \scratchdimen#7\scaledpoint \setbox\scratchbox\hbox {\hskip-\scratchdimen\lower\scratchdimen\box\scratchbox}% \wd\scratchbox#4\scaledpoint \ht\scratchbox#5\scaledpoint \dp\scratchbox#6\scaledpoint \box\scratchbox \elabelgroup} and replace this in spec-tr.tex: \definespecial\doinsertobject#1#2% {\bgroup \dogetobjectreference{#1}{#2}\DVIobjectreference \splittopskip\zeropoint \setbox0=3D\copy\DVIobjects \dimen0=3D\DVIobjectreference\onepoint \advance\dimen0 -\onepoint \setbox2\vsplit0 to \dimen0 \ifdim\ht0>\onepoint \setbox0\vsplit0 to \onepoint \fi \unvbox0\setbox0\lastbox\box0 \egroup}