ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \externalfigure and dvi-output
@ 2004-05-16  5:51 Peter Münster
  2004-05-17  8:54 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Münster @ 2004-05-16  5:51 UTC (permalink / raw)


[-- Attachment #1: Type: TEXT/PLAIN, Size: 502 bytes --]

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=3cm,frame=on]X
\stoptext

The eps-file is in the attachment.

ConTeXt Version: 2004.3.16
pdfeTeX Version: 3.14159-1.10b-2.1

-- 
http://pmrb.free.fr/contact/
________________________________________________________________
FilmSearch engine with a lot of new features: http://f-s.sf.net/

[-- Attachment #2: example.eps --]
[-- Type: APPLICATION/postscript, Size: 3108 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: \externalfigure and dvi-output
  2004-05-16  5:51 \externalfigure and dvi-output Peter Münster
@ 2004-05-17  8:54 ` Hans Hagen
  2004-05-17 16:19   ` Peter Münster
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2004-05-17  8:54 UTC (permalink / raw)


At 07:51 16/05/2004, Peter Münster 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=3cm,frame=on]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=\copy\DVIobjects
    \dimen0=\DVIobjectreference\onepoint
    \advance\dimen0 -\onepoint
    \setbox2\vsplit0 to \dimen0
    \ifdim\ht0>\onepoint
      \setbox0\vsplit0 to \onepoint
    \fi
    \unvbox0\setbox0\lastbox\box0
    \egroup}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: \externalfigure and dvi-output
  2004-05-17  8:54 ` Hans Hagen
@ 2004-05-17 16:19   ` Peter Münster
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Münster @ 2004-05-17 16:19 UTC (permalink / raw)


On Mon, 17 May 2004, Hans Hagen wrote:

> put this in cont-new.tex:
> 
> and replace this in spec-tr.tex:

Thank you, it works!
Instead of spec-tr.tex, I replaced in spec-dvi.tex.
Cheers, Peter

-- 
http://pmrb.free.fr/contact/
________________________________________________________________
FilmSearch engine with a lot of new features: http://f-s.sf.net/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-05-17 16:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-16  5:51 \externalfigure and dvi-output Peter Münster
2004-05-17  8:54 ` Hans Hagen
2004-05-17 16:19   ` Peter Münster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).