0

I am using Overleaf to write my manuscript. In just one case, when I use \section{}, the section starts from the next page. When I change it to \subsection{}, it starts from where it suppose to be. This happens only in one case, and the rest of the \section{} in the other parts of the manuscript work properly. In the picture, you can see the difference.

Here is the parts of my code:

\begin{figure}[h]
    \centering
    \includegraphics[width=0.95\linewidth]{picture/Chapter-3/T-flowchart.pdf}
    \caption{ Overview of the inputs and outputs of the thermal model.    
        \label{fig:T-flowchart}}
\end{figure}

\cref{fig:T-flowchart} demonstrates a graphical summary of the inputs and outputs of the thermal model. The outputs define the heat transfer coefficients of the PV module and the temperature of each module component base don the ambient conditions, material properties, geometry, and heat sources derived from electrical and optical models.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Coupling of the models} \label{Coupling of models}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Coupling of models to determine the electrical properties and heat sources under defined test conditions (DTC)} \label{Coupling of models to determine the electrical properties and heat sources under STC}
text text

enter image description here

Hamed
  • 161
  • 6
    Can you give a MWE that reproduce your problem, it’s difficult to figure out what’s wrong with this screenshots – Luis Turcio Mar 02 '20 at 21:24
  • 3
    See also https://tex.stackexchange.com/questions/161905/how-to-force-latex-to-keep-section-subsection-headings-with-one-line-below-it-on and https://tex.stackexchange.com/questions/2347/avoiding-page-breaks-shortly-after-section-subsection-headings – John Kormylo Mar 03 '20 at 01:53
  • Thank you both. I actually found my answer in the links provided by @JohnKormylo however, the funny thing is that it just happens for one of my \sections. That I cannot figure out. Using the solutions offered there fixes this problem but rearrange all other parts of my manuscript. What I am wondering is that why only this section, and why sebsection shows no problem – Hamed Mar 03 '20 at 08:48

1 Answers1

1

You don't have any text that belongs to this section, therefore LaTeX waits for the next possibility page break and can't fit all the coming code in the remaining of the page. Try adding a single letter or blank \ and it should put it where you want.

aknott
  • 372
  • 1
    I just rearranged the text and this helped that I could bring the section in its place. thanks for the hint. The answer can be also solved by the links provided in the comments of the main post. – Hamed Mar 03 '20 at 09:36