0

I'm currently writing a thesis in biotechnology and I'm quite new into the world of LaTeX. How do one force this image to stay on same page? The figure has to stay the same size. I'm going to remove the pagenumber since the figure overlaps the margin.

Thank you in advance.sample

\begin{figure}[!h]
\begin{widepage}
    \begin{minipage}[c]{\textwidth}
    \includegraphics[width=\textwidth,set height=18cm]{Autocrine_Signal_Loop.png}
    \end{minipage}
   \captionsetup{width=\textwidth}
   \caption{\textbf{PD-1/PD-L mechanism of action.} Binding of PD-1 and PD-L1 crosslinked with TCR/MHC-II antigen presentation between a T cell and an APC leads to altered T cell metabolism and subsequent T cell differentiation. Simultaneous TCR and PD-1 stimulation lead to phosphorylation of the ITIM and ITSM motifs of PD-1 recruiting SHP-1 and SHP-2. SHP-1 and SHP-2 dephosphorylate downstream signalling molecules of TCR leading to the impairment of PI3K/Akt and Ras/MEK/ERK pathways and change of cell metabolism from oxidative phosphorylation to fatty acid beta-oxidation. Consequently, the number of regulatory T cells and exhausted T cells are increased while the amount of effector T cells and memory T cells are decreased, resulting in overall less proliferation, cytotoxic secretion, and T cell survival.}
   \label{fig2}
\end{widepage}
\end{figure}

and widepage is defined as

\newlength{\offsetpage}
\setlength{\offsetpage}{1.2cm}
\newenvironment{widepage}{\begin{adjustwidth}{-\offsetpage}{-\offsetpage}%
    \addtolength{\textwidth}{2\offsetpage}}%
{\end{adjustwidth}}
  • The minipage isn't doing anything, and the adjustwidth would just as easily be achieved using \makebox. – John Kormylo Jun 11 at 14:58
  • you could put \vspace{-5cm} (or whatever is needed) just before \end{figure} so the effective size is smaller, but the whole point of the figure environment is to allow the figure to move to avoid bad breaks like this, you could use [!htp] then most likely it will insert itself at the top of the page. – David Carlisle Jun 11 at 20:09
  • I get the feeling that this figure is actually too tall (18cm plus caption) for an entire page by itself, much less a page with text on it. – John Kormylo Jun 11 at 23:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.