# [OS X TeX] inputting figures that are pfd files

Ross Moore ross at ics.mq.edu.au
Sun Apr 9 22:57:36 EDT 2006

Hello Bruce,

On 10/04/2006, at 9:56 AM, Bruce Kellogg wrote:

> Continuing with my problem of importing pdf files,
> I note that the book of Kopka and Daly say that one should
> use viewport instead of bb in importing pdf files. So I have
> used the command
>
> \includegraphics[viewport=0.in 0.in 2.in 3.in]{fb2}

No.  The viewport is a set of numbers, denoting points;
e.g.
\includegraphics[viewport=0 0 144 216,clip]{fb2}

Also, you need the 'clip' if all you want is the
part within the viewpoint rectangle.
Otherwise, anything else in the actual picture will
be shown as well, perhaps obscuring what has come before,
or acting as a background for the material coming after.

>
> I get the error message:
>
>
> Runaway argument?
> viewport=0.in 0.in 2.in 3.in]{fb2}
> ! Paragraph ended before \Gin at iii was complete.
>                    \par
> l.138
>
>
> Can anyone say what this means and where my error is?

See above.

>> I can open the pdf files by themselves. I tried another figure,
>> also without success. Also, since the mac readily generates
>> pdf files to print documents, I tried writing a one line text file,
>> saved it as a pdf file, and tried inputting it using the
>> \includegraphics
>> command. I suppose that should have worked, but it did not.

Was the space for it allocated ?  (i.e., left blank)

>>> I am a TeX user, gradually switching to LaTeX.
>>> In TeX, I often used PiCTeX to generate figures,
>>> so I have tried to do this in LaTeX. For this I have
>>> used TeX and PiCTeX to generate a small figure,
>>> obtaining a pdf file, called fos.pdf. I put the statement
>>>
>>> \usepackage{graphics}
>>>
>>> near the top of a LaTeX document, and I put the statement
>>>
>>> \includegraphics{fos}
>>>
>>> somewhere in the file. When processing the file with LaTeX,
>>> I get the usual pdf output up to the point where the
>>> \includegraphics statement is, then nothing else. The logfile
>>> gives the message
>>>
>>>
>>> <fos.pdf, id=1, 614.295pt x 794.97pt> <use fos.pdf>
>>> Overfull \hbox (159.5385pt too wide) in paragraph at lines 134--135
>>> [][]

Are you sure the picture isn't out to the right,
extending into the margin and being cut-off at the
edge of the paper?
At 159.5pts too wide, that's > 5cm extra width.

>>> and seems to continue processing the file. (Lines 134--135 are at
>>> the
>>> \includegraphics statement.) I confess to not understanding
>>> \includegraphics
>>> in the book of Kopta and Daly. But, just to try something I
>>> modified the statement to
>>>
>>> \includegraphics[0cm,0cm][2cm,2cm]{fos}
>>>
>>> Now I got a full set of output, but with a blank space where I would
>>> have expected the figure, and no relevant comments in the log
>>> file as
>>> far as I could see. Any suggestions?

Can you post the image somewhere for us to download and test ?

Hope this helps,

Ross Moore

------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia  2109                            fax: +61 +2 9850 8114
------------------------------------------------------------------------

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/