1

I am having difficulty coloring part of my page, as well as adding text boxes.

I am not finding either this or this answer helpful in my quest.

I basically want to achieve this type of page layout for only the first page:

enter image description here

I have tried using the code at the bottom, but I am finding no joy... Please someone help!

\documentclass[DIV=calc, paper=a4, twoside]{article}     % A4 paper and 11pt font size
\usepackage{multirow}
\usepackage{hhline}
\usepackage{calc}
\usepackage{tabularx}
\usepackage{xparse}
\usepackage{longtable,booktabs}
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
\usepackage[english]{babel} % English language/hyphenation
\usepackage[protrusion=true,expansion=true]{microtype} % Better typography
\usepackage{amsmath,amsfonts,amsthm} % Math packages
\usepackage[svgnames, table]{xcolor} % Enabling colors by their 'svgnames'
\usepackage[hang, normalsize,labelfont=bf,up,textfont=it,up]{caption} %     Custom captions under/above floats in tables or figures
\usepackage{booktabs} % Horizontal rules in tables
\usepackage{mdframed}
\usepackage{lmodern} 
\usepackage{xparse}
\usepackage[margin=2.25cm,bottom=2cm,top=0.8cm, headheight=3.5cm, headsep =     15pt, includefoot, includeheadfoot]{geometry}  

%----------------------------------------------------------------------------------------

\begin{document}

\vspace*{-1.1cm}  % Move top box up

\noindent \hspace*{-1in} 
\colorbox{red}{\begin{minipage}{\paperwidth}%
% Start text back at original margin
    \vspace{0.3cm} 
    \hspace*{0.9in} % distance from left edge
\color{white}
\Huge Title

% Fill to bottom of page? Not working
\vspace*{\fill}\mbox{}
\end{minipage}
}

\vspace*{-1cm}

\noindent \hspace*{-1in} 
\colorbox{blue}{\begin{minipage}{\paperwidth}%
% Start text back at original margin
    \vspace{0.8cm} 
    \hspace*{0.9in} % distance from left edge
\color{white}
\huge Subtitle

% Fill to bottom of page? Not working
\vspace*{\fill}\mbox{}
  \end{minipage}
}


\begin{minipage}{0.75\textwidth}
\vspace*{0.8cm} 
\subsubsection*{Executive Summary:}
Test text. Test text. Test text. Test text. Test text. Test text. Test     text. Test text. Test text. Test text.  \\
Test text. Test text. Test text. Test text. Test text. Test text. Test     text. Test text. Test text. Test text. \\
Test text. Test text. Test text. Test text. Test text. Test text. Test text. Test text. Test text. Test text. 
\end{minipage}%
\hfill
\begin{minipage}[t]{0.20\textwidth} \flushright
\vspace*{-0.8cm} 
Test text. Test text. Test text. Test text. Test text. Test text. Test     text. Test text. Test text. Test text.  \\
Test text. Test text. Test text. Test text. Test text. Test text. Test     text. Test text. Test text. Test text. \\
Test text. Test text. Test text. Test text. Test text. Test text. Test text. Test text. Test text. Test text. 

\end{minipage}%

% ==================== Front Page Bottom

\newpage

\end{document}
3
  • 1
    DIV=calc and paper=a4 sound more like options for scrartcl than article.
    – campa
    Commented Aug 31, 2017 at 16:27
  • 2
    First, check out tcolorbox. Commented Aug 31, 2017 at 16:33
  • Thanks @JohnKormylo, I did check it out - I could not find a way of making the color span to the bottom of the page as in the illustration.
    – Nick
    Commented Aug 31, 2017 at 16:41

2 Answers 2

2

Here is a total TikZ solution. I decided to align the nodes using ysep to handle the extra \vspace.

\documentclass[paper=a4, twoside]{article}     % A4 paper and 11pt font size
\usepackage{multirow}
\usepackage{hhline}
\usepackage{calc}
\usepackage{tabularx}
\usepackage{xparse}
\usepackage{longtable,booktabs}
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
\usepackage[english]{babel} % English language/hyphenation
\usepackage[protrusion=true,expansion=true]{microtype} % Better typography
\usepackage{amsmath,amsfonts,amsthm} % Math packages
\usepackage[svgnames, table]{xcolor} % Enabling colors by their 'svgnames'
\usepackage[hang, normalsize,labelfont=bf,up,textfont=it,up]{caption} %     Custom captions under/above floats in tables or figures
\usepackage{booktabs} % Horizontal rules in tables
\usepackage{mdframed}
\usepackage{lmodern} 
\usepackage{xparse}
\usepackage[margin=2.25cm,bottom=2cm,top=0.8cm, headheight=3.5cm, headsep=15pt,includeheadfoot]{geometry}  

\usepackage{tikzpagenodes}
\usetikzlibrary{backgrounds}

%----------------------------------------------------------------------------------------

\begin{document}

\begin{tikzpicture}[overlay, remember picture, every node/.style={inner xsep=0pt}]
\path (current page text area.north west) + (0pt,1.1cm)
  node[below right, color=white, inner ysep=0.4cm] (title) {\Huge Title};
\node[below right, color=white, inner ysep=0.4cm] (subtitle) at (title.south west) {\huge Subtitle};
\node[below right, inner ysep=0.4cm, text width=0.75\textwidth] (text1) at (subtitle.south west)
  {\subsubsection*{Executive Summary:}
  Test text. Test text. Test text. Test text. Test text. Test text. Test     text. Test text. Test text. Test text.\\
  Test text. Test text. Test text. Test text. Test text. Test text. Test     text. Test text. Test text. Test text.\\
  Test text. Test text. Test text. Test text. Test text. Test text. Test text. Test text. Test text. Test text.};
\path (text1.north east) + (.05\textwidth,0pt)
  node[below right, inner ysep=0.4cm,text width=0.2\textwidth] (text2) {\sloppy\subsubsection*{}
Test text. Test text. Test text. Test text. Test text. Test text. Test     text. Test text. Test text. Test text.  \\
Test text. Test text. Test text. Test text. Test text. Test text. Test     text. Test text. Test text. Test text. \\
Test text. Test text. Test text. Test text. Test text. Test text. Test text. Test text. Test text. Test text.};

\begin{scope}[on background layer]
  \fill[red] (title.north -| current page.west) rectangle (title.south -| current page.east);% fill entire page
  \fill[blue] (subtitle.north -| current page.west) rectangle (subtitle.south -| current page.east);
  \fill[green] (text2.north west) ++(-.025\textwidth,0pt) rectangle (current page.south east);
\end{scope}
\end{tikzpicture}
\newpage
\end{document}

demo

1
  • Great answer thanks! Really simple to adjust the ysep settings to change width settings...
    – Nick
    Commented Aug 31, 2017 at 19:34
2

Quick and dirty hack: place a rule of suitable dimensions behind the text.

\documentclass{article} 
\usepackage{lipsum} 
\usepackage[svgnames, table]{xcolor} 
\usepackage[margin=2.25cm,bottom=2cm,top=0.8cm, headheight=3.5cm, headsep = 15pt, includefoot, includeheadfoot]{geometry}  

\begin{document}

\begin{picture}(0,0)
    \put(370,-650){\color{green}\rule{6cm}{21cm}}
    \put(-79,0){\color{red}\rule{\paperwidth}{1.2cm}}
    \put(-79,-70){\color{blue}\rule{\paperwidth}{2.5cm}}
    \put(-20,7){\color{white}\Huge Title}
    \put(-20,-40){\color{white}\huge Subtitle}
\end{picture}

\vskip3.5cm

\subsubsection*{Executive Summary:}
\begin{minipage}[t]{0.75\textwidth}
\lipsum[2]
\end{minipage}%
\hfill
\begin{minipage}[t]{0.20\textwidth} 
\flushright
\lipsum[2]
\end{minipage}

\end{document}

enter image description here

2
  • Good solution thanks - does the job for this specific question. Have to give the mark for @johnkormylo though for its synctatic sugar - really easy to simply adjust the ysep settings to make it fit..
    – Nick
    Commented Aug 31, 2017 at 19:33
  • @Nick Totally correct decision to give John the mark - as I wrote my answer is merely hacked together. Commented Aug 31, 2017 at 19:53

You must log in to answer this question.

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