Search code examples
imagelatexcenteringoverleaf

Center image in overleaf with margins instead of text


I'm trying to center an image in the middle of the page in overleaf, but all the centering functions I can find only seem to center it in terms of the text, not the margins of the whole document. Is there a way to align an image to the center of the page, not aligned with the text? It ends up being a bit skewed to the right as is.

Screenshot of the document as is, with the image skewed to the right, not in the true center of the page.

Here is the code for inserting my image:

\begin{figure}[H]
    \centering
    \includegraphics[width=1.1\textwidth, height = 1.5cm]{s_TTCD_data.png}
    \caption{Tongue tip constriction location (TTCL) data for /s/.}
\end{figure}

I've also tried this, with the same result:

\begin{center}
\begin{figure}[H]
    \includegraphics[width=1.1\textwidth, height = 1.5cm]{s_TTCD_data.png}
    \caption{Tongue tip constriction location (TTCL) data for /s/.}
\end{figure}
\end{center}


Solution

  • Try:

    \begin{figure}[H]
        \centerline{\includegraphics[width=1.1\textwidth, height = 1.5cm]{s_TTCD_data.png}}
        \caption{Tongue tip constriction location (TTCL) data for /s/.}
    \end{figure}