0

Is it possiable to force the table to be placed directly below the section without creating this space between them as in the screen shot below.

thesis.text

    \documentclass[
        english,
        11pt,
        twoside,
        a4paper,
        BCOR8.25mm,
        DIV10,
        headsepline,
        footsepline
    ]{scrbook}
    \include{commands}
    \begin{document}

    \selectlanguage{english}
    \frontmatter


        \include{1-introduction}    

        \include{6-conclusion}

    %--------------------------------------------------------------------------
    \appendix


\end{document}

commands.tex

        \usepackage{a4}   
        \usepackage{fancyhdr}
        \usepackage[T1]{fontenc}
        \usepackage[utf8]{inputenc}
        \usepackage{babel} 
        \usepackage{cite}
        \usepackage{float}      
        \usepackage{caption}    
        \usepackage{amssymb}
        \usepackage{textcomp}
        \usepackage{graphicx}
        \usepackage{epsf}
        \usepackage{color}
        \definecolor{gray}{gray}{.75}
        \usepackage[]{geometry}
        \usepackage{makeidx}
        \makeindex 
        \usepackage{cellspace}
        \usepackage{listings}
        \usepackage{subfigure}
    %Abkürzungsverzeichnis
        \usepackage[intoc]{nomencl}
          \let\abbrev\nomenclature
          \renewcommand{\nomname}{Abkürzungsverzeichnis}
          \setlength{\nomlabelwidth}{.25\hsize}
          \renewcommand{\nomlabel}[1]{#1 \dotfill}
          \setlength{\nomitemsep}{-\parsep}
          \makenomenclature

      \newcommand{\abk}[2]{#1\abbrev{#1}{#2}}
        \usepackage{enumitem}
        \setitemize{enumsep=-3pt}
        \setitemize{itemsep=-3pt}

        \usepackage{theorem}
        \newcounter{theorem}
        \newtheorem{definition}[theorem]{Definition}


    \usepackage[bookmarks=true,
                    bookmarksopen=true,
                    bookmarksnumbered=true,
                    colorlinks=true,
                    linkcolor=black                 
                    ]
                   {hyperref}

    \usepackage{cleveref}

    \usepackage[colorinlistoftodos]{todonotes}
    \usepackage{algorithm}
    \usepackage{algorithmic}

    %Zitate
        \newcounter{quotectr}
        \newtheorem{myquote}[quotectr]{Zitat}

%------------------------------------------------------------------------------
%- Layout
%------------------------------------------------------------------------------


        \setcounter{secnumdepth}{2}
        \setcounter{tocdepth}{2}

    %Call this after each chapter to avoid headlines on empty pages
        \newcommand{\chapterfin}{\clearpage{\pagestyle{empty}\cleardoublepage}}
        \newcommand{\sectionfin}{\clearpage{\pagestyle{empty}\cleardoublepage}}





    % Fancyheaders  
        \fancyhf{} % Delete all fields
        %\fancyhead[EL,OR]{\thepage}
        \fancyhead[EL]{\nouppercase{\leftmark}}
        \fancyhead[OR]{\nouppercase{\rightmark}}
        \fancyfoot[EL,OR]{\thepage} 

    % Itemize look and feel
        \renewcommand{\labelitemi}{\rule[+0.9mm]{2.7pt}{2.7pt}}
        \renewcommand{\labelitemii}{--}


        \newcommand{\eigenname}[1]  {{\em #1}}

        \newcommand{\algref}[1]{Algorithmus~\ref{alg:#1}}

        \newcommand{\quoteref}[1]{Zitat~\ref{quote:#1}}

        \renewcommand{\leq}     {\leqslant}
        \renewcommand{\geq}     {\geqslant}
        \renewcommand{\epsilon} {\varepsilon}
        \newcommand{\musec}     {$\mu sec$\xspace}
        \newcommand{\muW}       {$\mu W$\xspace}
        \newcommand{\plusminus} {$\pm $\xspace}
    \hyphenation{name-space}    
    \hyphenation{name-spaces}   
    \hyphenation{ge-samten} 


    \graphicspath{{images/}}

    \renewcommand\bibname{Bibliographie}

  \makeindex

1-introduction.tex

\begin{table}[H]
\centering
\begin{tabular}{ |l|l|l| } 
\hline
route\_id & direction & route \\
\hline
1 & Grillenweg & 9 \\
\hline
2 & Bad Schwartau/ZOB & 9 \\
\hline
3 & Blankensee & 6 \\
\hline
4 & Hamburger Straße & 6 \\
\hline
\hline
\end{tabular}
 \caption{Route table after injection.}
\end{table}

enter image description here

Mr Asker
  • 837
  • It would be a good idea to include a complete, compilable file that demonstrates the problem. – Chris H Sep 30 '15 at 10:08
  • 1
    As the first measure, replace option H˛withh`, for further help, as said @ChrisH, the MWE is needed. – Zarko Sep 30 '15 at 10:29
  • From given code (it isn't MWE) try to make new file in which you directly include file 1-introduction (without \include mechanism). Then text before your table replace with some blind text, for example from package lipsum and see, if you receive equal mismatch in table position. And change option H in table to h. If result is satisfactory, then you have something in your text, which makes problems. – Zarko Sep 30 '15 at 11:21
  • Unrelated to the table but don't use \include before the preamble. \include{commands} should be \input{commands} (or better rename it to commands.sty and use \usepackage{commands}) – David Carlisle Sep 30 '15 at 15:36
  • @Zarko: I tested it with sample file and it works. I have three tables among each other I tried it with h for one table before but after replacing the H with h for all tables it works now. I dont really know if that the reason was?! What do you mean to this point? I appreciate any feedback from you ;) – Mr Asker Sep 30 '15 at 16:50
  • 1
    @MrAsker, option H actually destroy basic features of LaTeX: put the floats to desired place as close as possible. In the most circumstances LaTeX do this. Exception are cases, when for some floats is not enough place on page. In this case LaTeX move it on the top of the next page. It is advisable to use [htbp] options for floats. With H you request to be placed where it is placed in text and move all text after it on new page. Beside arisen ugly lookout of document often also arise side effect with which you faced. I strongly encourage you to do not use option H! – Zarko Sep 30 '15 at 17:13

0 Answers0