ondes / Template-Latex-ITU-Thesis

LaTeX Template of Istanbul Technical University thesis projects
59 stars 21 forks source link

Titles at the end of the pages #14

Open tuncaen opened 3 years ago

tuncaen commented 3 years ago

I used this template for the last progress report term. I faced an issue about section titles. Sometimes, the titles stayed alone at the end of the page. Is there any workaround or planned update?

ondes commented 3 years ago

I don't think it's related to the template or class file. It sounds like a TeX issue.

You can use \newpage command before the heading command. If it does not solve the issue, referring to StackExchange might be helpful.

ooaj commented 3 years ago

In any case, can you provide a minimal reproducible example?

tuncaen commented 3 years ago

In any case, can you provide a minimal reproducible example?

I guess the problem is gathered equation with many lines. But, regardlessly, the following code yields the problem mentioned before.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{STUDIES DURING THE LAST SIX MONTHS INCLUDED IN TIME PLAN BUT NOT CONDUCTED AND REASONS (if any)}\label{Ch5}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

What are the other techniques and methods that have been used so far? Why the preferred technique was selected? Is there any alternative methodology or technique if any problems occur while implementing these techniques or conducting the experiments? Is there any alternative plan (Plan-B)? Other relevant issues must be discussed. 

\section{Practical Application of This Study}

In this thesis, the necessary steps for constructing an end-to-end streamflow forecasting system were discussed. These steps include the use.

\section{Second Level Title: First Letters Capital}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gub rgren, no sea.

\subsection{Third level title: Only first letter capital}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gub rgren, no sea.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gub rgren, no sea. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gub rgren, no sea. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gub rgren, no sea. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gub rgren, no sea.

\subsubsection{Fourth level title: Only first letter capital}

Stet clita kasd gub rgren, no sea takimata sanctus est Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut lab ore sit et dolore magna.

%\newpage
%{\bf Fifth level title: No numbering after fourth level titles}
\subsubsubsection{Fifth level title: No numbering after fourth level titles}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

\subsubsection{Plate bending analysis}

    The coupled system of differential equations and boundary conditions for a uniformly loaded and simply supported unit square plate is given as,

        \begin{equation}
            \begin{gathered}
                \nabla^{2}\left(\frac{\partial \theta_{x}}{\partial x}+\frac{\partial \theta_{y}}{\partial y}\right)=\frac{q}{D} \\
                \\
                \nabla^{2} u_z-\frac{\partial \theta_{x}}{\partial x}-\frac{\partial \theta_{y}}{\partial y}=-\frac{q}{\kappa G h} \\
                \\
                \nabla^{2}\left(\frac{\partial \theta_{x}}{\partial y}-\frac{\partial \theta_{y}}{\partial x}\right)=\frac{2 \kappa G h}{D(1-\nu)}\left(\frac{\partial \theta_{x}}{\partial y}-\frac{\partial \theta_{y}}{\partial x}\right)
                \\ \\
                0 \leq x,y \leq 1
                \\ \\
                u_z(x,0) = u_z(x,1) = u_z(0,y) = u_z(1,y) = 0 
            \end{gathered}
            \label{Mindlin-Static}
        \end{equation}
ooaj commented 3 years ago

I assume you are talking about "Plate bending analysis"; in that case you just should use \newpage as mentioned by @ondes. If you want to, however, automate this, you can use the method mentioned in [1]:

\preto{\subsection}{\clearpageafterfirst}
\preto{\subsubsection}{\filbreak}
\newcommand{\clearpageafterfirst}{%
  \gdef\clearpageafterfirst{\clearpage}%
}

If you also want to this for each subsection (rather than subsubsection), then just use the original one in [1].

[1] https://tex.stackexchange.com/a/162974/146683

tuncaen commented 3 years ago

\newpage may be a solution if the document is complete, \clearpageand \filbreak method did not solve the issue.

ondes commented 3 years ago

Yes, I think \newpage after finalizing your content would be sufficient, that is the trick I still use for other documents.

If you find another method working, it would be great to implement it inside this template, though.