1

As you can see in the picture at the bottom, the description of figure 4 (which is inside an '\item' is placed slightly to the left comparing to the text above. Any suggestion would be appreciated.

PS: Before everything... is it supposed for the description of a figure to 'violate' those margins? (context: bachelor's thesis)

    \begin{itemize}
    \item SFBAC - \textit{Series Full-Bridge AC}

    Se define como una topología para compensación en serie con celdas de puente completo conectadas en serie al lado AC. En la figura ÑÑÑÑ se muestra el circuito correspondiente.

        \begin{figure}[!h]
        \centering{
            \resizebox{120mm}{!}{\includegraphics{sfbac.png}}
            \caption{Topología SFBAC: LCC con celdas de puente completo conectadas en series en el lado AC \cite{Bakas2016}.}
            \label{figure:sfbac}
        }
        \end{figure}

    \end{itemize}

enter image description here

2
  • 1
    welcome to tex.sx. a float (figure or table) occupies the full text width, while an item is indented. furthermore, as you have used \centering, the the graphic itself is centered within the horizontal space allotted to the figure. Nov 16, 2017 at 2:19
  • Note that \centering does not take an argument.
    – cfr
    Nov 16, 2017 at 2:23

1 Answer 1

3

The following is a MWE that produces the result that I suppose you wanted to achieve.

\documentclass{article}

\usepackage{capt-of}
\usepackage{graphicx}


\begin{document}

    \begin{itemize}
    \item SFBAC - \textit{Series Full-Bridge AC}

    Se define como una topología para compensación en serie con celdas de puente completo conectadas en serie al lado AC. En la figura ÑÑÑÑ se muestra el circuito correspondiente.

       \begin{center}
       \includegraphics[width=7cm]{example-image}
       \end{center}
       \captionof{figure}{Topología SFBAC: LCC con celdas de puente completo conectadas en series en el lado AC \cite{Bakas2016}.}
       \label{figure:example}

    \end{itemize}
Reference to figure~\ref{figure:example}
\end{document}

In the following image you can see the result of the above MWE (upper half) compared to the (slightly modified) code posted in the question (lower half). The green line indicates that the figure's caption is aligned with the text of the item. While the graphic itself is centered within this width (blue lines) rather than centered with respect to the total textwidth (red lines).

enter image description here

What I changed in comparison to the original code:

Since I assume that you want the image to be displayed in the exact same position as in the code, you do not need to use the figure environment. You can instead insert the figure by simply using \includegraphics. To ensure the horizontally centered position of the image, I have enclosed it in a center environment. To assign a caption to the image, I have used the \captionof command of the capt-of package. You can as well add a \label to the image and reference it as usual.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .