Here is another suggestion using package scrlayer
and defining a new layer page style for the title page. This package is part of the KOMA-Script bundle. Note that scrlayer-scrpage
, the KOMA package for headers and footers, bases on scrlayer
. So if you use scrlayer-scrpage
in your document there is no additional package needed. The layers are already in the first run on the disered place.
\documentclass[12pt]{scrreprt}
\usepackage{geometry}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{lmodern}
\usepackage[onehalfspacing]{setspace}
\usepackage{lipsum}
\definecolor{titlepagebackground}{cmyk}{1,.10,0,0}
\definecolor{namecolor}{cmyk}{1,.50,0,.10}
\definecolor{titlepagetext}{cmyk}{0,0,0,0}
\usepackage{scrlayer}
\DeclareNewPageStyleByLayers{titlepage}{%
titlepage.bg,%
titlepage.logo%
}
\DeclareNewLayer[
background,
contents=\textcolor{titlepagebackground}{\rule{\layerwidth}{\layerheight}}
]{titlepage.bg}
\DeclareNewLayer[
background,
mode=picture,
contents=\putLR{\makebox[0pt][r]{\includegraphics[height=4cm]{example-image}}}
]{titlepage.logo}
\begin{document}
\begin{titlepage}
\thispagestyle{titlepage}
\newgeometry{left=5cm,right=1cm}
\color{titlepagetext}\sffamily
\begin{flushleft}
{%
\LARGE
Subject
\par
}
\smash{\makebox[0pt][l]{\rule{1.3\textwidth}{1pt}}}
\par
{%
\huge\bfseries
Title\par
Subtitle\par
}
\end{flushleft}
\end{titlepage}
\restoregeometry
lipsum[1-9]
\end{document}
It would also be possible to use an additional layer for the title page text. Then you do not have to change the page geometry for the title page and package geometry
can be removed.
\documentclass[12pt]{scrreprt}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{lmodern}
\usepackage[onehalfspacing]{setspace}
\usepackage{lipsum}
\definecolor{titlepagebackground}{cmyk}{1,.10,0,0}
\definecolor{namecolor}{cmyk}{1,.50,0,.10}
\definecolor{titlepagetext}{cmyk}{0,0,0,0}
\usepackage{scrlayer}
\DeclareNewPageStyleByLayers{titlepage}{%
titlepage.bg,%
titlepage.logo,%
titlepage.text%
}
\DeclareNewLayer[
background,
contents=\textcolor{titlepagebackground}{\rule{\layerwidth}{\layerheight}}
]{titlepage.bg}
\DeclareNewLayer[
background,
mode=picture,
contents=\putLR{\makebox[0pt][r]{\includegraphics[height=4cm]{example-image}}}
]{titlepage.logo}
\DeclareNewLayer[
foreground,
textarea,
hoffset=5cm,
width=\paperwidth-6cm,
contents={%
\color{titlepagetext}\sffamily
\begin{flushleft}
{%
\LARGE
Subject
\par
}
\smash{\makebox[0pt][l]{\rule{1.3\textwidth}{1pt}}}
\par
{%
\huge\bfseries
Title\par
Subtitle\par
}
\end{flushleft}
}
]{titlepage.text}
\begin{document}
\begin{titlepage}
\thispagestyle{titlepage}
\null
\end{titlepage}
\lipsum[1-9]
\end{document}