# Different \marginparwidth's for title page and part pages with scrbook

I would like to widen the outer margin of my book to make more room for side notes. In addition, the page footer should span the entire width of the text and the margin. Changes should be local to the table of contents and chapters, that is the page layouts of the title page and part pages should be left intact.

I have already managed to construct a minimal working example. However, the solution is not practical (nor neat), since, for example, one must insert \full before and \margin after every new part. Could this be automated?

My attempts with etoolbox's \patchcmd led nowhere i.e.

\makeatletter
\patchcmd{\scr@startpart}{\full}{}{}{}
\patchcmd{\scr@startchapter}{\margin}{}{}{}
\makeatother


didn't produce the desired output.

MWE:

\documentclass[openany]{scrbook}

\usepackage{showframe}
\usepackage{blindtext}
\usepackage{calc}
\usepackage{scrlayer-scrpage}

\renewcommand*{\partpagestyle}{empty}

\BeforeRestoreareas{\clearpage}

\begin{document}

\storeareas\full

\KOMAoptions{footwidth=textwithmarginpar}
\storeareas\margin

\full

\title{Title}
\author{Author}
\maketitle

\margin

\tableofcontents

\full

\margin

\blinddocument

\full

\margin

\blinddocument

\end{document}


You could patch \partheadstartvskip and \partheademptypage

\documentclass[open=any]{scrbook}

\usepackage{showframe}
\usepackage{blindtext}
\usepackage{calc}

\renewcommand*{\partpagestyle}{empty}

\BeforeRestoreareas{\clearpage}

\AtBeginDocument{
\storeareas\full
%
\KOMAoptions{footwidth=textwithmarginpar}%
\storeareas\margin
}

\usepackage{xpatch}
\xpretocmd\maketitle{\full}{}{\PatchFailed}
\xapptocmd\maketitle{\margin}{}{\PatchFailed}

\begin{document}
\title{Title}
\author{Author}
\maketitle
\tableofcontents
\blinddocument
\blinddocument
\end{document}


Simply re-defining the commands \addpart and \tableofcontents does the trick:

\documentclass[openany]{scrbook}

\usepackage{showframe}
\usepackage{blindtext}
\usepackage{calc}
\usepackage{scrlayer-scrpage}

\renewcommand*{\partpagestyle}{empty}

\BeforeRestoreareas{\clearpage}

\let\oldtoc\tableofcontents
\renewcommand{\tableofcontents}{%
\KOMAoptions{footwidth=textwithmarginpar}

\oldtoc

\typearea{current}%
}

\typearea{current}

\KOMAoptions{footwidth=textwithmarginpar}%
}

\begin{document}

\title{Title}
\author{Author}
\maketitle

\tableofcontents