0

I am trying to use the article class to typeset the following equity research report. I am trying to put in the gray side section on the title page using tikzpicture and minipages, but cannot figure out how to move the grey figure from the top of the page.

Title page

\documentclass{article}
\setcounter{secnumdepth}{0}
\usepackage[utf8]{inputenc}

%\usepackage{fontspec}
%\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
%\setmainfont{Times}


\title{Sections and Chapters}
\author{Gubert Farnsworth}
\date{ }

\usepackage{titlesec}
%\usepackage{sectsty}
\usepackage{ulem}

\usepackage{xcolor}
\usepackage{mdframed}
\definecolor{myblue}{RGB}{13, 54, 145}

\titleformat{\section}
  {\normalfont\Large\bfseries}{\thesection}{1em}{}[{\color{myblue}\titlerule[0.8pt]}]

%\sectionfont{\large\underline}
\usepackage{lastpage,fancyhdr,graphicx}
\pagestyle{myheadings}
\pagestyle{fancy}
\fancyhf{}
\lhead{\date{February 8, 2017}}
\usepackage[top=2in,left=.75in,footskip=0.75in]{geometry}

\fancypagestyle{titlepage}
{
    \newgeometry{top=0.75in,left=0.75in,right=1in,footskip=0.75in}
    \renewcommand{\headrulewidth}{0pt}
    \lhead{\date{February 8, 2017}}
    \fancyhf{}
    \rfoot{\thepage}
    \fancyheadoffset[L]{0in}
    \fancyfootoffset[L]{1.75in}
    \lfoot{\author{Carter Page}}
    \lhead{\date{February 8, 2017}}
    \rhead{United States}
}

\fancypagestyle{contents}
{
    \newgeometry{top=1in,left=0.75in,right=1in,footskip=0.75in}
    \renewcommand{\headrulewidth}{0pt}
    \lhead{\date{February 8, 2017}}
    \fancyhf{}
    \rfoot{\thepage}
    \fancyheadoffset[L]{0in}
    \fancyfootoffset[L]{1.75in}
    \lfoot{Author}
    \lhead{\date{February 8, 2017}}
    \rhead{United States}
}


\renewcommand{\headrulewidth}{0pt}
\rfoot{\thepage}
\fancyheadoffset[L]{1.75in}
\fancyfootoffset[L]{1.75in}
\lfoot{\author{Author}}
\rhead{United States}

\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{lipsum}
\def\particulartemplate#1{
  \thispagestyle{titlepage}
  \begin{tikzpicture}[overlay, remember picture]
    \draw let \p1 = (current page.west), \p2 = (current page.east) in
      node[minimum width=\x2-\x1, minimum height=2in, draw, rectangle, fill=myblue, anchor=north west, align=left, text width=\x2-\x1] at ($(current page.north west)$) {\Large\bfseries \quad #1};
  \end{tikzpicture}
}

\def\sidetemplate{
    \begin{tikzpicture}[overlay, remember picture]
    \draw let \p1 = (current page.north), \p2 = (current page.south) in
    node[minimum width=1in, minimum height=2in, draw, rectangle, fill=gray, anchor=north west, align=left, text width=\x2-\x1] at ($(current page.north west)$) {\Large\bfseries \quad};
  \end{tikzpicture}
}

\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist 

%\titlespacing*{\section}
%{-1.75in}{0in}{0in}

\begin{document}


\particulartemplate{\maketitle}
\section{Introduction}

\begin{minipage}[t]{4.5in} % Mini page taking up 30% of the actual page
\subsubsection*{US economy will gain strength as 2013 progresses}
The turbulent political environment that curtailed corporate risk-taking in 2012 will end. Full ‘fiscal cliff’ will be averted but taxes will rise and federal spending will be cut. Economy will grow by 1.9\% in 2013 and 2.9\% in 2014. \newline
\subsubsection*{Corporate fundamentals support continued profit cycle expansion}
We forecast S\&P 500 revenues rise by more than 4\% in 2013 and 2014, margins hover at current levels (8.8\%-9.0\%), earnings climb by more than 6\% and the P/E multiple expands modestly from 13.2x to 13.8x at end 2013. \newline
\subsubsection*{Valuation: 12-month target of 1575 reflects 12\% potential return}
Our 3-month, 6-month, and 12-month forecasts are 1450, 1500, and 1575. We use six valuation approaches including DDM, uncertainty-based P/E multiple, cyclically-adjusted P/E multiple, price/book and ROE relationship. \newline
\subsubsection*{Strategies to capture growth: market, sectors, stocks}
(1) Stocks will outperform Treasuries; (2) Equities will beat credit returns, although not on a risk-adjusted basis; (3) Cyclical sectors will beat defensive sectors (Materials, Industrials, Information Technology will outperform Consumer Staples, Telecom, and Health Care); (4) Double Sharpe Ratio stocks offer both high risk-adjusted earnings growth and prospective returns (Bloomberg ticker: <GSTHEPSR>); and (6) Stocks with high BRICs sales exposure will beat domestic-facing firms (GSTHBRIC).
\end{minipage} \hspace*{.25in}
\begin{minipage}[t]{2.5in}
%   \begin{mdframed}[style=sidebar,frametitle={}] % Sidebar box
%   \end{mdframed}
    \sidetemplate{Hello, Author}    
\end{minipage}
\newpage
\thispagestyle{contents}

\tableofcontents

%\addcontentsline{toc}{section}{Unnumbered Section} 
%\section*{Unnumbered Section}

\newgeometry{top=1in,left=2.5in,right=1in,footskip=0.75in}
\newpage

\begin{changemargin}{-1.75in}{0in}
\section{First Section}
\end{changemargin}

\subsection{Sub}


This is the first section.

Lorem  ipsum  dolor  sit  amet,  consectetuer  adipiscing  
elit.   Etiam  lobortisfacilisis sem.  Nullam nec mi et 
neque pharetra sollicitudin.  Praesent imperdietmi nec ante. 
Donec ullamcorper, felis non sodales...



Lorem ipsum dolor sit amet, consectetuer adipiscing elit.  
Etiam lobortis facilisissem.  Nullam nec mi et neque pharetra 
sollicitudin.  Praesent imperdiet mi necante...

\newpage

\begin{changemargin}{-1.75in}{0in}
\section{Second Section}
\end{changemargin}

\subsection{Strategies} 
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.  
Etiam lobortis facilisissem.  Nullam nec mi et neque pharetra 
sollicitudin.  Praesent imperdiet mi necante...

\end{document}
  • What is the 'grey figure'? the result of \sidetemplate? It seems clear that you want to move it from somewhere, but it is less clear to where you'd like it to move. I also wonder whether TikZ might be a pretty heavy-handed choice to draw a couple of coloured boxes. – jon Feb 10 '17 at 6:17
  • @jon Probably he wants the gray bar to be in the margin (as background for the margincolumn) as seen in the report he wants to imitate. I also agree that colorboxes should be sufficient. – TeXnician Feb 10 '17 at 6:46
  • BTW You're requesting it to be at the top of the page (saying current page.north west. Why are you using this anchor if you do not want or need it? – TeXnician Feb 10 '17 at 17:14
  • @cpage, were you able to continue developing the template? I tried to use it but I do not know how to change the comments and minipage to the other side and place it on the left. You set up just for the intro page. Thanks! – José Aug 7 '17 at 15:22

Your Answer

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

Browse other questions tagged or ask your own question.