4

I'm trying to design a title page by modifying the Legrand Orange Book template.

Here's a MWE of the code I'm working with:

\documentclass[11pt]{article}
\usepackage{tikz}
\begin{document}
\begingroup
\thispagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
\draw (current page.center) node [fill=blue!30!white,fill opacity=0.6,text opacity=1,inner sep=1cm]{\Huge\centering\bfseries\sffamily\parbox[c][][t]{\paperwidth}{\centering TITLE \\ Second Row of Title\\[15pt] % Book title
{\Large Project work report}\\[20pt] % Subtitle
{\huge Name Surname}}}; % Author name
\end{tikzpicture}
\vfill
\endgroup
\end{document}

The output right now is this: Current title page

What I'm aiming to achieve is something like this (nevermind the grey area above the rectangle): Expected title page

In short, I'd like to superimpose a white dashed line on the top side of the blue rectangle. Not only I don't know how to achieve that kind of dashing in TikZ, but since the rectangle has variable size I can't figure out how to impose a style for the top side.

Just to clarify, I don't care about the text. My question only relates to the design of the background rectangle.

Thanks a lot to anyone that will help.

5

Add a name to the backagorund box and use it as reference for the dashed line:

\documentclass[11pt]{article}
\usepackage{tikz}
\begin{document}
\begingroup
\thispagestyle{empty}
\begin{tikzpicture}[remember picture,overlay]
\draw (current page.center) node [fill=blue!30!white,fill opacity=0.6,text opacity=1,inner sep=1cm] (Title) {\Huge\centering\bfseries\sffamily\parbox[c][][t]{\paperwidth}{\centering TITLE \\ Second Row of Title\\[15pt] % Book title
{\Large Project work report}\\[20pt] % Subtitle
{\huge Name Surname}}}; % Author name
\draw[dashed, white, line width=4mm] ([yshift=-2mm]Title.north west)--([yshift=-2mm]Title.north east);
\end{tikzpicture}
\vfill
\endgroup
\end{document}

enter image description here

  • Very good :-). I like it.+1 – Sebastiano Oct 3 '17 at 9:03

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.