Skip to content

Instantly share code, notes, and snippets.

@soypat
Created August 18, 2021 20:36
Show Gist options
  • Save soypat/51c53d1f40c2fe7b16ce6783d20a0d7d to your computer and use it in GitHub Desktop.
Save soypat/51c53d1f40c2fe7b16ce6783d20a0d7d to your computer and use it in GitHub Desktop.
subsubsubsubsection for Latex
%----------------Lo de 4th layer de subsectrion
\titleclass{\subsubsubsection}{straight}[\subsection]
\newcounter{subsubsubsection}[subsubsection]
\renewcommand\thesubsubsubsection{\thesubsubsection.\arabic{subsubsubsection}}
\renewcommand\theparagraph{\thesubsubsubsection.\arabic{paragraph}} % optional; useful if paragraphs are to be numbered
\titleformat{\subsubsubsection}
{\normalfont\normalsize\bfseries}{\thesubsubsubsection}{1em}{}
\titlespacing*{\subsubsubsection}
{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{5}{\z@}%
{3.25ex \@plus1ex \@minus.2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{\@startsection{subparagraph}{6}{\parindent}%
{3.25ex \@plus1ex \@minus .2ex}%
{-1em}%
{\normalfont\normalsize\bfseries}}
\def\toclevel@subsubsubsection{4}
\def\toclevel@paragraph{5}
\def\toclevel@paragraph{6}
\def\l@subsubsubsection{\@dottedtocline{4}{7em}{4em}}
\def\l@paragraph{\@dottedtocline{5}{10em}{5em}}
\def\l@subparagraph{\@dottedtocline{6}{14em}{6em}}
\makeatother
% \setcounter{secnumdepth}{4} %Esto es lo que estaba antes
% \setcounter{tocdepth}{4}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
%----------------termina lo de 4th layer de subsection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment