0

I'm making a report using latex and I've used changemargin command in order to center a single figure. My issue is that when I end the changemargin command the rest of the text appears without the initial indent of the whole document. I've tried \restoregeometry, but it does not work. Here is my code:

\begin{center}
    \includegraphics[scale=.6]{3s13s1_5.png}
\end{center}
\begin{changemargin}{-1cm}{5cm}
\begin{center}
    \includegraphics[scale=.6]{3s13s1_2.png}
\end{center}
\end{changemargin}
  \captionof{figure}{Contact and meson exchange potentials for the $^3S_1\ \rightarrow\ ^3S_1$ transition. $C$ and $C^*$ denote the contact potential using \ref{eq:C} and \ref{eq:C*} constants respectively. $OME$ denotes the one $\eta$ exchange potential. Larger view of the interaction potential contributions and total contribution for the present transition (below).}
\label{fig:3s13s1}
\newpage 
\begin{center}
    \includegraphics[scale=.6]{5s25s2_3.png}
\end{center}
\begin{changemargin}{-1cm}{5cm} 
\begin{center}
    \includegraphics[scale=.6]{5s25s2_2.png}
\end{center}
\end{changemargin}
  \captionof{figure}{Contact and meson exchange potentials for the $^5S_2\ \rightarrow\ ^5S_2$ transition. $C$ and $C^*$ denote the contact potential using \ref{eq:C} and \ref{eq:C*} constants respectively. $OME$ denotes the one $\eta$ exchange potential. Larger view of the interaction potential contributions and total contribution for the present transition (below). $V(r)$ is expressed in MeV.}
\label{fig:5s25s2}
\restoregeometry 

Does anybody know how can I solve that? (I tried using \hspace, but I'd like to make it in a 'correct' way.

3
  • 2
    Please show us a compilable but minimal version which just shows your problem ones. Like this, we have to guess around. Why do you centre twice?
    – LaRiFaRi
    Commented Oct 1, 2014 at 15:16
  • It is very rare that you should need changemargin or \restoregeometry what effect are you trying to achieve here? It is very hard to guess from a fragment, it helps if you make a complete document, using \rule{1cm}{2cm} instead of \includegraphics to make a rectangle of the right size without needing to supply the real images Commented Oct 1, 2014 at 15:23
  • I used changemargin because the 'subfigure' below of each figure appeared not aligned respect to the caption and the rest of the text, so I tried to change the margins only for that 'subfigure'. Do you know what I mean?
    – user25578
    Commented Oct 1, 2014 at 15:36

0

You must log in to answer this question.

Browse other questions tagged .