6

i want to place a logo on a colored titlepage, but google search and manual reading did not helped me out. May some of the experts help me out?

Here is my coding-sample, inspired by the "Heidelberg" theme:

\documentclass[12pt,demo]{scrreprt}
\usepackage{geometry}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage[T1]{fontenc}            
\usepackage[utf8]{inputenc}         
\usepackage[ngerman]{babel}            
\usepackage{lmodern}               
\usepackage[onehalfspacing]{setspace}  
\usepackage{lipsum}

\definecolor{titlepagecolor}{cmyk}{1,.10,0,0}
\definecolor{namecolor}{cmyk}{1,.50,0,.10} 
\definecolor{white}{cmyk}{0,0,0,0} 

\begin{document}

\begin{titlepage}
    \pagecolor{titlepagecolor}
    \newgeometry{left=5cm,right=1cm,bottom=1cm} 
    \noindent
    \color{white}
    {\LARGE \textsf{Subject} } 
    \par
    \noindent
    \color{white}
    \makebox[0pt][l]{\rule{1.3\textwidth}{1pt}}
    \par\medskip
    {\noindent \huge\textbf{\textsf{Title}}}
    \par\medskip
    {\noindent\huge\textbf{\textsf{Subtitle} }}
    \par

\vfill

\begin{flushright}
 \includegraphics[scale=0.6]{logo.jpg}
\end{flushright}

\end{titlepage}
\restoregeometry 

\nopagecolor lipsum[1-9]

\end{document}
1
  • 1
    Welcome to TeX.SX! Where do you want to place the logo? On top of the page or somewhere on top of the colour layer?
    – user31729
    Commented Jul 19, 2016 at 21:18

3 Answers 3

6

Something like this ? (Well, maybe not quite…)

\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{titlepagecolor}{cmyk}{1,.10,0,0}
\definecolor{namecolor}{cmyk}{1,.50,0,.10}
\definecolor{white}{cmyk}{0,0,0,0}

\begin{document}

\begin{titlepage}
    \pagecolor{titlepagecolor}
    \newgeometry{left=5cm,right=1cm,bottom=1cm}
    \noindent
\begin{flushright}
\vspace*{-3cm}
 \includegraphics[scale=0.5]{pepe-le-pew1}
 \vspace{2cm}
\end{flushright}
    \color{white}
    {\LARGE \textsf{Subject} }
    \par
    \noindent
    \color{white}
    \makebox[0pt][l]{\rule{1.3\textwidth}{1pt}}
    \par\medskip
    {\noindent \huge\textbf{\textsf{Title}}}
    \par\medskip
    {\noindent\huge\textbf{\textsf{Subtitle} }}
    \par

\vfill%

\end{titlepage}
\restoregeometry

\nopagecolor lipsum[1-9]

\end{document} 

enter image description here

5

Using Bernard's (+1) subject and title as a start but using a different methodology and fewer packages,

\documentclass[12pt]{scrreprt}
\usepackage{geometry}
\usepackage{xcolor}
\usepackage{graphicx}   
\usepackage{tikz}
\usepackage{tikzpagenodes}


\begin{document}

\begin{titlepage}

\begin{tikzpicture}[remember picture,overlay,shift={(current page.south west)}]
\fill[orange] (0,0)--(\paperwidth,0)--(\paperwidth,\paperheight)--(0,\paperheight)--cycle;
\end{tikzpicture}

\begin{tikzpicture}[remember picture,overlay,shift={(current page.north east)}]
\node[anchor=north east] (0,0) {\includegraphics[width=2in]{pig}};
\end{tikzpicture}

    \noindent
    \color{white}
    {\LARGE \textsf{Piglets} } 
    \par
    \noindent
    \color{white}
    \makebox[0pt][l]{\rule{1.3\textwidth}{1pt}}
    \par\medskip
    {\noindent \huge\textbf{\textsf{Cute pigs}}}
    \par\medskip
    {\noindent\huge\textbf{\textsf{Out and about} }}
    \par




\end{titlepage}



\end{document}

enter image description here

2

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}

enter image description here

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}
1
  • Why is using a layer here better? Can you add an explanation?
    – Johannes_B
    Commented Jul 20, 2016 at 8:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .