0

I use this command for 4 and 5 tiered subsections:

%-----------------------------------------------------------------------------
% add subsubsubsection
\newcommand{\subsubsubsection}[1]{\paragraph{#1}\mbox{}\\}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
% add subsubsubsubsection
\newcommand{\subsubsubsubsection}[1]{\paragraph{#1}\mbox{}\\}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
%-----------------------------------------------------------------------------

My problem is that the pdf has the order wrong. The table comes after some of the subsubsubsection instances in the pdf in spite of preceding them in the code.

I assume that the command lacks the necessary parts to control position and make it act like a normal subsection.

Please help me complete the missing parts to make this command work better.

Edit: an example for the table I'm using:

\begin{table}[h]
\begin{tabular}{lll}
 &  &  \\
 &  &  \\
 &  & 
\end{tabular}
\end{table}

2nd edit: How can I add a positional argument for my command to be implemented like:

\subsubsubsection{some title}[h]

Edit 3: requested minimal example

\documentclass[
    paper=a4,                       % Papierformat
    oneside,                        % einseitig
    fontsize=13pt,                % Schriftgröße
    headsepline=.5pt,             % untere Kopfzeilenlinie
    numbers=noenddot,             % 1.1.1. --> 1.1.1
    parskip=half,                 % halber Absatz
    captions=tableheading,        % Tabellenüberschriften
    DIV=12,                       % Satzspiegel (KOMA-Script)
%   toc=bibliography,             % Quellenverzeichnis ins Inhaltsverzeichnis aufnehmen
    %tocdepth=3,                  % Begrenzung der Ebenen im Inhaltsverzecihnis
    %headings=normal,                           % Größe der überschriften verkleinern
    final                                                   % Status des Dokuments (final/draft)
]{scrartcl}
%-----------------------------------------------------------------------------------------------------------
\begin{document}
%-----------------------------------------------------------------------------
%add subsubsubsection
\newcommand{\subsubsubsection}[1]{\paragraph{#1}\mbox{}\\}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
%add subsubsubsubsection
\newcommand{\subsubsubsubsection}[1]{\paragraph{#1}\mbox{}\\}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
%-----------------------------------------------------------------------------
\section{1st tier}
\begin{table}[h]
\begin{tabular}{lll}
a & a & a \\
a & a & a \\
a & a & a \\
\end{tabular}
\end{table}
\subsection{2nd tier}
\begin{table}[h]
\begin{tabular}{lll}
a & a & a \\
a & a & a \\
 a & a & a \\
\end{tabular}
\end{table}
\subsubsection{3rd tier}
\begin{table}[h]
\begin{tabular}{lll}
a & a & a \\
a & a & a \\
a & a & a \\
\end{tabular}
\end{table}
\subsubsubsection{4th tier}
\begin{table}[h]
\begin{tabular}{lll}
a & a & a \\
a & a & a \\
a & a & a \\
\end{tabular}
\end{table}
\subsubsubsubsection{5th tier}
\begin{table}[h]
\begin{tabular}{lll}
a & a & a \\
a & a & a \\
a & a & a \\
\end{tabular}
\end{table}

\end{document}

Toma
  • 494

0 Answers0