With a KOMA-Script class you can redefine \sectionlinesformat
to shift the section numbers in the margin. To enlarge header and footer you have to use a package for header and footer.
scrlayer-scrpage
The recommended header and footer package for usage with KOMA-Script classes is scrlayer-scrpage
.
\documentclass[
english,
listof=totoc,
%twoside,
parskip=half- % using parskip instead parindent
]{scrartcl}[2015/10/03]
\usepackage{blindtext}% dummy text
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\newcommand\LeftMargin{.5cm}
\renewcommand*\sectionlinesformat[4]{%
\ifstr{#3}{}{}{\hspace*{-\LeftMargin}}% unnumbered sections are not shifted
#3#4%
}
\usepackage[
headwidth=\the\textwidth+\LeftMargin:-\LeftMargin:\LeftMargin% enlarge the headwidth
,headsepline% to make the header visible
,footwidth=head:-\LeftMargin:\LeftMargin% enlarge the footwidth
,footsepline% to make the footer visible
]{scrlayer-scrpage}
\begin{document}
\begin{titlepage}
TEST
\end{titlepage}
\tableofcontents
\blinddocument
\end{document}
Result:
scrpage2
Note that scrpage2
is outdated. Its successor is scrlayer-scrpage
. The following example does not work für twosided documents because scrpage2
does not know different offsets for odd and even pages.
\documentclass[
english,
listof=totoc,
parskip=half- % using parskip instead parindent
]{scrartcl}[2015/10/03]
\usepackage{blindtext}% dummy text
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\newcommand\LeftMargin{.5cm}
\renewcommand*\sectionlinesformat[4]{%
\ifstr{#3}{}{}{\hspace*{-\LeftMargin}}% unnumbered sections are not shifted
#3#4%
}
\usepackage[headsepline,footsepline]{scrpage2}
\pagestyle{scrheadings}
\setheadwidth[-\LeftMargin]{\dimexpr\textwidth+\LeftMargin\relax}
\setfootwidth[-\LeftMargin]{head}
\begin{document}
\begin{titlepage}
TEST
\end{titlepage}
\tableofcontents
\blinddocument
\end{document}
fancyhdr
Here is also a suggestion for fancyhdr
that works with both onesided and twosided documents.
\documentclass[
english,
listof=totoc,
%twoside,
parskip=half- % using parskip instead parindent
]{scrartcl}[2015/10/03]
\usepackage{blindtext}% dummy text
\usepackage{helvet}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{babel}
\newcommand\LeftMargin{.5cm}
\renewcommand*\sectionlinesformat[4]{%
\ifstr{#3}{}{}{\hspace*{-\LeftMargin}}% unnumbered sections are not shifted
#3#4%
}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhfoffset[L]{\LeftMargin}
\renewcommand\footrulewidth{.4pt}% to make the footer visible
\begin{document}
\begin{titlepage}
TEST
\end{titlepage}
\tableofcontents
\blinddocument
\end{document}