LaTeX forum ⇒ Text Formattingtable of contents not showing header and footer Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
jsbibra
Posts: 17
Joined: Tue Sep 10, 2019 2:25 pm

table of contents not showing header and footer

Postby jsbibra » Sun Nov 03, 2019 8:21 am

my toc page is not showing the headers/footers--why is this happening


[img]
ScreenClip.png
[/img]

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[10pt,a4paper]{article}
  2. \usepackage{printlen}
  3. \usepackage{layouts}
  4. \usepackage{titlesec}
  5. \usepackage{multirow, makecell, tabularx, booktabs}
  6. \usepackage{babel}
  7. \usepackage{setspace}
  8. \usepackage{framed}
  9. \usepackage{blindtext}
  10. \renewcommand*\familydefault{\sfdefault}
  11. %preamble
  12. \usepackage[
  13. height=8.5in, % height of the text block
  14. width=6.5in, % width of the text block
  15. top=78pt, % distance of the text block from the top of the page
  16. headheight=60pt, % height for the header block
  17. headsep=12pt, % distance from the header block to the text block
  18. heightrounded, % ensure an integer number of lines
  19. %showframe, % show the main blocks
  20. verbose, % show the values of the parameters in the log file
  21. ]{geometry}
  22. \usepackage{enumitem}
  23. \usepackage[table]{xcolor} %for color of table
  24. \usepackage{booktabs} %for toprule midrule bottomrule in tables
  25. \usepackage{multirow} % Required for multirows
  26. \usepackage{longtable}
  27. \usepackage{rotating}
  28. \usepackage{lscape}
  29. \usepackage[utf8]{inputenc}
  30. \usepackage{fancyhdr}
  31. \usepackage[none]{hyphenat} %no hyphenation
  32. \usepackage{graphicx}
  33. \usepackage{float}
  34. \usepackage{lastpage} %toget last page number
  35. \usepackage{indentfirst}
  36. \usepackage{smartdiagram}
  37. \usepackage{tikz,xcolor}
  38. \usetikzlibrary{shapes, arrows, matrix, calc}
  39. \usetikzlibrary{decorations.markings}
  40. \usetikzlibrary{arrows.meta,quotes,positioning}
  41. \usepackage{verbatim}
  42. \tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, text width=2.5cm, draw=black, fill=blue!20]
  43. \tikzstyle{eff} = [ellipse, minimum height=2em, draw=black, fill=pink!20]
  44. \tikzstyle{arrow} = [thick, ->, >=stealth]
  45. \usetikzlibrary{arrows,calc,positioning}
  46. \usetikzlibrary{positioning}
  47. \usetikzlibrary{matrix,fit,calc}
  48. %header and footer
  49. \pagestyle{fancy}
  50. \fancyhead{}
  51. \fancyfoot{}
  52. \renewcommand{\headrulewidth}{0.1pt}
  53. \renewcommand{\footrulewidth}{0.1pt}
  54. \fancyfoot[L]{\footnotesize Prepared in \LaTeX\ Typeset By\\
  55. Colonel JS Bibra\\
  56. Joint Controller\\
  57. Management Representative / CQA(AVL)
  58. }
  59. \fancyfoot[R]{\footnotesize Approved for Issue By\\
  60. S Satish Chandra Kumar\\
  61. Controller\\
  62. CQA(AVL)
  63. }
  64. \fancyhead[L]{\includegraphics[scale=.2]{example-image-a}}
  65. \fancyhead[C]{\footnotesize
  66. Quality Management System Manual \\ ISO 9001:2015 \\ Controllerate of Quality Assurance \\ Armoured Vehicle Electronics\\Avadi, Chennai – 600 054}
  67. \fancyhead[R]{%
  68. \footnotesize
  69. Issue No : \hspace{35pt}02 \\
  70. Issue Date : 15 Sep 2019 \\
  71. Rev No/ Rev Date\hspace{0pt} : \hspace{36pt}00 \\
  72. Page : \hspace{23pt}\thepage\ of \pageref{LastPage}}
  73. \usepackage{fourier-orns}
  74.  
  75. \renewcommand\headrule{%------------fancy top line of page
  76. \vspace{-6pt}
  77. \hrulefill
  78. \raisebox{-2.1pt}
  79. {\quad\decofourleft\decotwo\decofourright\quad}%
  80. \hrulefill}
  81. \renewcommand*\contentsname{Table of Contents}
  82. %-----------------------------------------
  83. %---------------------------------------
  84. \begin{document}
  85. %title page
  86. \begin{titlepage}
  87. \rule{3mm}{.5pt}%
  88. \rule[-3mm]{.5pt}{1cm}%
  89. \rule{3mm}{.5pt}%
  90. \fontfamily{stix}\selectfont
  91. \pagecolor{brown!20}
  92. \begin{center}
  93. \headrule\\[.25in]
  94. {\MakeUppercase {\huge Quality Management System Manual}}\\[2mm]
  95. \headrule\\[4mm]
  96. \textsc{\Large as per requirements of std iso 9001:2015} \\[4mm]
  97. \begin{figure}[H]
  98. \centering
  99. \includegraphics[scale=.4]{../../images/dgqalogo1.jpg}
  100. \label{DGQA Logo}
  101. \end{figure}
  102. \vspace*{4em}
  103. \textsc{\normalsize CONTROLLERATE OF QUALITY ASSURANCE\\ARMOURED VEHICLE ELECTRONICS\\GOVERNMENT OF INDIA\\ MIN OF DEFENCE (DGQA)\\AVADI, CHENNAI -- 600 054\\tel: 044-26843007, fax: 044-26841881, email:} {\normalsize <!-- e --><a href="mailto:cqaavl-dgqa@nic.in">cqaavl-dgqa@nic.in</a><!-- e -->}\\
  104. \vfill
  105. \line(1,0){400}\\
  106. \scriptsize NOT TO BE COPIED OR REPRODUCED IN FULL OR PART WITHOUT PERMISSION OF CONTROLLER, CQA(AVL)
  107. \end{center}
  108. \rule{3mm}{.5pt}%
  109. \rule[-3mm]{.5pt}{1cm}%
  110. \rule{3mm}{.5pt}%
  111. \end{titlepage}
  112. %****************************************************************************************************
  113.  
  114. \pagenumbering{roman}
  115.  
  116. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  117.  
  118. \section*{Distribution List for Quality Manual}
  119.  
  120. \addcontentsline{toc}{section}{\numberline{}Distribution List for Quality Manual}
  121.  
  122. \begin{table}[htbp]
  123. \begin{center}
  124.  
  125. \begin{tabular}{p{.5in}p{3in}p{2in}}
  126.  
  127. \toprule
  128.  
  129. \midrule
  130. COPY NO & DISTRIBUTION & TYPE OF COPY\\
  131. \midrule
  132. 1 & Management representative & Master Copy\\
  133. 2 & Controller Secretariat & Controlled Copy\\
  134. 3 & T Division & Controlled Copy\\
  135. 4 & M Division & Controlled Copy\\
  136. 5 & Admin & Controlled Copy\\
  137. 6 & Stores & Controlled Copy\\
  138. 7 & Library & Controlled Copy \\
  139. 8 & P \&\ C & Controlled Copy\\
  140. 9 & Quality Audit Section & Controlled Copy\\
  141. \bottomrule
  142. \end{tabular}
  143. \end{center}
  144. \end{table} \cleardoublepage
  145. %-----------------------------------------------------------
  146.  
  147. %---------------------------------------------------
  148. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  149. %table of contents stuff%
  150. \tableofcontents
  151.  
  152. \thispagestyle{empty}%no page number on toc%
  153. \cleardoublepage%pagebreak after toc%
  154. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  155. %list of figures
  156. \listoffigures
  157. \addcontentsline{toc}{section}{\numberline{}List of Figures}
  158. \cleardoublepage%pagebreak after list of figures%
  159. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  160. %main body stuff%
  161. \pagenumbering{arabic}
  162. \setcounter{page}{1}
  163. %---------------------------------------------------------------
  164. %toc
  165. %abbreviation
  166. %figures
  167. %tables
  168. %annexures
  169. %main content
  170.  
  171. \section{Scope}\label{sec:Scope}
  172. CQA(AVL) shall provide quality assurance activities for armored fighting vehicles (AFV) and there variants as per Directorate General of Quality Assurance (DGQA) guidelines
  173.  
  174. \section{Normative Reference}\label{sec:Normative Reference}
  175. \begin{quote}
  176. ISO 9001-2015 -- Quality management system requirements\\
  177. ISO 19011:2015 -- Guidelines for auditing management systems\\
  178. DGQA standing orders\\
  179. CQA(AVL) standing orders
  180. \end{quote}
  181.  
  182.  
  183. \section{Terms and Definitions}\label{sec:Terms and Definitions}
  184. \begin{tabular}{ll}
  185. \hline
  186. ABBREVIATION & Acronym\\
  187. \hline
  188. AC & Assistant Controller\\
  189.  
  190. \end{tabular}
  191. \cleardoublepage
  192.  
  193. \section{Leadership}
  194. \subsection{Leadership and commitment}
  195. \subsubsection{General}
  196.  
  197. \cleardoublepage
  198. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  199. \begin{appendix}
  200. \addcontentsline{toc}{section}{\numberline{}Annexures}
  201. %-----------------------------------------------
  202. \begin{center}
  203. \hfill \underline{{\textbf{Annexure : QMS/F-01}}}\\[1cm]
  204. \addcontentsline{toc}{section}{\numberline{}Flow Chart of Corrective Action: QMS/F-01 }
  205. \raisebox{20pt}{\underline{\MakeUppercase{\textbf{flow chart of corrective action}}}}
  206. \begin{tikzpicture}[node distance=2cm]
  207. \node (pro1)[process]{Non\\ Conformance Identified};
  208. \node (pro2a)[process, below of =pro1, xshift=-5cm]{Service};
  209. \node (pro2b)[process, below of =pro1]{Process};
  210. \node (pro2c)[process, below of =pro1, xshift=5cm]{System};
  211. \node (pro3)[process, below of =pro2b]{Investigation of Cause};
  212. \node (pro4)[process, below of =pro3]{Corrective Action Plan};
  213. \node (pro5)[process, below of =pro4]{Implementation of Action Plan};
  214. \node (pro4a)[process, right of =pro4, xshift=3cm, yshift=-1cm]{Review of Plan, \\Action \&\ Effectiveness in Management Review Meeting};
  215. \node (eff)[eff, below of = pro4a, yshift = -.5cm]{Check Effectiveness};
  216. \node (pro4b)[process, below of = pro4a, yshift = -2cm]{Is it OK?};
  217. \node (pro4c)[process, below of = pro4b]{Close};
  218. \draw [arrow](pro1)--(pro2b);
  219. \draw [arrow](pro1)--(pro2a);
  220. \draw [arrow](pro1)--(pro2c);
  221. \draw [arrow](pro2b)--(pro3);
  222. \draw [arrow](pro3)--(pro4);
  223. \draw [arrow](pro4)--(pro5);
  224. \draw [arrow] (pro2a) |- ($(pro2b)!.5!(pro3)$);
  225. \draw [arrow] (pro2c) |- ($(pro2b)!.5!(pro3)$);
  226. \draw [arrow] (eff) -- (pro4b);
  227. \draw [arrow] (pro4b) -- (pro4c);
  228. \draw [arrow](pro5)|-(eff);
  229. \draw[arrow](1.5,-6)--(3.5,-6);
  230. \draw[arrow](1.5,-8)--(3.5,-8);
  231. \draw[arrow](3.5,-11)--(-5,-11)|-(-1.5,-4);
  232. \node [align=left] at (2.6,-11.2) {Not OK};
  233. \node [align=left] at (5.5,-12) {OK};
  234. \end{tikzpicture}
  235. \end{center}
  236. \cleardoublepage6
  237. %-------------------------------
  238. \begin{center}
  239. \hfill \underline{{\textbf{Annexure : QMS/F-03}}}\\[1cm]
  240. \underline{\MakeUppercase{\textbf{Minutes of Management Review meeting }}}
  241. \addcontentsline{toc}{section}{\numberline{}Minutes of Management Review Meeting: QMS/F-03 }
  242. \end{center}
  243. \paragraph{Date:}
  244. \paragraph{Member Present:}
  245. \paragraph{Members Absent:}
  246. \paragraph{Agenda:}
  247. %---------------------------------------------------------------------
  248. \renewcommand{\labelenumi}{(\alph{enumi})}
  249. \renewcommand{\labelenumii}{(\roman{enumii})}
  250. \begin{enumerate}
  251. \item The status of actions from previous management reviews
  252. \end{enumerate}
  253. \begin{table}[htbp]
  254. \begin{center}
  255. \begin{tabular}{|p{.5in}|p{3in}|p{1.6in}|p{1in}|}
  256. \toprule
  257. S No & Details of Discussion and Action Planned & Responsibility & Target Date\\
  258. \midrule
  259. 1 & & &\\
  260. 2 & & &\\
  261. 3 & & & \\
  262. 4 & & & \\
  263. \bottomrule
  264. \end{tabular}
  265. \end{center}
  266. \end{table}
  267. \vspace{1cm}
  268. (Signature of MR) \hspace{3in} (Signature of Controller)\\
  269. %---------------------------------
  270. \end{appendix}
  271. \end{document}
Attachments
ScreenClip.png
ScreenClip.png (41.75 KiB) Viewed 171 times

User avatar
Stefan Kottwitz
Site Admin
Posts: 9501
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Nov 03, 2019 9:59 am

Hi,

just set a \thispagestyle{fancy} right before \tableofcontents.

Stefan
Site admin

jsbibra
Posts: 17
Joined: Tue Sep 10, 2019 2:25 pm

Postby jsbibra » Sun Nov 03, 2019 10:10 am

thanks
didnt work

i removed the line \thispagestyle{empty} from the toc page--now the header/footer shows up


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 6 guests