From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15363 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: \dogetobject and pdf Date: Fri, 11 Jun 2004 10:16:52 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <40C96A74.4040104@wxs.nl> References: <40C80D39.2040207@wxs.nl> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040206060209060406090201" X-Trace: sea.gmane.org 1086941945 21233 80.91.224.253 (11 Jun 2004 08:19:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 11 Jun 2004 08:19:05 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Fri Jun 11 10:18:56 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 1BYhFY-0007TM-00 for ; Fri, 11 Jun 2004 10:18:56 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id A935710B2D; Fri, 11 Jun 2004 10:18:52 +0200 (MEST) Original-Received: from mailrelay01.solcon.nl (maillb.solcon.nl [212.45.32.200]) by ref.ntg.nl (Postfix) with ESMTP id B13BE10B1E for ; Fri, 11 Jun 2004 10:16:53 +0200 (MEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay01.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id i5B8Gpf4026433 for ; Fri, 11 Jun 2004 10:16:52 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id B97271A19C; Fri, 11 Jun 2004 10:16:52 +0200 (CEST) Original-Received: from [10.100.1.191] (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id BAC3F18A08 for ; Fri, 11 Jun 2004 08:16:51 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en Original-To: ntg-context@ntg.nl In-Reply-To: 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:15363 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15363 This is a multi-part message in MIME format. --------------040206060209060406090201 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, >pdf ok now, but the dvi is shifted up and to the right... :( > > Can you try this? You need to remake the format Hans --------------040206060209060406090201 Content-Type: text/plain; name="spec-dvi.tex" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="spec-dvi.tex" %D \module %D [ file=spec-dvi, %D version=1996.01.25, %D title=\CONTEXT\ Special Macros, %D subtitle=Generic \TEX\ Solutions, %D author=Hans Hagen, %D date=\currentdate, %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. \unprotect %D \macros %D {dostartobject, %D dostopobject, %D doinsertobject} %D %D Reuse of object is not supported by the \DVI\ format. We %D therefore just duplicate them using boxes. \startspecials[tex] \newbox\DVIobjects \newcounter\DVIobjectcounter \definespecial\dostartobject#1#2#3#4#5% {\setbox\nextbox\vbox\bgroup \def\dodostopobject {\egroup \doglobal\increment\DVIobjectcounter \global\setbox\DVIobjects\vbox {\offinterlineskip \forgetall \unvbox\DVIobjects \setbox\nextbox\hbox{\box\nextbox}% \wd\nextbox\zeropoint \dp\nextbox\zeropoint \ht\nextbox\onepoint \allowbreak \box\nextbox}% \dosetobjectreference{#1}{#2}{\DVIobjectcounter}}} \definespecial\dostopobject {\dodostopobject} \definespecial\doinsertobject#1#2% {\bgroup \dogetobjectreference{#1}{#2}\DVIobjectreference \splittopskip\zeropoint \setbox0=\copy\DVIobjects \dimen0=\DVIobjectreference\onepoint \advance\dimen0 -\onepoint \setbox2\vsplit0 to \dimen0 \ifdim\ht0>\onepoint \setbox0\vsplit0 to \onepoint \fi \unvbox0 \setbox0\lastbox \hbox{\unhbox0}% the \hbox is really needed! \egroup} %D \macros %D {dosetposition, %D dosetpositionwhd, %D dosetpositionplus} %D %D The next specials only identify a position. It is up to %D a \DVI\ postprocessing utility to merge the right commands %D into the utility file. Since in \CONTEXT, we only deal %D with relative positions, the reference point is not so %D important. %D %D The postprocessor should translate the specials into %D commands and append these to \type {jobname.tuo} using the %D format: %D %D \starttypen %D \pospxy {identifier}{page}{x}{y} %D \pospxywhd {identifier}{page}{x}{y}{w}{h}{d} %D \pospxyplus{identifier}{page}{x}{y}{w}{h}{d}{list} %D \stoptypen %D %D The postprocessor should, of course, provide the \type %D {page}, \type {x}, and \type {y} values. \definespecial\dosetposition#1% {\special{pos:pxy "#1"}} \definespecial\dosetpositionwhd#1#2#3#4% {\special{pos:pxywhd "#1" #2 #3 #4}} \definespecial\dosetpositionplus#1#2#3#4#5% {\special{pos:pxyplus "#1" #2 #3 #4 #5}} %D The next special tells the position postprocessor what %D page dimensions were used. \let\flushDVIpositionpapersize\relax % \definespecial\dosetpositionpapersize#1#2% % {\xdef\flushDVIpositionpapersize% % {\special{pos:papersize #1 #2}% % \global\noexpand\let\noexpand\flushDVIpositionpapersize\relax}} % % \appendtoksonce % \ifspecialbasedsettings % \ifpositioning\installprogram{dvipos \jobname}\fi % \fi % \to \everystoptext % % less tokens: \definespecial\dosetpositionpapersize#1#2% {\xdef\flushDVIpositionpapersize% {\special{pos:papersize #1 #2}% \noexpand\installprogram{dvipos --outfile=\jobname.tuo}% \global\noexpand\let\noexpand\flushDVIpositionpapersize\relax}} \prependtoksonce \flushDVIpositionpapersize \to \everyshipout \stopspecials \protect \endinput --------------040206060209060406090201--