GeneralFigure infringes on text

LaTeX specific issues not fitting into one of the other forums of this category.
superleo
Posts: 6
Joined: Mon Jun 09, 2008 11:14 am

Figure infringes on text

Post by superleo »

Dear All,

I am writing a book with latex, and the template is given to me. My trouble occurred when I typed the typical command
\begin{figure}[!h]
\centering
\includegraphics[width=0.4\textwidth]{III-1-epi.eps}
\caption{Effects of Epivir/PI on treated population in
California.}\label{epivir}
\end{figure}

and the figure entered into the text. Changing to [!t] made things worse, since the page format was not even respected (chapter and else).

What should I do? I add that I use miktex with winedt as interface.

Thanks in advance.

The master ' file definitions are below:


\documentclass[11pt]{book}%Specifies the document style
\usepackage{graphicx}
%%%%%%%%% Nova 7x10 %%%%%%%%%

\setlength{\textheight}{8in} % 11.0 - 1.125 - 0.875
\setlength{\textwidth}{5.5in} % 8.5 - 1.375 - 1.125
\setlength{\oddsidemargin}{0.5in}
\setlength{\evensidemargin}{0.5in}
%%%%%%%%% Nova 7x10 %%%%%%%%%


\usepackage{index}%Runs index style

% indices
\makeindex%Creates index at the end of the book

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Figure infringes on text

Post by Stefan Kottwitz »

Hi,

perhaps there's something wrong with the eps file, maybe the bounding box is not correct. Could you post this file (compressed/zipped) as attachment? Then we could examine it. You will find Browse and Add the file buttons below the editfield.

Stefan
LaTeX.org admin
superleo
Posts: 6
Joined: Mon Jun 09, 2008 11:14 am

Re: Figure infringes on text

Post by superleo »

Many thanks for the help. The file is attached, it was created with openoffice and then saved in eps format with pdfcreator
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Figure infringes on text

Post by Stefan Kottwitz »

Hi,

the eps file is not attached yet.

Stefan
LaTeX.org admin
superleo
Posts: 6
Joined: Mon Jun 09, 2008 11:14 am

Re: Figure infringes on text

Post by superleo »

Second try... sorry
Attachments
III-1-epi.zip
(6.12 KiB) Downloaded 195 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Figure infringes on text

Post by Stefan Kottwitz »

Hi,

I used epstool (under Linux) to fix the bounding box. I will attach the file. Does it look better?

Stefan
Attachments
corrected.eps.zip
(6.11 KiB) Downloaded 195 times
LaTeX.org admin
superleo
Posts: 6
Joined: Mon Jun 09, 2008 11:14 am

Re: Figure infringes on text

Post by superleo »

It works pretty well. I will have countless other figures to insert, how should I configure openoffen/ pdfcreator?

Indebted.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Figure infringes on text

Post by Stefan Kottwitz »

Hi,

I used just two lines at the command line:

Code: Select all

epstool -b -t4 --output EPSt4-file III-1-epi.eps
epstool -p --output corrected.eps EPSt4-file
If you are able to use epstools under Windows you could write a short batch file for it and use a parameter for the filename or even run over a complete directory.

Alternatively you could use pdflatex (PDFTeXify) and include the pictures as pdf files, just export them to pdf before, not to ps/eps. That would be my choice.

Stefan
LaTeX.org admin
superleo
Posts: 6
Joined: Mon Jun 09, 2008 11:14 am

Re: Figure infringes on text

Post by superleo »

PdfLatex seems to work, but that will create more problems than it solves. I will try epstool, just need to figure out the whole thing under vista.

Many thanks.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Re: Figure infringes on text

Post by Stefan Kottwitz »

I prefer pdfLaTeX. If the result has to be pdf, it may prevent problems caused by conversion from dvi to ps or from ps to pdf. I better use pdf features directly instead of letting them be embedded into dvi specials or postscript commands. Further there exist some useful packages for pdftex like hyperref and microtype, that may work with dvi but not as good as with pdflatex.
One reason not to use pdflatex could be the useful package pstricks. But other problems caused by switching to pdflatex perhaps could be solved easily by modifying some lines in the preamble like driver options.

Stefan
LaTeX.org admin
Post Reply