From 7684cb926f6906929516f3e6f0f6b2a7b49ae7d3 Mon Sep 17 00:00:00 2001
From: Jan Wille <jan.wille@stud.hs-hannover.de>
Date: Fri, 4 Aug 2023 21:08:37 +0200
Subject: [PATCH] make todos package use a wider page

---
 HsH-classes.dtx     | 12 ++++++++----
 src/HsH-article.cls | 12 ++++++++----
 src/HsH-report.cls  | 24 ++++++++++++++----------
 3 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/HsH-classes.dtx b/HsH-classes.dtx
index ddf7e5f..d9642fd 100644
--- a/HsH-classes.dtx
+++ b/HsH-classes.dtx
@@ -104,15 +104,20 @@
 %
 %<*article|report>
 % required for changing layout
+\PassOptionsToPackage{a4paper,vmargin=3cm,bindingoffset=1cm,textwidth=15.5cm}{geometry}
 \if@todos
-  \PassOptionsToPackage{left=1cm,right=5cm,top=3cm,bottom=3cm}{geometry}
+  \PassOptionsToPackage{paperwidth=1.2\paperwidth,left=2cm}{geometry}
 \else
-  \PassOptionsToPackage{left=3cm,right=2.5cm,top=3cm,bottom=3cm}{geometry}
+  \PassOptionsToPackage{nomarginpar}{geometry}
 \fi
 \RequirePackage{geometry}
 %
 % language specific localisation
-\if@german\PassOptionsToPackage{ngerman}{babel}\else\PassOptionsToPackage{english}{babel}\fi
+\if@german
+  \PassOptionsToPackage{ngerman}{babel}
+\else
+  \PassOptionsToPackage{english}{babel}
+\fi
 \RequirePackage{babel}
 %
 % required for header and footer
@@ -144,7 +149,6 @@
 \if@todos
   \PassOptionsToPackage{svgnames}{xcolor}
   \PassOptionsToPackage{
-    textwidth=4.5cm,
     textsize=small,
     figwidth=.6\textwidth
   }{todonotes}
diff --git a/src/HsH-article.cls b/src/HsH-article.cls
index b58cf14..fcd9e81 100644
--- a/src/HsH-article.cls
+++ b/src/HsH-article.cls
@@ -82,13 +82,18 @@
 \RequirePackage{graphicx}
 \RequirePackage{amsmath}
 \if@german\RequirePackage{ziffer}\fi
+\PassOptionsToPackage{a4paper,vmargin=3cm,bindingoffset=1cm,textwidth=15.5cm}{geometry}
 \if@todos
-  \PassOptionsToPackage{left=1cm,right=5cm,top=3cm,bottom=3cm}{geometry}
+  \PassOptionsToPackage{paperwidth=1.2\paperwidth,left=2cm}{geometry}
 \else
-  \PassOptionsToPackage{left=3cm,right=2.5cm,top=3cm,bottom=3cm}{geometry}
+  \PassOptionsToPackage{nomarginpar}{geometry}
 \fi
 \RequirePackage{geometry}
-\if@german\PassOptionsToPackage{ngerman}{babel}\else\PassOptionsToPackage{english}{babel}\fi
+\if@german
+  \PassOptionsToPackage{ngerman}{babel}
+\else
+  \PassOptionsToPackage{english}{babel}
+\fi
 \RequirePackage{babel}
 \PassOptionsToPackage{headsepline}{scrlayer-scrpage}
 \RequirePackage{scrlayer-scrpage}
@@ -105,7 +110,6 @@
 \if@todos
   \PassOptionsToPackage{svgnames}{xcolor}
   \PassOptionsToPackage{
-    textwidth=4.5cm,
     textsize=small,
     figwidth=.6\textwidth
   }{todonotes}
diff --git a/src/HsH-report.cls b/src/HsH-report.cls
index f78d875..cd49390 100644
--- a/src/HsH-report.cls
+++ b/src/HsH-report.cls
@@ -5,21 +5,21 @@
 %% The original source files were:
 %%
 %% HsH-classes.dtx  (with options: `report')
-%%
+%% 
 %% This is a generated file.
-%%
+%% 
 %% Copyright (C) 2021 by Jan Wille <mail@janwille.de>
-%%
+%% 
 %% This file may be distributed and/or modified under the conditions of
 %% the LaTeX Project Public License, either version 1.3 of this license
 %% or (at your option) any later version.  The latest version of this
 %% license is in:
-%%
+%% 
 %%    http://www.latex-project.org/lppl.txt
-%%
+%% 
 %% and version 1.3 or later is part of all distributions of LaTeX version
 %% 2021/01/01 or later.
-%%
+%% 
 \typeout{Adapted from KOMA script for use in Hochschule Hannover <2022-03-28> Jan Wille}
 \NeedsTeXFormat{LaTeX2e}
 \newcommand{\myClassName}{HsH-report}
@@ -82,13 +82,18 @@
 \RequirePackage{graphicx}
 \RequirePackage{amsmath}
 \if@german\RequirePackage{ziffer}\fi
+\PassOptionsToPackage{a4paper,vmargin=3cm,bindingoffset=1cm,textwidth=15.5cm}{geometry}
 \if@todos
-  \PassOptionsToPackage{left=1cm,right=5cm,top=3cm,bottom=3cm}{geometry}
+  \PassOptionsToPackage{paperwidth=1.2\paperwidth,left=2cm}{geometry}
 \else
-  \PassOptionsToPackage{left=3cm,right=2.5cm,top=3cm,bottom=3cm}{geometry}
+  \PassOptionsToPackage{nomarginpar}{geometry}
 \fi
 \RequirePackage{geometry}
-\if@german\PassOptionsToPackage{ngerman}{babel}\else\PassOptionsToPackage{english}{babel}\fi
+\if@german
+  \PassOptionsToPackage{ngerman}{babel}
+\else
+  \PassOptionsToPackage{english}{babel}
+\fi
 \RequirePackage{babel}
 \PassOptionsToPackage{headsepline}{scrlayer-scrpage}
 \RequirePackage{scrlayer-scrpage}
@@ -105,7 +110,6 @@
 \if@todos
   \PassOptionsToPackage{svgnames}{xcolor}
   \PassOptionsToPackage{
-    textwidth=4.5cm,
     textsize=small,
     figwidth=.6\textwidth
   }{todonotes}
-- 
GitLab