0

I am using TexShop to write a document. For inserting my figures, I have converted them to eps files and then dragged and dropped into latex environment. I have set the size of figures to be the same as size of A4, however, the results is that the figure is inserted like this:

enter image description here

That is, there are some extra spaces at left and top of the page, and therefore some parts of left and bottom of figure are not shown.

In the log file, I have received these:

[7] [8] [9] <../../Desktop/Fig3_resized.eps> Overfull \hbox (209.82327pt too wide) in paragraph at lines 113--114 [][] [10] Overfull \vbox (241.83586pt too high) has occurred while \output is active

I just have dragged and dropped the eps file and I have made the eps file with illustrator and set the size to be similar as A4.

I wonder why this error and behavior happenes and how should I solve it.

Edit:

When I drag and drop my eps file, the resulting code appears automatically:

\documentclass[master,english]{kuisthesis}

\usepackage{graphicx}
\begin{document}
\includegraphics[]{/Users/admin/Desktop/Fig3_resized.eps}

\end{document}

Here is the simple code that reproduces the same result. I have attached the screenshot of my eps file too.

enter image description here

  • Welcome to TeX.se! Can you please show us a short complilable tex code resuling in your issue. In your case can you also show us the two images? – Mensch Jul 7 at 4:05
  • Thankyou! My code is a bit long, However, I will post related parts. What do you mean by two images? The original one and the one that latex outputs? – Kadaj13 Jul 7 at 5:24
  • Please provide an MWE (Minimal Working Example), a small but complete document beginning with \documentclass and ending with \end{document}, which reproduce your problem. I suspect that you images have white space on top and left their side ... – Zarko Jul 7 at 5:34
  • Thankyou! I have provided a simple code. I am using a document class provided by our department. So I do not know what information about that can be useful – Kadaj13 Jul 7 at 5:49
  • I assume you are using A4 paper. But LaTeX has marigns set so the actual print size is smaller than the full A4 paper. Would you please let us at least see the line where you include the graphic. – Herb Schulz Jul 7 at 15:44
1

I suppose your class kuisthesis uses a4 paper format. Because you gave us no link to that class I simply changed in the following the class to report. Because your shows image is added as *.png file I used pdflatex to compile and used the filename 498944.png for your image.

Okay, now please test the following code and see, that I added width=\textwidth to your \includegraphics command and used package showframe to visualize the typing area:

\documentclass[master,english]{report} %kuisthesis

\usepackage{graphicx} 
\usepackage{showframe} % <======================================


\begin{document} 
%\includegraphics[]{498944.png}
\includegraphics[width=\textwidth]{498944.png} % <==============

\end{document} 

and its result:

result

As you can see you have a small space in your image at the beginning (red arrow, marked 1) and filled the complete \textwidth (red arrow, marked 2).

Note: You simply can not use the complete \paperwidth, because there are the margins on the right (red arrow with r) and left (red arrow with l) you have to respect.

typing area

  • Thankyou very much. It was very helpful. I also used usepackage{showframe} to understand about the white spaces and I have figured out it is due to how to save the illustrator. When using illustrator to save as eps files, I should save using artboards to avoid this problem. Thank you very much – Kadaj13 Jul 20 at 7:09
  • @Kadaj13 You are welcome! – Mensch Jul 20 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.