Page Layout ⇒ Manual Template (Header and Footer)
Manual Template (Header and Footer)
I've made my Masters Thesis in TeX and liked it a lot. However the template was already made by the University and now I can't handle things very well myself.
I'd like to create a manual and I can't find the right template for it. I don't even know what docclass to use.
Also the header and footer I need is something like this: Can anyone help?
Thank's a lot everyone,
Luís
Edit by localghost: No external links (see Board Rules)! Attachmenst go onto the forum server (where applicable).
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
-
- Posts: 37
- Joined: Sun Mar 29, 2009 1:41 am
Manual Template (Header and Footer)
If this is your first time really using LaTeX without easy templates, and you want everything to look perfect, get ready to spend a lot of time! (But at least you _will_ be able to make it perfect, which is often impossible using other stuff...) Your request is kind of general, like "hey everyone, teach me LaTeX!"... So here's a very rough start, and maybe you can ask more specific questions about tables, headers, margins, etc. in other threads

Code: Select all
\documentclass{article}
\usepackage{mathpazo}
\usepackage[top=1.5cm, bottom=5cm, left=3cm, right=3cm]{geometry}
\usepackage{multirow}
\usepackage{lipsum}
\usepackage{lastpage}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\setlength{\headheight}{60pt}
\fancyhead[C]{
\begin{tabular}{|c|c|c|}
\hline
\multirow{2}{*}{PICTURE} & \textbf{MANUAL DA QUALIDADE} & \textbf{MQ-CAP.V} \\ \cline{2-3}
& Sistema da Qualidade & P\'agina \thepage\ de \pageref{LastPage} \\ \hline
\end{tabular}
}
\fancyfoot[C]{
\begin{tabular}{|p{3cm}|p{3cm}|p{7cm}|}
\hline
Edi\c{c}\~ao:\newline Data & Revis\~ao:\newline Data: & Aprova\c{c}\~ao: \\ \hline
\end{tabular}
}
\begin{document}
\lipsum[1-20]
\end{document}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Manual Template (Header and Footer)
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[%
includeheadfoot,
headheight=44pt,
headsep=60pt,
hmargin=2cm,
top=1cm,
bottom=1.4cm
]{geometry}
\usepackage[pagestyles,raggedright]{titlesec}
\usepackage{lastpage,multirow,tabularx}
\usepackage{blindtext}
\title{Manual da Qualidade}
\author{luisnuvo}
\makeatletter
\let\Title\@title
\let\Author\@author
\let\Date\@date
\makeatother
% Page setup (titlesec)
\newpagestyle{manual}{%
% \widenhead[1cm][1cm][1cm][1cm]
\widenhead*{1cm}{1cm}
\sethead[][\begin{tabularx}{\linewidth}{|>{\centering}p{4cm}|>{\centering}X|p{4cm}|}\hline
& & \multirow{6}{*}{\rule{\linewidth}{0.5\linewidth}} \\
MQ-CAP.V & \MakeUppercase{\Title} & \\
& & \\ \cline{1-2}
& & \\
Página \thepage\ da \pageref{LastPage} & Systema da Qualidade & \\
& & \\ \hline
\end{tabularx}][]
{}{\begin{tabularx}{\linewidth}{|p{4cm}|>{\centering}X|>{\centering\arraybackslash}p{4cm}|}\hline
\multirow{6}{*}{\rule{\linewidth}{0.5\linewidth}} & & \\
& \MakeUppercase{\Title} & MQ-CAP.V \\
& & \\ \cline{2-3}
& & \\
& Systema da Qualidade & Página \thepage\ da \pageref{LastPage} \\
& & \\ \hline
\end{tabularx}}{}
\setfoot[][\begin{tabularx}{\linewidth}{|p{3cm}|p{3cm}|X|}\hline
Edi\c{c}ão: & Revisão: & \multirow{2}{*}{Aprova\c{c}ão:} \\
Data: & Data: & \\\hline
\end{tabularx}][]
{}{\begin{tabularx}{\linewidth}{|p{3cm}|p{3cm}|X|}\hline
Edi\c{c}ão: & Revisão: & \multirow{2}{*}{Aprova\c{c}ão:} \\
Data: & Data: & \\\hline
\end{tabularx}}{}
}
\pagestyle{manual}
\begin{document}
\Blinddocument
\end{document}
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Manual Template (Header and Footer)
Re: Manual Template (Header and Footer)
I've adjusted the code but now I have 1 problem. I have two headers and footers on each page. Also I don't have The title on the first page like I wanted to.
Here's the code in case someone what to look at it:
%-----------------------------------------------------------------------------------------------------------------
% Modelo de documento para Dissertação de Mestrado em Engenharia Civil.
% Raul Morais, 2007 - 2008
% Manuel Cabral, 2008
%-----------------------------------------------------------------------------------------------------------------
\documentclass[11pt, twoside, a4paper, openright]{article}
\usepackage[centertags]{amsmath}
\usepackage{amsfonts}
\usepackage[portuguese]{babel}
\usepackage[latin1]{inputenc} % Permite a escrita com acentos
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{newlfont}
\usepackage{fancyhdr}
\usepackage{graphicx}
\usepackage{natbib}
\usepackage[dvips]{color}
\usepackage[rigidchapters]{titlesec}
\usepackage{mdwtab}
\usepackage{subfigure}
\usepackage{longtable}
\usepackage{LABAcustica} % Definições do template utilizado no MEEC
\usepackage{url} % Tratamento dos endereços URL
\usepackage{makeidx} % Necessário para fazer o índice remissivo
\usepackage{wrapfig} % Necessário para que o texto contorne as figuras
\usepackage{float} % Necessário para transcrição de código fonte
\usepackage{eurosym} % Necessário para se puder utilizar o símbolo oficial do Euro
\usepackage{array} % Necessário à formatação de tabelas
\usepackage{verbatim}
\usepackage{multirow}
\usepackage{rotating}
\usepackage[pdfauthor={Raul Morais dos Santos}, %
pdftitle={Modelo de documento para o MEEC da UTAD},%
pagebackref=true,%
pdftex]{hyperref}
\usepackage{breakurl}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\setlength{\headheight}{60pt}
\fancyhead[C]{
\begin{tabular}{|c|c|c|}
\hline
\multirow{2}{*}{PICTURE} & \textbf{MANUAL DA QUALIDADE} & \textbf{MQ-CAP.V} \\ \cline{2-3}
& Sistema da Qualidade & P\'agina \thepage\ de \pageref{LastPage} \\ \hline
\end{tabular}
}
\fancyfoot[C]{
\begin{tabular}{|p{3cm}|p{3cm}|p{7cm}|}
\hline
Edi\c{c}\~ao:\newline Data & Revis\~ao:\newline Data: & Aprova\c{c}\~ao: \\ \hline
\end{tabular}
}
%-----------------------------------------------------------------------------------------------------------------
% Definições de espaçamentos e afins
%-----------------------------------------------------------------------------------------------------------------
%Espaçamento entre linhas de 1.5
\renewcommand{\baselinestretch}{1.5}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\renewcommand{\headrulewidth}{0.5pt}
\renewcommand{\footrulewidth}{0pt}
\addtolength{\headheight}{0.5pt}
\setlength{\marginparsep}{0cm}
\setlength{\marginparwidth}{0cm}
\setlength{\marginparpush}{0cm}
\addtolength{\hoffset}{-1.0cm}
\addtolength{\oddsidemargin}{\evensidemargin}
\addtolength{\oddsidemargin}{0.5cm}
\addtolength{\evensidemargin}{-0.5cm}
%-----------------------------------------------------------------------------------------------------------------
\input{Acessorios/MyMacroDefinitions} % Carregar o ficheiro que contem macros e que ajudam na escrita
%-----------------------------------------------------------------------------------------------------------------
\begin{document}
\title{Manual de Funções}
\author{EdiQual}
%HERE I HAVE THE TEXT
\end{document}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Manual Template (Header and Footer)
- You are loading the amsmath package twice.
- You are loading the fancyhdr package and the titlesec package. Decide which one to use and drop the other. See the manuals to learn what they are for.
- You are loading the array package and the mdwtab package. Decide which one to use and drop the other. See the manuals to learn what they are for.
- You are loading the url package and the breakurl package. Decide which one to use and drop the other. See the manuals to learn what they are for.
- Drop the dvips driver option for the color package. Load xcolor instead which will detect the compiler engine on its own. See the manual for details.
- With subfigure you are loading at least one package that is obsolete [1].
- You are loading the hyperref package with textual arguments. It is said that these options are better set subsequently with the \hypersetup command. See the package manual for details.
- Page and paper dimensions are better set with the geometry package.
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Manual Template (Header and Footer)
I'm new to the forum and first of all I'd like to say thank you to the community for the useful job!
I'd really like to use your template in my LaTeX documents but I'm using the memoir class, which duplicates some definitions and thus conflicts with the fancyhdr class. So I tried playing a bit with memoir's features but had no luck (I found the documentation a bit tricky).
Do you gals/guys have some quick and dirty example on how to deal with that?
Thank you.
Ciao.
--
Samuele
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Manual Template (Header and Footer)
After reading Chapter 7 (Pagination and headers, p.115ff)) of the memoir manual you should be able to translate the given solutions to that class.samael wrote:[…] I'd really like to use your template in my LaTeX documents but I'm using the memoir class, which duplicates some definitions and thus conflicts with the fancyhdr class. So I tried playing a bit with memoir's features but had no luck (I found the documentation a bit tricky). […]
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10