You can play with the vertical spaces. I defined all section commands new:
\documentclass{scrbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[automark]{scrpage2}
\usepackage{xcolor}
\usepackage{geometry}
\geometry{a4paper, top=35mm, left=30mm, right=60mm, bottom=25mm, headsep=15mm, footskip=12mm}
\makeatletter
\newcommand\makeSecHead[4][\fbox]{%
\@namedef{#2}{\@ifnextchar*{\@nameuse{#2@i}}{\@nameuse{#2@ii}}}
%
\expandafter\def\csname#2@i\endcsname*##1{\par\vspace{#4}\noindent
#1{\parbox{\dimexpr\textwidth-2\fboxsep-2\fboxrule}{%
\normalfont\normalsize#3\makebox[40pt][l]{}~##1}}\par\vspace{#4}}%
%
\expandafter\def\csname#2@ii\endcsname{\@ifnextchar[{\@nameuse{#2@iii}}{\@nameuse{#2@iv}}}%
%
\expandafter\def\csname#2@iii\endcsname[##1]##2{\par\vspace{#4}\noindent
#1{\parbox{\dimexpr\textwidth-2\fboxsep-2\fboxrule}{%
\refstepcounter{#2}\normalfont\normalsize#3\makebox[40pt][l]{\@nameuse{the#2}}~##2}}%
\addcontentsline{toc}{#2}{\@nameuse{the#2}~##1}\par\vspace{#4}}%
%
\expandafter\def\csname#2@iv\endcsname##1{\par\vspace{#4}\noindent
#1{\parbox{\dimexpr\textwidth-2\fboxsep-2\fboxrule}{%
\refstepcounter{#2}\normalfont\normalsize#3\makebox[40pt][l]{\@nameuse{the#2}}~##1}}%
\addcontentsline{toc}{#2}{\@nameuse{the#2}~##1}\par\vspace{#4}}%
}
\makeatother
\makeSecHead[\colorbox{gray!30}]{chapter}{\Huge\bfseries}{20pt}
\makeSecHead{section}{\LARGE\bfseries}{15pt}
\makeSecHead{subsection}{\Large\bfseries}{12pt}
\makeSecHead{subsubsection}{\large\bfseries}{10pt}
\begin{document}
\tableofcontents
\bigskip
\chapter*{Test unnumbered chapter}
Text
\section*{Test unnumbered section}
Text
\subsection*{Test unnumbered subsection}
Text
\chapter{Test numbered chapter}
Text
\section{Test numbered section}
Text
\section*{Test unnumbered section}
Text
\subsection{Test numbered subsection}
Text
\subsection*{Test unnumbered subsection}
Text
\end{document}
And here is some code for placing images without textpos
:
\ifoot[{\makebox[\linewidth][r]{%
\makebox(0,0){\put(10,200){\includegraphics[width=2cm,height=4cm]{tiger}}}}}]
{\makebox(0,0){\put(-100,200){\includegraphics[width=2cm,height=4cm]{tiger}}}}
In scrbook
/scrreport
, the skip before/at the end of a chapter is given by
\renewcommand*{\chapterheadstartvskip}{%
\vspace*{2.3\baselineskip}%
}%
\renewcommand*{\chapterheadendvskip}{%
\vspace{1.725\baselineskip
\@plus .115\baselineskip \@minus .192\baselineskip}%
}%
Adjust them to your liking. In terms of \section
s, the KOMA-script bundle still uses \@startsection
(see Where can I find help files or documentation for commands like \@startsection
for LaTeX?). Here's the definition for \section
:
\newcommand\section{%
\@startsection{section}{\sectionnumdepth}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\ifnum \scr@compatibility>\@nameuse{scr@v@2.96}\relax
\setlength{\parfillskip}{\z@ plus 1fil}\fi
\raggedsection\normalfont\sectfont\nobreak\size@section}%
}
Adjust the two rubber lengths (arguments #4
and #5
to \@startsection
) to suit your needs.
Here is a minimal example where the mentioned lengths have been adjusted:
\documentclass[11pt,a4paper,BCOR10mm,DIV11,toc=listof,parskip=full,twocolumn]{scrbook}
\usepackage{etoolbox}
\makeatletter
\renewcommand{\chapterheadstartvskip}{\vspace{0pt}}
\renewcommand{\chapterheadendvskip}{\vspace{\baselineskip}}
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\patchcmd{\section}{-3.5ex \@plus -1ex \@minus -.2ex}{-\baselineskip}{}{}
\patchcmd{\section}{2.3ex \@plus .2ex}{.5\baselineskip}{}{}
\makeatother
\begin{document}
\raggedright
\chapter{chap1}
\section{sec1}
blaahblah
\section{sec2}
Blah
\chapter{chap2}
BlahBlah
\chapter{chap3}
Blah
\end{document}
Of course the above only references changes to \chapter
and \section
. You'd have to adjust lower-level sectional units in an analogous way. For example, here's an option to remove even more spacing around the sectional units, this time including that of \subsection
:
\usepackage{etoolbox}
\makeatletter
\renewcommand{\chapterheadstartvskip}{\vspace{0pt}}
\renewcommand{\chapterheadendvskip}{\vspace{\baselineskip}}
% \patchcmd{<cmd>}{<search>}{<replace>}{<success>}{<failure>}
\patchcmd{\section}{-3.5ex \@plus -1ex \@minus -.2ex}{-\z@}{}{}
\patchcmd{\section}{2.3ex \@plus .2ex}{1sp}{}{}
\patchcmd{\subsection}{-3.25ex\@plus -1ex \@minus -.2ex}{-\z@}{}{}
\patchcmd{\subsection}{1.5ex \@plus .2ex}{1sp}{}{}
\patchcmd{\@xsect}{\ignorespaces}{\vspace*{-.5\baselineskip}\ignorespaces}{}{}
\makeatother
Best Answer
With the latest version of KOMA-script, you can declare
MWE:
Output: