Fonts & Character SetsList of Abbrevations as Chapter

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

List of Abbrevations as Chapter

Post by Matam »

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

\documentclass[11pt, a4paper, oneside]{thesis}
\usepackage[body={7.0in, 9.5in},top=1.2in, left=1.69in, right=1.0in, includefoot]{geometry}
\bibliographystyle{IEEEtran}
\hyphenation{op-tical net-works semi-conduc-tor}
\usepackage{wrapfig}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{multirow}
\setcounter{secnumdepth}{3}
\usepackage{pdfpages}
\usepackage[nottoc,notlof,notlot]{tocbibind} 
%\renewcommand\bibname{References}
\usepackage{cite}
%\usepackage{natbib}
\usepackage{float}
\usepackage{color}
\usepackage{algorithm,algpseudocode}
\renewcommand{\baselinestretch}{1.3}
\usepackage{titlesec} % Modifica títulos
\titleformat{\chapter}[hang]
{\LARGE\normalfont\bfseries}
{\thechapter}{1em}{}
\titleformat{name=\chapter,numberless}[hang]
  {\normalfont\LARGE\bfseries\filcenter}{}{1ex}{}{}
\titleformat{\section}[hang]{\normalfont\bfseries}{\thesection}{0.5em}{}
\titleformat{\subsection}[hang]{\normalfont\bfseries}{\thesubsection}{0.5em}{}
\titleformat{\subsubsection}[hang]{\normalfont\bfseries}{\thesubsubsection}{0.5em}{}

\titlespacing{\chapter}{0pt}{0pt}{40pt}
\titlespacing{\section}{0pt}{\baselineskip}{0.625\baselineskip}
\titlespacing{\subsection}{0pt}{\baselineskip}{0.6\baselineskip}
\titlespacing{\subsubsection}{0pt}{\baselineskip}{\baselineskip}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[shape=circle,draw,inner sep=0.5pt] (char) {#1};}}
\usetikzlibrary{calc}
\usetikzlibrary{calc,matrix}
\usepackage[skip=2pt,font=scriptsize]{caption}
\usepackage{subcaption}
\usepackage{array}
\usepackage{mdwmath}
\usepackage{mdwtab}
\usepackage{multirow}
\usepackage{siunitx}
\usepackage{soul}
\usepackage{cancel}
\usepackage{amssymb}% http://ctan.org/pkg/amssymb
\usepackage{pifont}% http://ctan.org/pkg/pifont
\newcommand{\cmark}{\ding{41}}%
\newcommand{\xmark}{\ding{55}}
%\usetikzlibrary{calc,matrix}
\usepackage{color,soul}
\usepackage{enumerate}
\usepackage{IEEEtrantools}
\usepackage{bbding}
%\bibliographystyle{ieeebib}
\usepackage{rotating}
\usepackage{listings}
\usepackage{lineno}
\usepackage{lscape}
\usepackage{adjustbox}
%\modulolinenumbers[1]
\lstdefinestyle{mystyle}{
    breakatwhitespace=false,         
    breaklines=true,                 
    captionpos=b,                    
    keepspaces=true,                 
    numbers=left,                    
    numbersep=20pt,                  
    showspaces=false,                
    showstringspaces=false,
    showtabs=false,                  
    tabsize=2
}
\lstset{style=mystyle}
% % Nomenclature commands
\usepackage[intoc]{nomencl}
\makenomenclature

\usepackage[toc,nopostdot,nonumberlist,acronym,section]{glossaries}
\newrobustcmd{\bffirst}[1]{{\let\mfirstucMakeUppercase\textbf\capitalisewords{#1}}}

\newacronymstyle{bf-long-short}{\GlsUseAcrEntryDispStyle{long-short}}{\GlsUseAcrStyleDefs{long-short}\renewcommand*{\GenericAcronymFields}{description={\bffirst{\the\glslongtok}}}}
\setacronymstyle{bf-long-short}

\newglossary[ch1]{chstyle}{ch2}{ch3}{List of Greek Symbols}
\makeglossaries
\glsdisablehyper

\newglossarystyle{csyle}{%
	\glossarystyle{list}%
	\renewcommand*{\glossaryentryfield}[5]{%
		\item[\glsentryitem{##1}\glstarget{##1}{##2}]%
		\hspace{2.5cm}##3\glspostdescription\dotfill ##5}%
}
%\renewcommand{\chaptername}[2]{\chaptername{#1} \thechapter{#2}}

% % 


\include{glossary-nomen-entries}
\begin{document}
.
.

 
\tableofcontents

\cleardoublepage
%List of figures
\addcontentsline{toc}{chapter}{\listfigurename}
\listoffigures
\cleardoublepage
%List of tables
\addcontentsline{toc}{chapter}{\listtablename}
\listoftables

% Print Nomenclature 
\printnomenclature


% List of Abbreviations 
\printglossary[title=List of Abbreviations,type=\acronymtype]
\renewcommand{\glsnamefont}[1]{\makefirstuc{#1}}
Attachments
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.
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 12840 times
Last edited by Stefan Kottwitz on Thu Jun 07, 2018 1:26 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

List of Abbrevations as Chapter

Post by Stefan Kottwitz »

This could help, before \printglossary:

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

Stefan
LaTeX.org admin
Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

List of Abbrevations as Chapter

Post by Matam »

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 12824 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

List of Abbrevations as Chapter

Post by Stefan Kottwitz »

Try

Code: Select all

\cleardoublepage
\markboth{List of Abbrevations}{List of Abbrevations}
\addcontentsline{toc}{chapter}{List of Abbrevations}
\printglossary...
Stefan
LaTeX.org admin
Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

List of Abbrevations as Chapter

Post by Matam »

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:
% List of Abbreviations 
\cleardoublepage
\renewcommand{\glossarysection}[2][]{\chapter*{#1}}
\markboth{List of Abbrevations}{List of Abbrevations}
\addcontentsline{toc}{chapter}{List of Abbrevations}
\printglossary[title=List of Abbreviations,type=\acronymtype]
\renewcommand{\glsnamefont}[1]{\makefirstuc{#1}}
Attachments
listofabbre.png
listofabbre.png (84.73 KiB) Viewed 12803 times
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

List of Abbrevations as Chapter

Post by Stefan Kottwitz »

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

Stefan
LaTeX.org admin
Matam
Posts: 29
Joined: Thu Jun 07, 2018 12:12 pm

List of Abbrevations as Chapter

Post by Matam »

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 12795 times
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

List of Abbrevations as Chapter

Post by nlct »

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

\usepackage[toc,% add the glossary/list of abbreviations to the table of contents
 nopostdot,nonumberlist,acronym,
 section% make the glossary/list of abbreviations use \section
 ]{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

\usepackage[toc,% add the glossary/list of abbreviations to the table of contents
 nopostdot,nonumberlist,acronym ]{glossaries}
Regards
Nicola Talbot
Post Reply