This Topic is complementary to my first forum topics:
https://latex.org/forum/viewtopic.php?f=48&t=34795
https://latex.org/forum/viewtopic.php?f=48&t=34799
Till now I´ve been mainly working with KOMA-script and it´s documentation scrguide.
Here are the adjustments I´ve done before:
Code: Select all
\documentclass[
% paper=a4,
fontsize=12pt,
]{scrreprt}
\usepackage{lipsum}
\usepackage{tgadventor}
\renewcommand*\familydefault{\sfdefault} % Only if the base font of the document is to be sans serif
\usepackage[T1]{fontenc}
\setcounter{secnumdepth}{3}
\renewcommand*{\chapterformat}{
\thechapter.\enskip} %\autodet wurde durch . ersetzt
\renewcommand*{\sectionformat}{
\thesection.\enskip} %\autodet wurde durch . ersetzt
\renewcommand*{\subsectionformat}{
\thesubsection.\enskip} %\autodet wurde durch . ersetzt
\renewcommand*{\subsubsectionformat}{
\thesubsubsection.\enskip} %\autodet wurde durch . ersetzt
\addtokomafont{chapter}{\normalfont\sffamily}
\addtokomafont{paragraph}{\normalfont\underline}
\usepackage{xcolor}
\setlength{\fboxsep}{10pt}
\makeatletter
\renewcommand{\chapterlinesformat}[3]{%
\fcolorbox{black}{lightgray}{%
% \framebox{
\parbox{\dimexpr\linewidth-5
\fboxrule-2\fboxsep}{%
\@hangfrom{#2}\MakeUppercase{#3}%
}%
}%
}%}
\makeatother
\makeatletter
\renewcommand{\sectionlinesformat}[4]{%
\ifstr{#1}{section}{%
\parbox[t]{\linewidth}{%
\raggedsection\@hangfrom{\hskip #2#3}{#4}\par%
\vspace*{-1\ht\strutbox}\rule{\linewidth}{.8pt}%
}%
}{%
\@hangfrom{\hskip #2#3}{#4}}%
}
\makeatother
%% changes of the
%\makeatletter
%\renewcommand{\subsectionlinesformat}[4]{%
% \ifstr{#1}{section}{%
% \parbox[t]{\linewidth}{%
% \raggedsection\@hangfrom{\hskip #2#3}{#4}\par%
% \vspace*{-1\ht\strutbox}\rule{\linewidth}{.8pt}%
% }%
% }{%
% \@hangfrom{\hskip #2#3}{#4}}%
%}
%\makeatother
%\makeatletter
%\renewcommand{\subsubsectionlinesformat}[4]{%
% \Ifstr{#1}{section}{%
% \hspace*{#2}%
% \colorbox{red}{%
% \parbox{\dimexpr\linewidth
% -2\fboxrule-2\fboxsep-#2}{%
% \raggedsection
% \@hangfrom{#3}{#4}%
% }%
% }%
% }{%
% \@hangfrom{\hskip #2#3}{#4}%
% }%
%}
%\makeatother
\begin{document}
\chapter{Allgemeine Angaben}
\lipsum[2]
\section{Konsensinhaber}
\lipsum[5]
\subsection{Subsection}
\lipsum[3]
\subsubsection{Subsubsection}
\lipsum[2]
\paragraph{Paragraph}
\lipsum[2]
\end{document}
I would also like to insert a linebreak with a small gap after the paragraph heading
And I´m not shure if I really want to do that, but how can I set the sectionnumber justified to the paragraph text?