1

So I'm trying to add figures and I've tried few codes.

I liked the results that I get with

\begin{center}
\includegraphics{img/imgfile}
\end{center}

But

\begin{figure}
\centering
\includegraphics{img/imgfile}
\caption{somecaption}
\end{figure}

Enables me to add a caption.

However the latter one also seems to place the figure at the start of the page, rather than to the location, where the \includegraphics command is located.

I need to control, where the figure is placed, rather than have it placed automatically.

I also need captions.


Or is it reasonable that figures would always be placed on top of the page. I'm writing an academic text.

mavavilj
  • 191
  • It's reasonable that figures are always on top or bottom of the page. I think it's quite ugly to have a picture or table breaking up the flow of the text. As long as you don't have the picture many pages away, I think it's best to let LaTeX handle those positioning. Having the floats at start or end of the page or a dedicated page is way more elegant and effective. – Moriambar Apr 16 '17 at 11:35
  • @Moriambar: I don't think this is an absolute rule. One may have very good reasons to want a figure at a precise place. – Bernard Apr 16 '17 at 11:43
  • Use \captionof{figure}{Your caption text} from the caption or capt-of packages. – Bernard Apr 16 '17 at 11:44
  • @Bernard no rule is absolute. But it's a good guideline. – Moriambar Apr 16 '17 at 11:44
  • @Bernard only for completeness: If you're using a KOMA-class, you don't need the caption or capt-of-packages, a KOMA-script has the \captionof command built in. – Skillmon Apr 16 '17 at 14:18

0 Answers0