LaTeX forum ⇒ Text Formattingtable of contents 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

Postby jsbibra » Wed Oct 30, 2019 2:53 am

I need to put 10 appendices in a manual
the appendices section needs to be ANNEXURES not appendices
the annexures should show up in the toc with page numbers
i should be able to give my own name to each annexure

User avatar
Ijon Tichy
Posts: 314
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Wed Oct 30, 2019 8:43 am

Please ask a concrete question and illustrate your problem with a Infominimal working example. Currently I would answer something like:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[chapterprefix]{scrbook}
  2.  
  3. \usepackage[main=english]{babel}
  4. \renewcaptionname{english}{\appendixname}{Annexure}% see the KOMA-Script manual, e.g., scrguien.pdf
  5. \usepackage{mwe}% not needed for the real document
  6.  
  7. \begin{document}
  8. \tableofcontents
  9. \blinddocument
  10. \appendix
  11. \chapter{This is the First Annexure}
  12. \blindtext
  13. \chapter{This is the Second Annexure}
  14. \blindtext
  15. \blinddocument
  16. \blinddocument
  17. \blinddocument
  18. \blinddocument
  19. \blinddocument
  20. \blinddocument
  21. \blinddocument
  22. \blinddocument
  23. \blinddocument
  24. \blinddocument
  25. \end{document}

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

Postby jsbibra » Thu Oct 31, 2019 10:18 am

thanks--have put the quality manual latex code here--

https://latex.org/forum/viewtopic.php?f=5&t=32981

please have a look at the appendix part and advise

User avatar
Ijon Tichy
Posts: 314
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Thu Oct 31, 2019 11:51 am

Never ever. The code at the other questions contains a lot of things that are unrelated to the appendix or the table of contents. I do not have the time to read such an extended code to find out, what could be relevant. You also should remove all the not necessary code you've deactivated using %. Please make examples always as short as possible.

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

Postby jsbibra » Thu Oct 31, 2019 3:12 pm

Done--the code is cropped and uploaded

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. \usepackage{tgschola}%------------font YES
  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. \usepackage[american,siunitx]{circuitikz}
  46. \usetikzlibrary{arrows,calc,positioning}
  47. \usetikzlibrary{positioning}
  48. \usetikzlibrary{matrix,fit,calc}
  49.  
  50. %header and footer
  51. \pagestyle{fancy}
  52. \fancyhead{}
  53. \fancyfoot{}
  54. \renewcommand{\headrulewidth}{0.1pt}
  55. \renewcommand{\footrulewidth}{0.1pt}
  56.  
  57.  
  58.  
  59. \fancyfoot[L]{\footnotesize Prepared in \LaTeX\ Typeset By\\
  60. Colonel JS Bibra\\
  61. Joint Controller\\
  62. Management Representative / CQA(AVL)
  63. }
  64. \fancyfoot[R]{\footnotesize Approved for Issue By\\
  65. S Satish Chandra Kumar\\
  66. Controller\\
  67. CQA(AVL)
  68. }
  69.  
  70.  
  71. \fancyhead[L]{\includegraphics[scale=.2]{example-image-a}}
  72.  
  73. \fancyhead[C]{\footnotesize
  74. Quality Management System Manual \\ ISO 9001:2015 \\ Controllerate of Quality Assurance \\ Armoured Vehicle Electronics\\Avadi, Chennai – 600 054}
  75.  
  76. \fancyhead[R]{%
  77. \footnotesize
  78. Issue No : \hspace{35pt}02 \\
  79. Issue Date : 15 Sep 2019 \\
  80. Rev No/ Rev Date\hspace{0pt} : \hspace{36pt}00 \\
  81. Page : \hspace{23pt}\thepage\ of \pageref{LastPage}}
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89. \usepackage{fourier-orns}
  90.  
  91. \renewcommand\headrule{%------------fancy top line of page
  92. \vspace{-6pt}
  93. \hrulefill
  94. \raisebox{-2.1pt}
  95. {\quad\decofourleft\decotwo\decofourright\quad}%
  96. \hrulefill}
  97. \renewcommand*\contentsname{Table of Contents}
  98. %-----------------------------------------
  99.  
  100.  
  101.  
  102. %---------------------------------------
  103. \begin{document}
  104.  
  105. %title page
  106. \begin{titlepage}
  107.  
  108. \begin{center}
  109. %\underline{COPY NO:}\\
  110. \headrule\\[.25in]
  111. {\MakeUppercase {\huge Quality Management System Manual}}\\[2mm]
  112. \headrule\\[4mm]
  113. \textsc{\Large as per requirements of std iso 9001:2015}
  114. \begin{figure}[H]
  115. \centering
  116. \includegraphics[scale=.3]{example-image-a}
  117.  
  118. \label{DGQA Logo}
  119. \end{figure}
  120.  
  121. %\vfill
  122. %\line(1,0){400}\\
  123.  
  124. \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 -->}\\
  125. \vfill
  126. \line(1,0){400}\\
  127.  
  128. \scriptsize NOT TO BE COPIED OR REPRODUCED IN FULL OR PART WITHOUT PERMISSION OF CONTROLLER, CQA(AVL)
  129.  
  130.  
  131.  
  132. \end{center}
  133.  
  134. \end{titlepage}
  135. %****************************************************************************************************
  136.  
  137. \pagenumbering{roman}
  138.  
  139. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  140. \begin{center}
  141. \section*{Distribution List for Quality Manual}
  142. \end{center}
  143. \addcontentsline{toc}{section}{\numberline{}Distribution List for Quality Manual}
  144. \cleardoublepage
  145. %-----------------------------------------------------------
  146. \section*{Revision History}
  147. \addcontentsline{toc}{section}{\numberline{}Revision History}
  148. \cleardoublepage
  149. %---------------------------------------------------
  150. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  151. %table of contents stuff%
  152. \tableofcontents
  153.  
  154. \thispagestyle{empty}%no page number on toc%
  155. \cleardoublepage%pagebreak after toc%
  156. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  157. %list of figures
  158. \listoffigures
  159. \addcontentsline{toc}{section}{\numberline{}List of Figures}
  160. \cleardoublepage%pagebreak after list of figures%
  161. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  162. %main body stuff%
  163. \pagenumbering{arabic}
  164. \setcounter{page}{1}
  165. %---------------------------------------------------------------
  166. %toc
  167. %abbreviation
  168. %figures
  169. %tables
  170. %annexures
  171. %main content
  172.  
  173. \section{Scope}\label{sec:Scope}
  174. CQA(AVL) shall provide quality assurance activities for armored fighting vehicles (AFV) and there variants as per Directorate General of Quality Assurance (DGQA) guidelines
  175.  
  176. \section{Normative Reference}\label{sec:Normative Reference}
  177. \begin{quote}
  178. ISO 9001-2015 -- Quality management system requirements\\
  179. ISO 19011:2015 -- Guidelines for auditing management systems\\
  180. DGQA standing orders\\
  181. CQA(AVL) standing orders
  182. \end{quote}
  183.  
  184.  
  185. \section{Terms and Definitions}\label{sec:Terms and Definitions}
  186. \begin{tabular}{ll}
  187. \hline
  188. ABBREVIATION & Acronym\\
  189. \hline
  190. AC & Assistant Controller\\
  191.  
  192. \end{tabular}
  193.  
  194.  
  195.  
  196.  
  197. \cleardoublepage
  198. %add here
  199. \section{Leadership}
  200.  
  201. \subsection{Leadership and commitment}
  202.  
  203. \subsubsection{General}
  204. \cleardoublepage
  205. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  206. \section*{Annexures}
  207. \addcontentsline{toc}{section}{\numberline{}Annexures}
  208. %-----------------------------------------------
  209. \begin{center}
  210. \hfill \underline{{\textbf{Annexure : QMS/F-01}}}\\[1cm]
  211. % \addcontentsline{toc}{Annexures}{\numberline{}Flow Chart of Corrective Action: QMS/F-01 }
  212. \raisebox{20pt}{\underline{\MakeUppercase{\textbf{flow chart of corrective action}}}}
  213.  
  214. \cleardoublepage
  215. %-------------------------
  216. \begin{center}
  217. \hfill \underline{{\textbf{Annexure : QMS/F-02}}}\\[1cm]
  218. \underline{\MakeUppercase{\textbf{Procedure for conduct of management review meeting}}}
  219. % \addcontentsline{toc}{Annexures}{\numberline{}Procedure for conduct of management review meeting: QMS/F-02 }
  220. \end{center}
  221. \paragraph{Purpose:}
  222. %-------------------------------
  223. \begin{center}
  224. \hfill \underline{{\textbf{Annexure : QMS/F-03}}}\\[1cm]
  225. \underline{\MakeUppercase{\textbf{Minutes of Management Review meeting }}}
  226. % \addcontentsline{toc}{Annexures}{\numberline{}Minutes of Management Review Meeting: QMS/F-03 }
  227. \end{center}
  228. \paragraph{Date:}
  229. \paragraph{Member Present:}
  230. \paragraph{Members Absent:}
  231. \paragraph{Agenda:}
  232.  
  233. %---------------------------------------------------------------------
  234. \renewcommand{\labelenumi}{(\alph{enumi})}
  235. \renewcommand{\labelenumii}{(\roman{enumii})}
  236. \begin{enumerate}
  237. \item The status of actions from previous management reviews
  238.  
  239. \end{enumerate}
  240. \begin{table}[htbp]
  241. \begin{center}
  242. \begin{tabular}{|p{.5in}|p{3in}|p{1.6in}|p{1in}|}
  243. \toprule
  244. S No & Details of Discussion and Action Planned & Responsibility & Target Date\\
  245. \midrule
  246. 1 & & &\\
  247. 2 & & &\\
  248. 3 & & & \\
  249. 4 & & & \\
  250. \bottomrule
  251. \end{tabular}
  252. \end{center}
  253. \end{table}
  254. \vspace{1cm}
  255. (Signature of MR) \hspace{3in} (Signature of Controller)\\
  256. \cleardoublepage\
  257. %---------------------------------
  258. \begin{center}
  259. \hfill\underline{{\textbf{Annexure: QMS/F-04}}}\\[1cm]
  260. \underline{\MakeUppercase{\textbf{annual audit plan}}}
  261. % \addcontentsline{toc}{Annexures}{\numberline{}Annual Audit Plan: QMS/F-04 }
  262. \end{center}
  263. \cleardoublepage\
  264. %------------------------------
  265. \begin{center}
  266. \hfill\underline{{\textbf{Annexure: QMS/F-05}}}\\[1cm]
  267. \underline{\MakeUppercase{\textbf{audit schedule}}}
  268. % \addcontentsline{toc}{Annexures}{\numberline{}Audit Schedule: QMS/F-05 }
  269. \end{center}
  270. \cleardoublepage\
  271. %------------------------------------
  272. \begin{center}
  273. \hfill\underline{{\textbf{Annexure: QMS/F-06}}}\\[1cm]
  274. \underline{\MakeUppercase{\textbf{audit observation sheet}}}
  275. % \addcontentsline{toc}{Annexures}{\numberline{}Audit Observation Sheet: QMS/F-06 }
  276. \end{center}
  277.  
  278. \cleardoublepage\
  279. %----------------------------------------
  280. \begin{center}
  281. \hfill \underline{{\textbf{Annexure: QMS/F-07}}}\\[1cm]
  282. \underline{\MakeUppercase{\textbf{qms retention policy}}}
  283. % \addcontentsline{toc}{Annexures}{\numberline{}QMS Retention Policy: QMS/F-07 }
  284. \end{center}
  285.  
  286. \cleardoublepage\
  287. %------------------------------------------
  288. \begin{center}
  289. \hfill\underline{{\textbf{Annexure: QMS/F-08}}}\\[1cm]
  290. \underline{\MakeUppercase{\textbf{control on documents }}}
  291. % \addcontentsline{toc}{Annexures}{\numberline{}Control on Documents: QMS/F-08 }
  292. \end{center}
  293.  
  294. \cleardoublepage\
  295. %----------------------------------------------
  296. \begin{center}
  297. \hfill\underline{{\textbf{Annexure: QMS/F-09}}}\\[1cm]
  298. \underline{\MakeUppercase{\textbf{quality objectives}}}
  299. % \addcontentsline{toc}{Annexures}{\numberline{}Quality Objectives: QMS/F-09 }
  300. \end{center}
  301. \cleardoublepage
  302. %---------------------------------------------------
  303. \begin{landscape}
  304. %\hfill \underline{{\textbf {Annexure: QMS/F-10}}}\\[1cm]
  305. \footnotesize
  306.  
  307. %-----------------------------------------------------------------
  308. \end{document}
  309. %------------------------------------------------------
Last edited by jsbibra on Fri Nov 01, 2019 4:19 am, edited 1 time in total.

User avatar
Ijon Tichy
Posts: 314
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Thu Oct 31, 2019 4:36 pm

Do you really think, that this is a minimal example for your problem with the appendix or the table of contents? Maybe another one has the time to analyze more than ½ thousand lines of code …

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

Postby jsbibra » Fri Nov 01, 2019 4:19 am

reduced further please

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

Postby jsbibra » Fri Nov 01, 2019 6:34 pm

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \addcontentsline{toc}{section}{\numberline{}Annual Audit Plan: QMS/F-04 }


okay thanks --I got it working by adding the above line to my code
[img]
ScreenClip.png
[/img]

but how do I remove the bold font in the Appendix names?
Attachments
ScreenClip.png
ScreenClip.png (66.34 KiB) Viewed 1910 times

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

Postby jsbibra » Sat Nov 02, 2019 2:24 am

ok--got it by adding subsection in the code instead of section

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \addcontentsline{toc}{section}{\numberline{}Annual Audit Plan: QMS/F-04 }
--original

now changed to --
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \addcontentsline{toc}{subsection}{\numberline{}Annual Audit Plan: QMS/F-04 }
Attachments
ScreenClip.png
ScreenClip.png (157.24 KiB) Viewed 1898 times

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

Postby Stefan Kottwitz » Sat Nov 02, 2019 9:33 am

Great to see that you got it working.

Btw. thanks for posting complete code, and for reducing it! I just got error when I tested it, such as \end{center} missing, \end{landscape} missing, no language option given to babel. It would be good to test code before posting, so we can test it too. ;-)

Also btw. when you have repeated code, such as \hfill \underline{{\textbf{Annexure : ...}}}\\[1cm], consider making a \newcommand for it, that makes changes easier. And I would use \subsection* here.

In tables, you can use \centering instead of \begin{center} ... \end{center}, since the latter adds vertical space. The effect of such switch commands stay within an environment.

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \begin{table}[htbp!]
  2. \centering
  3. \begin{tabular}{...}
  4. \end{tabular}
  5. \end{table}


Stefan
LaTeX.org admin


Return to “Text Formatting”

Who is online

Users browsing this forum: Google [Bot] and 1 guest