0

I'm currently trying to understand what's the best way to set pictures in my Overleaf project at a particular place (taking the width of the page).

I usually do it like this (put a name.png file in the Pictures folder):

\begin{figure}[h]
    \centering
    \includegraphics[scale=0.7]{Pictures/name.png}
    \caption{some text}
    \label{the label}
\end{figure}

I adapt the scale until it fits in the width of the page. Is there a better way to put my pictures ? I want them to appear exacly where I write this code.

Bernard
  • 271,350
  • 1
    Does image should be from border to border of page or from border to border of text on page? For latter try with \includegraphics[width=\textwidth]{Pictures/name.png} – Zarko May 26 '22 at 07:30
  • 1
    using only [h] is normally not a good idea. If you really want them not to float use the float package and [H]. But this can lead to lots of unwanted white space. See also https://tex.stackexchange.com/a/39020/2388 – Ulrike Fischer May 26 '22 at 07:40

1 Answers1

1

If I got your question right, you want to force the postion of a figure environment in a specific position on the page.

If you really want to do this, you should load the float package and pass the [H] option to the figure environment (See Force figure placement in text).

  • Positioning is one part of the question. The more important one is to rescale its width automatically, assuming the images do vary in width. – MS-SPO May 26 '22 at 09:13