LaTeX forum ⇒ Fonts & Character SetsList of Abbrevations as Chapter Topic is solved

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

List of Abbrevations as Chapter

Postby Matam » Thu Jun 07, 2018 12:49 pm

Please see the attachment to understand my Problem. I want the List of Abbreviations as Chapter title. Here, it appeared as section heading. Similarly, it appeared as section heading in Contents. Please, see the same attachment for contents list.

Here is the code in Preamble and I entered for List of Abbreviations:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[11pt, a4paper, oneside]{thesis}
  2. \usepackage[body={7.0in, 9.5in},top=1.2in, left=1.69in, right=1.0in, includefoot]{geometry}
  3. \bibliographystyle{IEEEtran}
  4. \hyphenation{op-tical net-works semi-conduc-tor}
  5. \usepackage{wrapfig}
  6. \usepackage[utf8]{inputenc}
  7. \usepackage[english]{babel}
  8. \usepackage{graphicx}
  9. \usepackage{amsmath}
  10. \usepackage{multirow}
  11. \setcounter{secnumdepth}{3}
  12. \usepackage{pdfpages}
  13. \usepackage[nottoc,notlof,notlot]{tocbibind}
  14. %\renewcommand\bibname{References}
  15. \usepackage{cite}
  16. %\usepackage{natbib}
  17. \usepackage{float}
  18. \usepackage{color}
  19. \usepackage{algorithm,algpseudocode}
  20. \renewcommand{\baselinestretch}{1.3}
  21. \usepackage{titlesec} % Modifica títulos
  22. \titleformat{\chapter}[hang]
  23. {\LARGE\normalfont\bfseries}
  24. {\thechapter}{1em}{}
  25. \titleformat{name=\chapter,numberless}[hang]
  26. {\normalfont\LARGE\bfseries\filcenter}{}{1ex}{}{}
  27. \titleformat{\section}[hang]{\normalfont\bfseries}{\thesection}{0.5em}{}
  28. \titleformat{\subsection}[hang]{\normalfont\bfseries}{\thesubsection}{0.5em}{}
  29. \titleformat{\subsubsection}[hang]{\normalfont\bfseries}{\thesubsubsection}{0.5em}{}
  30.  
  31. \titlespacing{\chapter}{0pt}{0pt}{40pt}
  32. \titlespacing{\section}{0pt}{\baselineskip}{0.625\baselineskip}
  33. \titlespacing{\subsection}{0pt}{\baselineskip}{0.6\baselineskip}
  34. \titlespacing{\subsubsection}{0pt}{\baselineskip}{\baselineskip}
  35. \usepackage{tikz}
  36. \usetikzlibrary{shapes,arrows}
  37. \newcommand*\circled[1]{\tikz[baseline=(char.base)]{
  38. \node[shape=circle,draw,inner sep=0.5pt] (char) {#1};}}
  39. \usetikzlibrary{calc}
  40. \usetikzlibrary{calc,matrix}
  41. \usepackage[skip=2pt,font=scriptsize]{caption}
  42. \usepackage{subcaption}
  43. \usepackage{array}
  44. \usepackage{mdwmath}
  45. \usepackage{mdwtab}
  46. \usepackage{multirow}
  47. \usepackage{siunitx}
  48. \usepackage{soul}
  49. \usepackage{cancel}
  50. \usepackage{amssymb}% <!-- m --><a class="postlink" href="http://ctan.org/pkg/amssymb">http://ctan.org/pkg/amssymb</a><!-- m -->
  51. \usepackage{pifont}% <!-- m --><a class="postlink" href="http://ctan.org/pkg/pifont">http://ctan.org/pkg/pifont</a><!-- m -->
  52. \newcommand{\cmark}{\ding{41}}%
  53. \newcommand{\xmark}{\ding{55}}
  54. %\usetikzlibrary{calc,matrix}
  55. \usepackage{color,soul}
  56. \usepackage{enumerate}
  57. \usepackage{IEEEtrantools}
  58. \usepackage{bbding}
  59. %\bibliographystyle{ieeebib}
  60. \usepackage{rotating}
  61. \usepackage{listings}
  62. \usepackage{lineno}
  63. \usepackage{lscape}
  64. \usepackage{adjustbox}
  65. %\modulolinenumbers[1]
  66. \lstdefinestyle{mystyle}{
  67. breakatwhitespace=false,
  68. breaklines=true,
  69. captionpos=b,
  70. keepspaces=true,
  71. numbers=left,
  72. numbersep=20pt,
  73. showspaces=false,
  74. showstringspaces=false,
  75. showtabs=false,
  76. tabsize=2
  77. }
  78. \lstset{style=mystyle}
  79. % % Nomenclature commands
  80. \usepackage[intoc]{nomencl}
  81. \makenomenclature
  82.  
  83. \usepackage[toc,nopostdot,nonumberlist,acronym,section]{glossaries}
  84. \newrobustcmd{\bffirst}[1]{{\let\mfirstucMakeUppercase\textbf\capitalisewords{#1}}}
  85.  
  86. \newacronymstyle{bf-long-short}{\GlsUseAcrEntryDispStyle{long-short}}{\GlsUseAcrStyleDefs{long-short}\renewcommand*{\GenericAcronymFields}{description={\bffirst{\the\glslongtok}}}}
  87. \setacronymstyle{bf-long-short}
  88.  
  89. \newglossary[ch1]{chstyle}{ch2}{ch3}{List of Greek Symbols}
  90. \makeglossaries
  91. \glsdisablehyper
  92.  
  93. \newglossarystyle{csyle}{%
  94. \glossarystyle{list}%
  95. \renewcommand*{\glossaryentryfield}[5]{%
  96. \item[\glsentryitem{##1}\glstarget{##1}{##2}]%
  97. \hspace{2.5cm}##3\glspostdescription\dotfill ##5}%
  98. }
  99. %\renewcommand{\chaptername}[2]{\chaptername{#1} \thechapter{#2}}
  100.  
  101. % %
  102.  
  103.  
  104. \include{glossary-nomen-entries}
  105. \begin{document}
  106. .
  107. .
  108.  
  109.  
  110. \tableofcontents
  111.  
  112. \cleardoublepage
  113. %List of figures
  114. \addcontentsline{toc}{chapter}{\listfigurename}
  115. \listoffigures
  116. \cleardoublepage
  117. %List of tables
  118. \addcontentsline{toc}{chapter}{\listtablename}
  119. \listoftables
  120.  
  121. % Print Nomenclature
  122. \printnomenclature
  123.  
  124.  
  125. % List of Abbreviations
  126. \printglossary[title=List of Abbreviations,type=\acronymtype]
  127. \renewcommand{\glsnamefont}[1]{\makefirstuc{#1}}
Attachments
listofabbreviationsasChapters.png
Please see the attachment to understand my Problem. I want the List of Abbreviations as Chapter title. Here, it appeared as section heading. Similarly, it appeared as section heading in Contents. Please, see the same attachment for contents list.
listofabbreviationsasChapters.png (280.87 KiB) Viewed 1711 times
Last edited by Stefan Kottwitz on Thu Jun 07, 2018 1:26 pm, edited 1 time in total.
Reason: code marked

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

Postby Stefan Kottwitz » Thu Jun 07, 2018 1:29 pm

This could help, before \printglossary:

\renewcommand{\glossarysection}[2][]{\chapter*{#1}}

Stefan
Site admin

Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

Postby Matam » Fri Jun 08, 2018 12:54 pm

Thanks a lot. It did solve the issue. But, some other minor issues developed. Please check the attachment.
Attachments
listofabbreviationsasMinorissues.png
listofabbreviationsasMinorissues.png (162.12 KiB) Viewed 1695 times

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

Postby Stefan Kottwitz » Fri Jun 08, 2018 2:07 pm

Try

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \cleardoublepage
  2. \markboth{List of Abbrevations}{List of Abbrevations}
  3. \addcontentsline{toc}{chapter}{List of Abbrevations}
  4. \printglossary...


Stefan
Site admin

Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

Postby Matam » Sat Jun 09, 2018 8:01 am

I added the following code given by you and it solved all the issues. Only problem is, twice appearance of List of Abbreviations in Latex. How to remove the second appearance of List of Abbreviations from list of contents. Please, see the PDF screen shot to understand the problem.

The code is:

  1.  
  2. % List of Abbreviations
  3. \cleardoublepage
  4. \renewcommand{\glossarysection}[2][]{\chapter*{#1}}
  5. \markboth{List of Abbrevations}{List of Abbrevations}
  6. \addcontentsline{toc}{chapter}{List of Abbrevations}
  7. \printglossary[title=List of Abbreviations,type=\acronymtype]
  8. \renewcommand{\glsnamefont}[1]{\makefirstuc{#1}}
  9.  
  10.  
Attachments
listofabbre.png
listofabbre.png (84.73 KiB) Viewed 1674 times

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

Postby Stefan Kottwitz » Sat Jun 09, 2018 3:22 pm

Perhaps simply remove \addcontentsline{toc}{chapter}{List of Abbrevations}. As it's already done (the second time).

Stefan
Site admin

Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

Postby Matam » Sat Jun 09, 2018 6:22 pm

Excellent. Your second reply did work well after running the code for couple of time. I did not delete the code as you mentioned in your third reply. Please, check the PDF screen shot.
Attachments
listofabbSolved.png
listofabbSolved.png (64.17 KiB) Viewed 1666 times

User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Postby nlct » Tue Jul 24, 2018 5:38 pm

The reason for the list of abbreviations appearing as a section rather than a chapter is because you have explicitly instructed the glossaries package to do this with the section package option:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \usepackage[toc,% add the glossary/list of abbreviations to the table of contents
  2. nopostdot,nonumberlist,acronym,
  3. section% make the glossary/list of abbreviations use \section
  4. ]{glossaries}

The default behaviour is to use \chapter if it has been defined, otherwise it will use \section. (The starred unnumbered form is the default.) So there's no need to redefine \glossarysection if you want to use \chapter*, just remove the section package option:
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \usepackage[toc,% add the glossary/list of abbreviations to the table of contents
  2. nopostdot,nonumberlist,acronym ]{glossaries}


Regards
Nicola Talbot


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 1 guest