I am trying to make glossaries per chapter for my book. This per chapter design for the glossary is tested from this answer at TEX.SX. But I am not able to print the glossary at the end of each chapter separately even the program runs but generates only the expanded version of the glossary every time.

Here is a MWE as per answer from earlier post.

\documentclass{book}% I am trying it for book
\newglossaryentry{c}{name={\ensuremath{c}},description={speed of light}}
      \item \glossentryname{##1} \glossentrydesc{##1}%

\chapter{Sample Chapter}
\gls{E} = \gls{m}\cdot \gls{c}^2
\chapter{Another Chapter}
\gls{E} = \frac{\gls{m}\gls{v}^2}{2}
  • have you used makeindex or makeglossaries during the compile? for glossaries your make routine should be: pdflatex -> makeglossaries -> 2x pdflatex -> <pdfviewer> – naphaneal Aug 11 '18 at 12:44
  • @naphaneal 2 , I am using WinEdt editor and it auto compile in this mode pdflatex > Bibtex > Makeindex > MakeGlossary > pdflatex > pdfviewer. The output glossary is not printed instead where I have use d`\gls{E} its simply print E and not the glossary. – Deb bijan Aug 11 '18 at 15:05
  • you don't need makeindex in the compile run. just use makeglossaries. I ran your code with the routine in my last comment. it worked fine. – naphaneal Aug 11 '18 at 15:18
  • I am receiving these warning pdfTeX warning (dest): name{glo:m} has been referenced but does not exist, replaced by a fixed one Further on simply running of MakeGlossary gives following messages Command Line: makeindex.exe -s "mainbook.ist" -t "mainbook.glg" -o "mainbook.gls" "mainbook.glo" Index style file mainbook.ist not found. Usage: makeindex [-ilqrcgLT] [-s sty] [-o ind] [-t log] [-p num] [idx0 idx1 ...] – Deb bijan Aug 11 '18 at 15:55
  • what basic latex system are you using? (I tried your code with TL 2018, TeXstudio 2.12.10 and it worked smoothly.) Maybe there's something wrong with your version of WinEdt, but I'm the wrong person to ask. Do try if you can run the compile commands from the command line interface for Windows. – naphaneal Aug 11 '18 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.