0

I want to increase the left margin of paragraphs, but keep headings as they are. It should look similar to the layout of the hitec class.

I am using the scrartcl class. So far I tried

\setlength{\leftskip}{3cm}

The results looks well for text, but e.g. lists were not indented. What is the right (KOMA-Script) way to do that?

Schweinebacke
  • 26,336
handy
  • 13

2 Answers2

4

Unfortunaly there is no MWE in the question. So I do not know which KOMA-Script class is used and if the document is onesided or twosided. So here is an example for twosided scrbook using geometry and scrlayer-scrpage. If you use the outdated package scrpage2 or fancyhdr (not recommended for use with KOMA-Script) see here.

\documentclass{scrbook}[2015/10/03]
\usepackage{blindtext}% dummy text
\usepackage[T1]{fontenc}

\usepackage{geometry}
\usepackage{calc}
\newcommand\LeftMargin{3cm}
\geometry{
  layoutsize={21cm-\LeftMargin,27.9cm},
  layoutoffset={\LeftMargin,0cm},
  reversemarginpar,
  inner=2cm,
  outer=4cm,
  top=3cm,
  bottom=4cm,
  heightrounded,
  %showframe% to show the pagelayout
}

\makeatletter
\renewcommand{\chapterlinesformat}[3]{%
  \hspace*{-\LeftMargin}%
  \parbox[t]{\textwidth+\LeftMargin}{\raggedchapter\@hangfrom{#2}{#3}}%
}
\renewcommand{\sectionlinesformat}[4]{%
  \hspace*{-\LeftMargin}%
  \parbox[t]{\textwidth+\LeftMargin}{\raggedsection\@hangfrom{#3}{#4}}%
}
\makeatother

\usepackage[
  headwidth=\the\textwidth+\LeftMargin:-\LeftMargin:\LeftMargin% enlarge the headwidth
  ,headsepline,plainheadsepline% to make the header visible
  ,footwidth=head:-\LeftMargin:\LeftMargin% enlarge the footwidth
  ,footsepline,plainfootsepline% to make the footer visible
]{scrlayer-scrpage}

\begin{document}
\tableofcontents
\blinddocument
\end{document}

enter image description here

If you are using scrartcl remove the lines which redefines \chapterlinesformat and change the geometry settings because scrartcl is onesided.

enter image description here

Code:

\documentclass{scrartcl}[2015/10/03]
\usepackage{blindtext}% dummy text
\usepackage[T1]{fontenc}

\usepackage{geometry}
\usepackage{calc}
\newcommand\LeftMargin{3cm}
\geometry{
  layoutsize={21cm-\LeftMargin,27.9cm},
  layoutoffset={\LeftMargin,0cm},
  reversemarginpar,
  left=3cm,
  right=3cm,
  top=3cm,
  bottom=4cm,
  heightrounded,
  %showframe% to show the pagelayout
}

\makeatletter
\renewcommand{\sectionlinesformat}[4]{%
  \hspace*{-\LeftMargin}%
  \parbox[t]{\textwidth+\LeftMargin}{\raggedsection\@hangfrom{#3}{#4}}%
}
\makeatother

\usepackage[
  headwidth=\the\textwidth+\LeftMargin:-\LeftMargin:\LeftMargin% enlarge the headwidth
  ,headsepline,plainheadsepline% to make the header visible
  ,footwidth=head:-\LeftMargin:\LeftMargin% enlarge the footwidth
  ,footsepline,plainfootsepline% to make the footer visible
]{scrlayer-scrpage}

\begin{document}
\tableofcontents
\blinddocument
\end{document}
esdd
  • 85,675
1

I solved my problem with the enumitem package.

\RequirePackage{calc}
\newlength{\textleftmargin}
\setlength{\textleftmargin}{3cm}
\RequirePackage{enumitem}
\setlength{\leftskip}{\textleftmargin}
\setlist[itemize]{leftmargin=\textleftmargin}
\setlist[enumerate]{leftmargin=\textleftmargin}
\setlist[description]{leftmargin=\textleftmargin+1cm,labelindent=\textleftmargin}
handy
  • 13