General ⇒ Report Layout
Report Layout
Hi all,
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???
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???
"Show me your .emacs and I'll tell you who you are." -- modified proverb
NEW: TikZ book now 40% off at Amazon.com for a short time.

Report Layout
Hi,
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.
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.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Report Layout
Hi gmedina,
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
But only appears the section number in blue, without the name. I mean, "1. " in place of "1. First sectio".
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?
Bests regards
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
"Show me your .emacs and I'll tell you who you are." -- modified proverb
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
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Report Layout
Hi gmedina
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:
(The above code requires the xcolor package with svgnames option).
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
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
"Show me your .emacs and I'll tell you who you are." -- modified proverb
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 309 times
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Report Layout
The code you provide works well, so something is wrong in my code. There is an MWE:
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}
"Show me your .emacs and I'll tell you who you are." -- modified proverb
Report Layout
Hi,
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.
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.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: Report Layout
The kpfots package is installed. Althought, I comment the line tha load the package, but the result is the same.
"Show me your .emacs and I'll tell you who you are." -- modified proverb
Report Layout
Yes, you are right; the problem was not the kpfonts package. The problem comes from using the explicit package option for titlesec; as the package documentation (page 8) mentions, with this option the title must be given explicitly with #1, so you must use something like the following:
Code: Select all
\titleformat{\section}{\color{MidnightBlue}}{\thesection}{1em}{#1}
1,1,2,3,5,8,13,21,34,55,89,144,233,...