Document ClassesNomenclatuer by Chapter

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
User avatar
renno
Posts: 54
Joined: Thu Jun 07, 2007 7:16 pm

Nomenclatuer by Chapter

Post by renno »

Good day everybody,

How could I separate my nomenclature into sub-groups by chapter, and then have a sub-sub-group for the superscripts, subscripts, variables, symbols, etc...?

I found the following code for separating the nomenclature into subscripts, etc...

Code: Select all

\@ifundefined{nomgroup}{}
{	\setlength{\nomitemsep}{-\parsep}
 	\renewcommand{\nomgroup}[1]
  {%
  	\medskip%
   	\ifthenelse{\equal{#1}{A}}{\relax}%
			{\ifthenelse{\equal{#1}{G}}{\item []\hspace*{-\leftmargin}\emph{Symbols}\hfill\smallskip}%
      	{\ifthenelse{\equal{#1}{B}}{\item []\hspace*{-\leftmargin}\emph{Subscripts}\hfill\smallskip}%
        	{\ifthenelse{\equal{#1}{C}}{\item []\hspace*{-\leftmargin}\emph{Conventions}\hfill\smallskip}%
          	{\ifthenelse{\equal{#1}{T}}{\item []\hspace*{-\leftmargin}\emph{Superscripts}\hfill\smallskip}{}%
						}%
					}%
				}%
			}%
	}% \nomgroup
}% @ifundefined
It seams that doing it by chapter through nesting is the hard way, and there must be an easier method...

Your help would be appreciated...

Thanks,

Jamil Renno
Virginia Tech
If there is no way, we will make one...
Hanibal

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Nomenclatuer by Chapter

Post by gmedina »

Hi,

have you tried using the glossaries package?
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
renno
Posts: 54
Joined: Thu Jun 07, 2007 7:16 pm

Re: Nomenclatuer by Chapter

Post by renno »

Hey gmedina,

Thanks for the reply. The package seems amazing, very flexible with lots of options. For getting multiple nomenclature lists, one should define a glossary type for every chapter, and then use it when defining the term. The package lacks a MWE with it to show how it could be compiled especially that a Perl file by the package author has to be compiled to produce the desired results...

Thanks,
If there is no way, we will make one...
Hanibal
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Re: Nomenclatuer by Chapter

Post by Stefan Kottwitz »

Hi,

you don't need to run the perl script, you could call makeindex directly, the perl script just gives some comfort.

Stefan
LaTeX.org admin
User avatar
renno
Posts: 54
Joined: Thu Jun 07, 2007 7:16 pm

Re: Nomenclatuer by Chapter

Post by renno »

I am sorry, but this does not seem to work. I am using MikTeX 2.7 and TexnicCenter. I run LaTeX, MakeIndex, then LaTeX, but I cannot obtain the list of nomenclature. Please see the MWE...

Thanks,
Attachments
Sample1.tex
(355 Bytes) Downloaded 388 times
If there is no way, we will make one...
Hanibal
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Nomenclatuer by Chapter

Post by Stefan Kottwitz »

You did not use that glossar entry inside the text and you did not give it a name. I would do this inside the preamble, you may use \glsaddall:

Code: Select all

\newglossaryentry{$a$}{name=a,description={nice variable}}%
\glsaddall
Stefan
LaTeX.org admin
User avatar
renno
Posts: 54
Joined: Thu Jun 07, 2007 7:16 pm

Re: Nomenclatuer by Chapter

Post by renno »

Hey Stefan,

My original purpose was to generate a list of nomenclature for variables and symbols I use in my equations. That's why I was originally using the nomencl package. The problem there was that I could not have subgroups for each chapter inside my nomenclature list, and that's the aim of my first post. I am afraid the glossaries package cannot handle mathematicall text...

Any suggestions?

Thanks,
If there is no way, we will make one...
Hanibal
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

Nomenclatuer by Chapter

Post by Stefan Kottwitz »

renno wrote:I am afraid the glossaries package cannot handle mathematicall text.
I don't think so. Try:

Code: Select all

\newglossaryentry{pi}{name=$\pi$,description={mathematical constant}}
Stefan
LaTeX.org admin
Post Reply