4

i need to do the following design for a class in latex. I know how to format stuff but I don't know how to draw the gray areas, footer and the image.

What I got already:

\documentclass[
  a4paper,
  12pt,
  titlepage,
  footheight=12pt,
]{scrbook}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[page]{totalcount}

\usepackage{amsmath}
\usepackage{geometry}
 \geometry{
 a4paper,
 total={170mm,257mm},
 left=15mm,
 right=15mm,
 top=15mm,
 bottom=15mm,
 }

\usepackage[usenames, dvipsnames]{xcolor}

\definecolor{rubgray}{gray}{0.7}
\definecolor{rubblue}{HTML}{003560}
\definecolor{rubgreen}{HTML}{8dae10}

\begin{document}
    \begin{titlepage}
        \begin{center}
            \vspace*{4cm}
            {\Huge \textbf{ \textcolor{rubgray}{ABSCHLUSSBERICHT}}}
            \\
            \vspace*{1cm}
            {\Large \textbf{ \textcolor{rubblue}{Funktionsweise und Datenschutzgefährdung der Smart Border Systeme}}}
            \\
            \vspace*{2cm}
            Abschlussbericht der Projektarbeit für das Fach\\
            \textbf{Datenschutz WS 16/17}\\
            Im Studienfach\\
            \textbf{    B.Sc. Angewandte Informatik}
        \end{center}
        \vfill
        \begin{flushright}
            \textbf{Saif Al-Dilaimi (xxx)} \\
            \textcolor{rubblue}{\textbf{RUHR-UNIVERSITÄT} BOCHUM} \\
            Institut für Neuroinformatik \\
            Ruhr-Universität Bochum \\
            Universitätsstraße 150 \\
            44801 Bochum
        \end{flushright}
    \end{titlepage}

    \begin{flushleft}
    lölöö           
    \end{flushleft}
\end{document}

The structure of my page should have this design:

1. Page:

enter image description here

2, 3, ... Page:

enter image description here

as you see the first page has those gray areas and a image (the top right RUB logo) but no footer with the document title.

on the seconde page and after the image is gone but the gray areas and the footer is now there.

I really hope you guys can help..

5
  • Welcome! There isn't room with the page dimensions you've defined. – cfr Dec 2 '16 at 22:31
  • What do you mean? – SaifDeen Dec 2 '16 at 22:40
  • Look where the page numbers end up. That's where your footer is. – cfr Dec 2 '16 at 22:47
  • This looks like the sort of thing for which RUB probably already has a LaTeX template. You're more likely to get exactly what you need by asking them for it rather than trying to duplicate their style from scratch. – Emma Dec 3 '16 at 5:21
  • I asked already the design division and they don't have a latex template :/ – SaifDeen Dec 3 '16 at 6:56
2

I would use package scrlayer-scrpage not only for the footer but also to define new layers for the rules at the bottom and the right margin. These new layers can be added to all page styles including empty. And for the logo on the title page a new layer page style titlepage can be used.

\documentclass[
  a4paper,
  12pt,
  titlepage,
  ngerman,
  footheight=15pt,
  headheight=15pt,
  oneside% seems to be a onesided layout
]{scrbook}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[page]{totalcount}
\usepackage{amsmath}
\usepackage{geometry}
 \geometry{
     total={170mm,257mm}
 }
\usepackage[dvipsnames,svgnames,x11names]{xcolor}

%% footer
\usepackage{scrlayer-scrpage}
\setlength\footheight{15pt}
\clearpairofpagestyles
\ifoot*{\pagemark}
\cfoot*{Center}
\ofoot*{Right}
\setkomafont{pageheadfoot}{\sffamily\small}
\addtokomafont{pagenumber}{\sffamily\small}

\renewcommand\pagemark{{%
    \textbf{\MakeUppercase{\pagename}}
    \usekomafont{pagenumber}%
    \thepage/\totalpages
}}

%% rules on every page
\DeclareNewLayer[
    background,
    bottommargin,
    addvoffset=-\footheight,
    addvoffset=-.5ex,
    mode=picture,
    contents=\putUL{\textcolor{Silver}{\rule[-\layerheight]{\layerwidth}{\layerheight}}}
]{bottomrule}
\DeclareNewLayer[
    clone=bottomrule,
    textarea,
    voffset=0pt,
    height=\paperheight,
    addhoffset=\textwidth,
    addhoffset=1ex
]{rightrule}
\AddLayersToPageStyle{@everystyle@}{bottomrule,rightrule}

%% logo on the title page
\usepackage{graphicx}
\DeclareNewLayer[
    clone=rightrule,
    contents=\putUL{\raisebox{-\height}{\makebox[5mm][r]{\includegraphics[scale=.7]{example-grid-100x100bp}}}}
]{titlepagelogo}
\DeclarePageStyleByLayers{titlepage}{titlepagelogo}
%%

\definecolor{rubgray}{gray}{0.7}
\definecolor{rubblue}{HTML}{003560}
\definecolor{rubgreen}{HTML}{8dae10}

\usepackage{blindtext}% for dummy text

\begin{document}
\begin{titlepage}
  \thispagestyle{titlepage}
  \begin{center}
    \vspace*{4cm}
    {\Huge \textbf{ \textcolor{rubgray}{ABSCHLUSSBERICHT}}}
    \\
    \vspace*{1cm}
    {\Large \textbf{ \textcolor{rubblue}{Funktionsweise und Datenschutzgefährdung der Smart Border Systeme}}}
    \\
    \vspace*{2cm}
    Abschlussbericht der Projektarbeit für das Fach\\
    \textbf{Datenschutz WS 16/17}\\
    Im Studienfach\\
    \textbf{    B.Sc. Angewandte Informatik}
  \end{center}
  \vfill
  \begin{flushright}
    \textbf{Saif Al-Dilaimi (xxx)} \\
    \textcolor{rubblue}{\textbf{RUHR-UNIVERSITÄT} BOCHUM} \\
    Institut für Neuroinformatik \\
    Ruhr-Universität Bochum \\
    Universitätsstraße 150 \\
    44801 Bochum
  \end{flushright}
\end{titlepage}

\blinddocument
\end{document}

enter image description here

enter image description here

2
4

The logo doesn't look very good because it is currently grey-on-grey and you will need to adjust the xshift appropriately for your image. However, that should be easy enough.

This answer uses:

  • TikZ to create the grey background;
  • tikzpagenodes to place the image and grey background;
  • everypage to add the image and background on the appropriate pages;
  • scrlayer-scrpage to configure the footer.

I've adjusted the geometry settings in response to scrlayer-scrpages complaints and the need to abide by the dictates of physical reality. I've left the size of the text block as was, set headheight according to the warnings (otherwise, it gets changed and causes inconsistent layout. I don't know why it won't let it be 0pt but it won't.) I've set \footheight directly in the same way. (Again, otherwise, the layout will be inconsistent. Adjust footskip in the settings as desired. I've used 10mm. Use verbose and/or showframe to have geometry tell you what it is doing and read the console output like a hawk for warnings from geometry, KOMA and/or scrlayer-scrpage. Adjust the pageheadfoot disposition as required. I've used small sans-serif as an example.

\documentclass[
  a4paper,
  12pt,
  titlepage,
  ngerman,
]{scrbook}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[page]{totalcount}
\usepackage{amsmath}
\usepackage{geometry}
 \geometry{
 total={170mm,257mm},
 headheight=15pt,
 marginratio=1:1,
 marginparwidth=0pt,
 marginparsep=0pt,
 footskip=10mm,
 }
\usepackage[dvipsnames,svgnames,x11names]{xcolor}
\usepackage{everypage,tikzpagenodes}
\usepackage{scrlayer-scrpage}
\setlength\footheight{15pt}
\ohead{}
\chead{}
\ihead{}
\ofoot{Out here.}
\cfoot{This is the footer for every page but the first of this document.}
\ifoot{In here.}
\setkomafont{pageheadfoot}{\sffamily\small}
\pagestyle{scrheadings}
\AddEverypageHook{%
  \tikz[remember picture, overlay]{%
    \fill [Silver] (current page.north east) |- (current page.south west) |- ([xshift=2.5mm,yshift=-2.5mm]current page text area.south east) |- cycle;
  }%
}

\definecolor{rubgray}{gray}{0.7}
\definecolor{rubblue}{HTML}{003560}
\definecolor{rubgreen}{HTML}{8dae10}

\usepackage{kantlipsum}

\begin{document}
\begin{titlepage}
  \begin{center}
    \vspace*{4cm}
    {\Huge \textbf{ \textcolor{rubgray}{ABSCHLUSSBERICHT}}}
    \\
    \vspace*{1cm}
    {\Large \textbf{ \textcolor{rubblue}{Funktionsweise und Datenschutzgefährdung der Smart Border Systeme}}}
    \\
    \vspace*{2cm}
    Abschlussbericht der Projektarbeit für das Fach\\
    \textbf{Datenschutz WS 16/17}\\
    Im Studienfach\\
    \textbf{    B.Sc. Angewandte Informatik}
  \end{center}
  \vfill
  \begin{flushright}
    \textbf{Saif Al-Dilaimi (xxx)} \\
    \textcolor{rubblue}{\textbf{RUHR-UNIVERSITÄT} BOCHUM} \\
    Institut für Neuroinformatik \\
    Ruhr-Universität Bochum \\
    Universitätsstraße 150 \\
    44801 Bochum
  \end{flushright}
  \AddThispageHook{%
    \tikz[overlay,remember picture]{\node [anchor=north, xshift=-5mm, inner sep=0pt] at (current page text area.east |- current page.north) {\includegraphics[scale=.4]{example-image-golden-upright}};
    }%
  }%
\end{titlepage}

\kant[1-10]
\end{document}

double-page

titlepage

5
  • Omg, this looks perfect! I have to check it out this evening(early morning here) because I'm not home. – SaifDeen Dec 3 '16 at 7:01
  • I had time to test it and it works as expected! thanks a lot. Altough I prefer the answer of @esdd because the rules and layers simplify a lot! I will accept yours because you was first posting a working solution but I will his example.. thx to you both! – SaifDeen Dec 4 '16 at 2:14
  • 1
    @SaifDeen Please accept esdd's answer rather than mine. It doesn't matter who answered first. What matters is which answer is better or most helpful. esdd's is better and helped you most. – cfr Dec 4 '16 at 2:17
  • Hey any idea on that one? tex.stackexchange.com/questions/402540/… – SaifDeen Nov 22 '17 at 11:18
  • @SaifDeen Looks like you got good answers already. :) – cfr Nov 25 '17 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.