• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

Difficulties with latex.

Dylab

Critical Thinker
Joined
Nov 28, 2002
Messages
313
I'm using Texnic Center with latex to write my lab papers. The one problem I'm having is when I put pictures on my paper they don't appear where I want to be. It is either on a new page or on the top of the page. Here is an example of the code I'm using:

\begin{figure}
\centering
\includegraphics{DistanceVsTime.eps}
\label{fig:DistanceVsTime}
\end{figure}

I used Coral Paint Shop Pro to export the eps file.
 
Geeez! I thought you had a REAL problem in the "playroom area" for a moment...
 
Latex only offers limited control over figure placement. After the \begin{figure}, put something like [htb].

\begin{figure} [htb]

The letters indicate the order of preference for where to put the figure.

h - Here.
b - bottom of page.
t - tope of page.

You can also try playing around with where you place the figure in the tex file. By rearanging things slightly, you may be able to get it to do what you want. Sometimes making the figure slightly smaller will help too.

Dr. Stupid
 
If I may expand on what Stimpy said.

Begin by placing the float immediately following the paragraph of its first reference. Use a placement option of [tb], which may very well be the default. If the preceding paragraph is a long one, the float might end up on the next page even though its reference is at the beginning of the paragraph. In that case, move the float so it precedes the paragraph. Do not let it appear on the previous page, though; that is considered tacky. Even though LaTeX allows it, I highly recommend that you do not put floats in the middle of paragraphs.

Big problem with LaTeX's float placement algorithm: If the float does not fit on a page with a certain amount of text (controlled by parameters), then LaTeX floats it to the end of the chapter. What it should do, of course, is put it on a page by itself in the middle of the chapter. You can force this behavior using the placement option [p].

As Stimpy said, scaling the art can help fit it on the page. People do not notice scaling as long as it is less than +/-6% or so.

I highly recommend that every numbered figure and table be referenced at least once in the text. Also, include a caption to give the reader some clue what he is looking at.

~~ Paul
 

Back
Top Bottom