\dogetobject and pdf
Hello Hans, I'm sorry, your patch of the May 17 works well for dvi, but not for pdf: the figure is again shifted down and to the left. Here an example: \setupoutput[pdftex] \starttext X\externalfigure[example][width=5cm]X \stoptext example.pdf is attached, also the resulting pdf. Concerning the issus with \useencoding[ffr] and FitBH: Do you think, you could solve the problems? If not, I'll go on trying to find solutions. Greeting, Peter -- http://pmrb.free.fr/contact/ _____________________________________ FilmSearch engine: http://f-s.sf.net/
Peter Münster wrote:
Hello Hans, I'm sorry, your patch of the May 17 works well for dvi, but not for pdf: the figure is again shifted down and to the left.
Here an example: \setupoutput[pdftex] \starttext X\externalfigure[example][width=5cm]X \stoptext
example.pdf is attached, also the resulting pdf.
Concerning the issus with \useencoding[ffr] and FitBH: Do you think, you could solve the problems? If not, I'll go on trying to find solutions.
i ran into that last week as well -) can you try: \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 \vss\hbox to #4\scaledpoint{\hss\box\scratchbox\hss}\vss \else\ifdim\wd\scratchbox>#4\scaledpoint \vss\hbox to #4\scaledpoint{\hss\box\scratchbox\hss}\vss \else \vss\box\scratchbox \fi\fi}}% \box\scratchbox \elabelgroup} if this does not work i 'll do an upload Hans
On Thu, 10 Jun 2004, Hans Hagen wrote:
Peter Münster wrote:
Hello Hans, I'm sorry, your patch of the May 17 works well for dvi, but not for pdf: the figure is again shifted down and to the left.
Here an example: \setupoutput[pdftex] \starttext X\externalfigure[example][width=5cm]X \stoptext
example.pdf is attached, also the resulting pdf.
Concerning the issus with \useencoding[ffr] and FitBH: Do you think, you could solve the problems? If not, I'll go on trying to find solutions.
i ran into that last week as well -)
can you try:
\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 \vss\hbox to #4\scaledpoint{\hss\box\scratchbox\hss}\vss \else\ifdim\wd\scratchbox>#4\scaledpoint \vss\hbox to #4\scaledpoint{\hss\box\scratchbox\hss}\vss \else \vss\box\scratchbox \fi\fi}}% \box\scratchbox \elabelgroup}
if this does not work i 'll do an upload
pdf ok now, but the dvi is shifted up and to the right... :( Now I use a workaround in form of an environment: \startenvironment pdf-figures \input ifpdf.sty \ifpdf \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 \vss\hbox to #4\scaledpoint{\hss\box\scratchbox\hss}\vss \else\ifdim\wd\scratchbox>#4\scaledpoint \vss\hbox to #4\scaledpoint{\hss\box\scratchbox\hss}\vss \else \vss\box\scratchbox \fi\fi}}% \box\scratchbox \elabelgroup} \fi \stopenvironment Greetings, Peter -- http://pmrb.free.fr/contact/ _____________________________________ FilmSearch engine: http://f-s.sf.net/
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 %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
On Fri, 11 Jun 2004, Hans Hagen wrote:
pdf ok now, but the dvi is shifted up and to the right... :(
Can you try this? You need to remake the format
Yes, dvi and pdf ok, after deleting the \dogetobject definition in cont-new.tex. Thank you! Peter -- http://pmrb.free.fr/contact/ _____________________________________ FilmSearch engine: http://f-s.sf.net/
On Fri, 11 Jun 2004, Hans Hagen wrote:
Peter Münster wrote:
Yes, dvi and pdf ok, after deleting the \dogetobject definition in cont-new.tex.
you mean that the dogetobject i send last fails?
Oh, excuse me. It was the old one, that fails. The new one is ok. But without any \dogetobject in cont-new.tex it is ok too. Peter -- http://pmrb.free.fr/contact/ _____________________________________ FilmSearch engine: http://f-s.sf.net/
participants (2)
-
Hans Hagen
-
Peter Münster