ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Peter Münster" <pmlists@free.fr>
Subject: Re: \dogetobject and pdf
Date: Thu, 10 Jun 2004 18:54:19 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0406101851090.19779@gaston.free.fr> (raw)
In-Reply-To: <40C80D39.2040207@wxs.nl>

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/

  reply	other threads:[~2004-06-10 16:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-09 15:57 Peter Münster
2004-06-10  7:26 ` Hans Hagen
2004-06-10 16:54   ` Peter Münster [this message]
2004-06-11  8:16     ` Hans Hagen
2004-06-11 15:23       ` Peter Münster
2004-06-11 16:17         ` Hans Hagen
2004-06-11 16:56           ` 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=Pine.LNX.4.58.0406101851090.19779@gaston.free.fr \
    --to=pmlists@free.fr \
    --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).