1

I want to create my document with a specific format as in attached figures

enter image description here

enter image description here

In my LaTeX code I can't put the rectangle a little far from the left edge of the page as shown in the figures. I want the logo (top right) and the teal colored bar (left) to be repeated in all pages as in the reference figures. Just the corresponding text will change. Please help me out.

Note: Any suggestion on (improving) the drawing of the teal colored rectangle will also be highly appreciated.

Here is my code below:

\documentclass[a4paper]{memoir}

\usepackage[left=0mm,right=0mm,top=0mm,bottom=0mm]{geometry}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{xcolor}
\setlength\parindent{0pt}

\renewcommand{\rmdefault}{phv} % Arial
\renewcommand{\sfdefault}{phv} % Arial

\begin{document}

\begin{tikzpicture}[remember picture]

\path[use as bounding box,draw=none](0mm,-3.5mm) rectangle ++(0.001mm,0.001mm);

%********************************************
% Include side bar
%********************************************
\node (a) [shape=rectangle,
       text width=0.95\paperheight,
       fill=teal,
       rotate=-90,
       minimum width=\paperheight,
       minimum height=1.2cm,
       inner sep=1pt,
       anchor=south east] at (current page.south west) {};

% ********************************
% Include ICE's logo
 % ********************************
\node[anchor=north east,inner sep=0pt] at (21,-0.50) {\includegraphics[width=45mm]{FIG/ICE_logo.pdf}};

% ***********************
% Document name
% ***********************
\node[anchor=north east,inner sep=0pt] at (18.2,-4.0) {
\begin{minipage}{15cm}
\begin{center}
\fontsize{32}{38}\selectfont
\textcolor{teal}{\textbf{Text for my first page}}\\
\end{center}
\end{minipage}
};
\end{tikzpicture}

\newpage

\begin{tikzpicture}[remember picture]

\path[use as bounding box,draw=none](0mm,-3.5mm) rectangle ++(0.001mm,0.001mm);

%********************************************
% Include side bar
%********************************************
\node (a) [shape=rectangle,
       text width=0.95\paperheight,
       fill=teal,
       rotate=-90,
       minimum width=\paperheight,
       minimum height=1.2cm,
       inner sep=1pt,
       anchor=south east] at (current page.south west) {};

% ********************************
% Include ICE's logo
% ********************************
\node[anchor=north east,inner sep=0pt] at (21,-0.50) {\includegraphics[width=45mm]{FIG/ICE_logo.pdf}};

% ***********************
% Document name
% ***********************
\node[anchor=north east,inner sep=0pt] at (18.2,-4.0) {
\begin{minipage}{15cm}
\begin{center}
\fontsize{32}{38}\selectfont
\textcolor{teal}{\textbf{Text for my second page}}\\
\end{center}
\end{minipage}
};
\end{tikzpicture}

\end{document}
  • Try \node[anchor=north east,inner sep=0pt] at ([xshift=-1cm,yshift=-1cm]current page.north east) {\includegraphics[width=45mm]{FIG/ICE_logo.pdf}}; to have it 1cm left and 1cm below the upper right corner of the page. – user121799 Dec 26 '18 at 2:50
1

If you only vary the text, you might want to write a macro for that. You could also use eso-pic (or atbegshi) if you want to have such a pic on every page. I'll be happy to add it if that's the case. For now I only add a macro.

\documentclass[a4paper]{memoir}

\usepackage[left=0mm,right=0mm,top=0mm,bottom=0mm]{geometry}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{xcolor}
\setlength\parindent{0pt}

\renewcommand{\rmdefault}{phv} % Arial
\renewcommand{\sfdefault}{phv} % Arial
\newcommand{\PagePic}[1]{\begin{tikzpicture}[remember picture]

\path[use as bounding box,draw=none](0mm,-3.5mm) rectangle ++(0.001mm,0.001mm);

%********************************************
% Include side bar
%********************************************
\node (a) [shape=rectangle,
       text width=0.95\paperheight,
       fill=teal,
       rotate=-90,
       minimum width=\paperheight,
       minimum height=1.2cm,
       inner sep=1pt,
       anchor=south east] at (current page.south west) {};

% ********************************
% Include ICE's logo
 % ********************************
\node[anchor=north east,inner sep=0pt] (pic) at 
([xshift=-1cm,yshift=-1cm]current page.north east)
{\includegraphics[width=45mm]{example-image-duck}};

% ***********************
% Document name
% ***********************
\node[anchor=north east,inner sep=0pt,text width=15cm,align=center,text=teal,
font=\bfseries] at (pic.south east) {
\fontsize{32}{38}\selectfont #1
};
\end{tikzpicture}
}
\begin{document}
\PagePic{Text for my first page}

\newpage

\PagePic{Text for second page}
\end{document}

enter image description here

  • Thanks @Marmot. In order to shift the colored rectangle 1cm towards right, what should I change? – LarCos Dec 26 '18 at 3:32
  • 1
    @LarCos Use \node (a) [shape=rectangle, text width=0.95\paperheight, fill=teal, rotate=-90, minimum width=\paperheight, minimum height=1.2cm, inner sep=1pt, anchor=south east] at ([xshift=1cm]current page.south west) {}; instead of \node (a) [shape=rectangle, text width=0.95\paperheight, fill=teal, rotate=-90, minimum width=\paperheight, minimum height=1.2cm, inner sep=1pt, anchor=south east] at (current page.south west) {}; – user121799 Dec 26 '18 at 3:35

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.