ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: \externalfigure and dvi-output
Date: Mon, 17 May 2004 10:54:57 +0200	[thread overview]
Message-ID: <6.0.1.1.2.20040517105421.01e3cd28@server-1> (raw)
In-Reply-To: <Pine.LNX.4.58.0405160743100.9331@gaston.free.fr>

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}

  reply	other threads:[~2004-05-17  8:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-16  5:51 Peter Münster
2004-05-17  8:54 ` Hans Hagen [this message]
2004-05-17 16:19   ` Peter Münster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6.0.1.1.2.20040517105421.01e3cd28@server-1 \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).