0

I am writing the final version of my PhD thesis. Everything works fine except that the Glossary external file I created is completely ignored by the program. I am using Texstudio to compile it. The problem is that the Glossary is not even printed in the Index (Table of contents), and so it is not present in the pdf file. I attach here both the Glossary and main file. Any help is completely appreciated!

%\documentclass[paper=a4,twoside=true,fontsize=11pt,headings=normal,open=right,parskip=off,pagesize,DIV=14,BCOR=5mm,toc=bibliography,toc=listof]{scrbook}

\documentclass[paper=a5,twoside=true,fontsize=10pt,headings=normal,open=right,parskip=off,pagesize,DIV=17,BCOR=5mm,toc=bibliography,toc=listof]{scrbook} \setlength{\voffset}{0pt} \addtolength{\voffset}{+0.1cm}

\pdfminorversion=7

%\RedeclareSectionCommand[beforeskip=20pt,afterindent=false]{chapter} \RedeclareSectionCommand[beforeskip=20pt]{chapter} % Default beforeskip ca. 33pt \setkomafont{disposition}{\normalcolor\bfseries}

\RedeclareSectionCommand[beforeskip=-.5\baselineskip,afterskip=.25\baselineskip]{subsubsection}

\usepackage[utf8]{inputenc} %\usepackage[USenglish,ngerman]{babel} \usepackage[english]{babel} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{grffile} \usepackage{textcomp} %\usepackage{varioref} % \usepackage{enumitem} \usepackage{scrpage2} %\usepackage{scrlayer-scrpage} %\usepackage{subfig} \usepackage{subcaption} \usepackage{multirow} \usepackage{caption} %\usepackage{placeins} %\usepackage{wrapfig} \usepackage{graphicx} %\usepackage{epstopdf} %\usepackage{booktabs} %\usepackage{tabularx} \usepackage{amsmath} \usepackage{amssymb} %\usepackage{multido} \usepackage{rotating} \usepackage{threeparttable} \usepackage{tablefootnote} \usepackage{mathtools} \usepackage{mhchem} \usepackage{etoolbox} \hyphenation{Drück-schwankungen} \hyphenation{Hoch-ge-schwin-dig-keits-kamera} \hyphenation{Strah-lungs-bil-der} \DeclarePairedDelimiter\abs{\lvert}{\rvert} \setcounter{secnumdepth}{3}

%\usepackage{blindtext}

%\usepackage{natbib} \usepackage[intoc]{nomencl}

%\usepackage[version=4]{mhchem} \usepackage{color} %\usepackage{siunitx} \usepackage{longtable,tabularx} \usepackage{footnote} \usepackage{enumitem} \usepackage[babel,german=quotes]{csquotes} %\usepackage[style=numeric-comp,sorting=nyt,backend=biber,minnames=4,maxnames=4,firstinits=true,defernumbers=true]{biblatex} \usepackage[bibstyle=numeric-comp2,citestyle=numeric-comp,sorting=nyt,backend=bibtex,minnames=4,maxnames=4,firstinits=true,defernumbers=true]{biblatex}\usepackage{xpatch}

\addbibresource{Bibliography/bibliography5.bib} \addbibresource{Bilbiography/mypub.bib}

\DefineBibliographyStrings{german}{andothers={et\addabbrvspace al\adddot}} \DefineBibliographyStrings{ngerman}{phdthesis = {Dissertation}} \renewcommand*{\mkbibnamelast}[1]{\textsc{#1}} \renewbibmacro{in:}{% \ifentrytype{article} {} {\printtext{\bibstring{in}\intitlepunct}}}

\xpatchbibdriver{thesis}{\printfield{type}\newunit}{\printfield{type}\setunit*{\addcomma\space}}{}{} \usepackage[table,xcdraw]{xcolor} %\usepackage{tabto} \urlstyle{same} \DeclareFieldFormat[article]{title}{{#1}} \DeclareFieldFormat[thesis]{title}{{\textit{#1}}} \DeclareFieldFormat[inproceedings]{title}{{#1}} \DeclareFieldFormat[incollection]{title}{{#1}}

\makenomenclature

\includeonly{ %Frontmatter/title, Frontmatter/title_fin, Frontmatter/Decl, Frontmatter/Abstract, Frontmatter/Zitat, Frontmatter/Danksagung, Frontmatter/Glossary, Chapters/01Introduction, Chapters/02TheoreticalandExperimentalBackground, Chapters/03TAUcode, Chapters/04BKHSingleInjectorModelling, Chapters/05BKHColdFlowModelling, Chapters/06SMART, Chapters/07BKHFull, Chapters/08Conclusions, Chapters/Appendix, Chapters/ListofPublications, } \bibliography{Bibliography/bibliography5.bib}

\begin{document}

\frontmatter
%\include{Frontmatter/title}
\include{Frontmatter/title_fin}
\include{Frontmatter/Decl}
\include{Frontmatter/Abstract}
\include{Frontmatter/Zitat}
\include{Frontmatter/Danksagung}




\tableofcontents

\listoffigures
\KOMAoptions{open=any}
\listoftables

\include{Frontmatter/Glossary}


\mainmatter

\begin{refsegment}

    \KOMAoptions{open=right}

    \include{Chapters/01Introduction}
    \include{Chapters/02TheoreticalandExperimentalBackground}
    \include{Chapters/03TAUcode}
    \include{Chapters/04BKHSingleInjectorModelling}
    \include{Chapters/05BKHColdFlowModelling}
    \include{Chapters/06SMART}
    \include{Chapters/07BKHFull}
    \include{Chapters/08Conclusions}
    \include{Chapters/Appendix}
    \include{Chapters/ListofPublications}
    %\bibliographystyle{abbrv}
    %\bibliographystyle{Referenzen/abbrvnatNumbSort}
    %\bibliography{thesisbiblio.bib}
    %   \printbibliography
    %\printbibliography[notkeyword={Eigene_Journal},notkeyword={Eigene_Conf}]

\end{refsegment}

\printbibliography 

\end{document}

and Glossary file

\renewcommand{\nomname}{Nomenclature}
\setlength\nomlabelwidth{.2\linewidth} % Abstand bei welchem die Definition startet
\setlength\nomitemsep{-\parsep}     % Zeilenabstand zwischen Abkürzungen
\newcommand\nomunit[1]{\def\nomentryend{\hfill#1}}

\renewcommand\nomgroup[1]{% \def\makelabel##1{##1}% \bigskip \ifx#1P\relax \item[\textbf{\large Physical quantities}]% \fi \ifx#1S\relax \item[\textbf{\large Symbols}]% \fi \ifx#1A\relax \item[\textbf{\large Acronims}]% \fi \ifx#1ND\relax \item[\textbf{\large Non-Dimensional numbers}]% \fi \ifx#1U\relax \item[\textbf{\large Subscripts}]% \fi \ifx#1T\relax \item[\textbf{\large Superscripts}]% \fi \medskip \let\makelabel\nomlabel }

\printnomenclature

  • \ifx#1ND\relax if the first two letters of #1 are the same, this will print the remaining letters followed by ND, if #1 is N it will print D – David Carlisle May 22 '23 at 15:09
  • The problem is that i does not print the nomenclature at all :( I mean it is not even included in the Index @DavidCarlisle – Federica Tonti May 22 '23 at 15:38
  • you show a "glossary file" which makes some definitions but no text, it is hard to guess what you expect. You show a lot of code but no one can run it as it \include files we do not have and do not show any glossary entries. Edit the question so it has a small but complete example of the problem. – David Carlisle May 22 '23 at 15:57
  • Copy everything over to a new project. If you replace \include{FrontMatter/Glossary} by the contents of your glossary file, does that fix things? If not, trim away all the other include commands, and you can make your example more minimal. – Teepeemm May 22 '23 at 16:06
  • Ok, I tried with overleaf and with it it works :( So now I will try to upload the thesis over there and checkout what happens. With exactly the same files, on texstudio it doesn't work. – Federica Tonti May 24 '23 at 18:50
  • Are you running makeindex as well as (pdf)latex? You want to do something like makeindex ⟨filename⟩.nlo -s nomencl.ist -o ⟨filename⟩.nls as 2.1 The Basics of the nomencl package manual. – Dai Bowen May 24 '23 at 19:38
  • No there is no make index in my file. I am not that familiar with the nomenclature package actually. What should I put in file name? Even if I solved the problem with overleaf I would like to try and implement the solution in my editor. Thanks a lot @DaiBowen ! – Federica Tonti May 24 '23 at 21:00
  • 1
    @FedericaTonti nomencl doesn't do the sorting within TeX, if your file is main.tex the pdflatex run generates a main.nlo file which contains the unsorted nomenclature info, makeindex needs to be run on this file to create a main.nls which is used on subsequent pdflatex compilations to insert the nomenclature. On the command line this means running makeindex main.nlo -s nomencl.ist -o main.nls after you'd have done pdflatex main.tex, I'm not sure about what that means within texstudio but this answer might help? – Dai Bowen May 24 '23 at 21:08
  • Thanks @DaiBowen, it was exactly what I needed. I’ll try this! – Federica Tonti May 26 '23 at 06:39

1 Answers1

0

You may have to use the command \printglossary

JamesT
  • 3,169
Nate
  • 73
  • From the last few comments, that appears to not have been the problem. Also, it appears that \printnomenclature accomplishes that goal. – Teepeemm Jun 01 '23 at 12:52
  • Why would this work for the OPs code? They are using the nomencl package, not glossaries, and have an appropriate \printnomenclature command. I would expect \printglossary to trigger an undefined command sequence error from their example. In the question comments it's established the code works fine on Overleaf which also points to a compilation rather than code issue. – Dai Bowen Jun 01 '23 at 20:06