0

I am working with LaTeX and in a section I am writing, there is a big vertical space between the title in the subsection and in the content. I don't know how to remove this space (I attach a photo for a better understanding) enter image description here

In my commands before this subsection are figures without any strange command aly the one that I use (for paste a figure and for itemize).

I am using a lot of \usepackage:

    \documentclass[12pt, pdftex, pointlessnumbers, twoside, openright] 
    {scrreprt}
    \usepackage{enumitem}
    \newlist{tabitem}{itemize}{1}
    \setlist[tabitem]{wide=0pt, nosep, leftmargin= * 
     ,label=\textbullet,after=\vspace{- 
    \baselineskip},before=\vspace{-0.6\baselineskip}}
    \usepackage{a4}
    \usepackage{ae}
    \usepackage{amsbsy}
    \usepackage{amsfonts}
    \usepackage{amsmath}
    \usepackage{amssymb}
    \usepackage{amsthm}
    \usepackage{array}
    \usepackage{mathtools}
    \usepackage[german,english]{babel}
    \usepackage{bibgerm}
    \usepackage{color}
    \usepackage{epsfig}
    \usepackage{float}
    \usepackage[T1]{fontenc}
    \usepackage{graphicx}
    \usepackage[latin1]{inputenc}
    \usepackage[utf8]{inputenc}
    \usepackage{latexsym}
    \usepackage{layout}
    \usepackage{nomencl}
    \makenomenclature
    \renewcommand{\nomname}{Nomenclature}
    \usepackage{gensymb}
    \usepackage[]{geometry}
    \usepackage{afterpage}
    \usepackage[<options>]{scrlayer-scrpage} % \usepackage[automark] 
    {scrpage2}
    \usepackage{acronym} 
   \usepackage{titling}
   \usepackage{subfig}  % subfigure: Mehrere Unterbilder in einem Bild  
    \usepackage{nomencl}    % nomencl package for Symbol- oder 
    Formelverzeichnis
    %\usepackage{nomencl,etoolbox,ragged2e,siunitx}
    \usepackage{graphicx}
    \usepackage[lofdepth,lotdepth]{subfig}
    \usepackage{trfsigns}
    \usepackage{trsym}
    \usepackage[nice]{units}
    \usepackage{pythontex}
    \newcommand{\pymultiply}[2]{\py{#1*#2}}
    \usepackage{url}
    \usepackage{epstopdf}
    \usepackage[dvips]{geometry} 
    \usepackage{pdflscape}  % pdflscape: Einzelne Seiten im Querformat unter 
    PDF
    \usepackage[dvips]{rotating} % rotating: Drehen von Text und Bildern
    \newcommand{\matvar}[1]{\boldsymbol{#1}}  % Vectors/Matices bold - 
    variable
    \newcommand{\mat}[1]{\begin{pmatrix}#1\end{pmatrix}} % Matrix
    \allowdisplaybreaks
    \makenomenclature

And this is the part before that happens:

   \clearpage

    \item \textbf{Mutation:} At the end, the mutation is applied in 
    order to generate diversity and it is generated at some low 
    probability (i.e. 0.1) \cite{hesser1990towards} - see figure 
    \ref{fig:mutation}.
    \begin{figure}[!htbp]
        \centering
         \includegraphics[width=.45\textwidth]{mutation.jpg}
         \caption{Mutation example}
         \label{fig:mutation}
     \end{figure} 


    Briefly, the following flow chart depicts how the GA works (figure 
    \ref{fig:GA_chart}).
     \begin{figure}[!htbp]
      \centering
      \includegraphics[width=1\textwidth]{GA_chart.jpg}
      \caption{Flow chart from GA}
      \label{fig:GA_chart}
      \end{figure} \clearpage

Ingmar
  • 6,690
  • 5
  • 26
  • 47
  • Can you please add an MWE, which produces this output? – MaestroGlanz May 20 '22 at 08:25
  • Welcome to SE. Please include a complete example. It's impossible to guess what's happening without knowing which packages you're loading. – Miyase May 20 '22 at 08:25
  • sorry! I just added the \usepackage I am using and the lines before the big space occurs. I do not add everything before because it is a lot!! but If something else it is needed let me know – emmanuel May 20 '22 at 08:35
  • 1
    That is not a complete example. We need something we can copy and test as is and that illustrates your problem . Note yit should also be minimal, aka remove packages that are irrelevant to the problem (note that this is also a very important debugging tool) – daleif May 20 '22 at 08:39
  • This is still incomplete. The idea of a MWE is that we can copy-paste the code and compile it directly. Just make sure you remove anything that isn't related to the problem at hand. Thanks. – Miyase May 20 '22 at 08:39
  • Did you try to use \raggedbottom in the preamble? – Bernard May 20 '22 at 09:57
  • You are fighting the "float" mechanism -- try getting rid of all those \clearpage instructions, and maybe read through this – Thruston May 31 '22 at 08:43

0 Answers0