General ⇒ Report Layout
Report Layout
I need to create a document class to typeset a report, but I don't know if I can begin from a previous layout. Attached are two images which show how would be the template. The gray area contents text. Anyone can suggest me how or from where star???
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Report Layout
to obtain the fancy chapter headings you can find a really nice example (that you can use as a good starting point) here:
Fancy chapter headings with TikZ - TeXblog.net
Using the titlesec package you can also achieve the desired headers/footers as well as the format for the section headings (refer to the package documentation for relevant information).
Finally, using TikZ you can also achieve the vertical lines.
Report Layout
Thanks for your reply. The TeXBlog example was very useful. I still have two problems:
1. I want to put the section titles in blue, so I'm putting these lines
Code: Select all
\titleformat{\section}{\bfseries}{\textcolor{MidnightBlue}{\thesection.}}{1em}{}
2. In the first page of each chapter I loose the footer, made with fancyhdr.
Code: Select all
\fancyfoot[LE,RO]{\colorbox{MidnightBlue}{\textcolor{White}{\small \thepage}}}
\fancyfoot[RE,LO]{\textcolor{Gray}{\scriptsize Report}}
Bests regards
Report Layout
You can use something like this:cbustaam wrote:...1. I want to put the section titles in blue, so I'm putting these linesBut only appears the section number in blue, without the name. I mean, "1. " in place of "1. First sectio".Code: Select all
\titleformat{\section}{\bfseries}{\textcolor{MidnightBlue}{\thesection.}}{1em}{}
Code: Select all
\titleformat{\section}
{\color{MidnightBlue}}{\thesection}{1em}{}
The standard classes (book, report) assign the plain page style to the first page of chapters. If you want this style also to be fancy, you can add thiscbustaam wrote:...2. In the first page of each chapter I loose the footer, made with fancyhdr.But only appears page number centered, and not the the page number in a blue box aligned at one side, and the word "Report" in the other side. How can I fix it?Code: Select all
\fancyfoot[LE,RO]{\colorbox{MidnightBlue}{\textcolor{White}{\small \thepage}}} \fancyfoot[RE,LO]{\textcolor{Gray}{\scriptsize Report}}
Code: Select all
\makeatletter
\let\ps@plain\ps@fancy
\makeatother
Report Layout
Thanks for your suggestions. The second one works perfect, but the first one doesn't work.
I tried this:
You can use something like this:
Code: Select all
\titleformat{\section}
{\color{MidnightBlue}}{\thesection}{1em}{}
But it doesn't work, and still appears "1.1. " in place of "1.1. Section title". I think that this could happend because this part "{\thesection}", so I added "{\thesection \sectionmark}", but LaTeX saids "ERROR: Argument of \sectionmark has an extra }.". How can I solve it?
Bests
Report Layout
That's unusual. The following sample code (that uses my recommendation) produces the desired effect (as can be seen in the obtained pdf file attached):cbustaam wrote:Hi gmedina...But it doesn't work, and still appears "1.1. " in place of "1.1. Section title"...
Bests
Code: Select all
\documentclass{report}
\usepackage[svgnames]{xcolor}
\usepackage{titlesec}
\titleformat{\section}
{\color{MidnightBlue}}{\thesection}{1em}{}
\begin{document}
\chapter{Test chapter}
\section{Test section}
\end{document}
- Attachments
-
- test.pdf
- (9.57 KiB) Downloaded 322 times
Report Layout
Code: Select all
\documentclass[svgnames,twoside,12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[letterpaper]{geometry}
\geometry{verbose,tmargin=3cm,bmargin=3cm,lmargin=3cm,rmargin=3cm} % margenes
\usepackage{tikz}
\usepackage{kpfonts}
\usepackage[explicit]{titlesec}
\usepackage{multicol}
\usepackage{lipsum}
\renewcommand{\chaptername}{Capitulo}
\setlength{\parskip}{10pt}
\setlength\columnseprule{1pt}
\setlength\columnsep{1cm}
\renewcommand{\chaptermark}[1]{\markleft{\thechapter.\ #1}{}}
\usepackage{fancyhdr}
\usepackage{calc}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RE]{\textcolor{Gray}{\scriptsize \textsc{Report}}}
\fancyhead[LO]{\textcolor{Gray}{\scriptsize \nouppercase{\leftmark}}}
\fancyfoot[LE,RO]{\colorbox{MidnightBlue}{\textcolor{White}{\small \thepage}}}
\fancyfoot[RE,LO]{\textcolor{Gray}{\scriptsize \textsc{Date}}}
\makeatletter
\let\ps@plain\ps@fancy
\makeatother
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\titleformat{\section}{\color{MidnightBlue}}{\thesection}{1em}{}
\titlespacing*{\section}{0pt}{50pt}{0pt}
\titleformat{\chapter}
{\gdef\chapterlabel{}
\normalfont\sffamily\Huge\bfseries\scshape}
{\gdef\chapterlabel{\thechapter.\ }}{0pt}
{\begin{tikzpicture}[remember picture,overlay]
\node[yshift=-3cm] at (current page.north west)
{\begin{tikzpicture}[remember picture, overlay]
\draw[fill=white!70!gray] (0,0) rectangle
(\paperwidth,3cm);
\node[anchor=east,xshift=.9\paperwidth,rectangle,
rounded corners=20pt,inner sep=11pt,
fill=MidnightBlue]
{\color{white}\chapterlabel#1};
\end{tikzpicture}
};
\end{tikzpicture}
}
\titlespacing*{\chapter}{0pt}{50pt}{10pt}
\begin{document}
\chapter{The very first chapter}
\section{First section}
\lipsum[1-2]
\begin{multicols}{2}
\lipsum[1-4]
\end{multicols}
\section{Section number two}
\lipsum[1]
\end{document}
Report Layout
just to be sure... maybe you do not have the kpfonts package installed. Comment out the line loading that package (i.e., add a "%" symbol as in %\usepackage{kpfonts}) and compile the document.
Re: Report Layout
Report Layout
Code: Select all
\titleformat{\section}{\color{MidnightBlue}}{\thesection}{1em}{#1}