TeX - LaTeX Asked on June 18, 2021
I want to use this as a template for a report, but I have no idea where to begin. The first page looks like this, with a gray header, the title in white and the company logo on the right. On the left of the page is a green bar with the name of the division at the bottom.
From the second page on, the header of the document looks like this, with the main title on the left and the date on the right.
I would appreciate any help or if you could point me to some resources where I can learn how to do it.
I couldn't figure out from your question if the green rectangle must appear on the other pages. If this is the case uncomment the command lhead{greenRectangle}
in the preamble.
For more comments concerning the code see my answer at Margins of a Logo Picture.
The code that produces the pdf above:
documentclass[11pt, a4paper]{article}
usepackage{geometry}
geometry{total={155mm, 255mm}, left=48mm, top=20mm}
%%% fonts
usepackage{helvet}
renewcommand{familydefault}{sfdefault}
usepackage{tikz}
usetikzlibrary{calc}
usepackage{fancyhdr}
pagestyle{fancy}
deffootrulewidth{0pt}
defheadrulewidth{0pt}
%%% uncomment the line below if the green rectangle is needed on all pages
% lhead{greenRectangle}
rhead{grayRectangle}
cfoot{}
rfoot{thepage}
definecolor{aGreen}{RGB}{0, 159, 104}
newcommand{greenRectangle}{%
begin{tikzpicture}[remember picture, overlay]
fill[aGreen] ($(current page.north west)+(3ex, -2ex)$)
rectangle ($(current page.south west)+(43mm, 2ex)$);
path ($(current page.south west)+(3ex, 8ex)$)
node[white, text width=40mm, align=left, below right, scale=.9]
{itshape{Direcci'on de Estudias Econ'omicos}};
end{tikzpicture}
}
newcommand{grayRectangle}{%
begin{tikzpicture}[remember picture, overlay]
fill[gray!60] ($(current page.north west)+(3ex, -3ex)$)
rectangle ($(current page.north east)+(-3ex, -7ex)$);
path ($(current page.north west)+(3ex, -6.5ex)$)
node[white, above right, scale=.9]
{itshape{Industria Manufacturera}};
path ($(current page.north east)+(-3.1ex, -6.5ex)$)
node[white, above left, scale=.9]
{itshape{Abril 2020}};
end{tikzpicture}
}
%%% tmp packages
% usepackage{showframe}
usepackage{lipsum}
begin{document}
titlepage
greenRectangle
%%% title
begin{tikzpicture}
path[use as bounding box] (0, 0) rectangle +(15, .1);
draw[ultra thick, fill=gray!65] (-5.3, .7)
rectangle
node[pos=.85, fill=blue, below right, inner sep=2.2ex, text width=9ex] {}
+(20.6, 1.3);
path (-1.2, .7) node[above right, text=white, scale=2]
{itshapetextbf{Industria Manufacturera}};
end{tikzpicture}
section*{ABRIL 2020}
lipsum[1, 2-8]
end{document}
Correct answer by Daniel N on June 18, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP