## LaTeX forum ⇒ MakeIndex, Nomenclature, Glossaries and Acronyms ⇒ How to Create a Glossary with a separate List of Acronyms

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
marek_step
Posts: 23
Joined: Sun Aug 19, 2012 8:48 am

### How to Create a Glossary with a separate List of Acronyms

Hello all!

Since two weeks I am trying to separate the Acronym list of my Glossary with no avail. Here a minimal example with the name of "acron_test.tex":

\documentclass{article} \usepackage[nomain,xindy,acronym]{glossaries}\makeglossaries \include{glossary_acron_test}  \begin{document} \title{How to Create a Glossary with a separate List of Acronyms}\date{}\maketitle \section{Chapter with Glossary} \Gls{earthenware} was burned in \glspl{kiln}.  \section{Chapter with Acronyms} Shang period (ca. $16^{th}$ - $11^{th}$ century \gls{bce}) ...  The mantou \gls{kiln} (or round kiln), a type traditional in north China, is named for its shape, like a steamed bun. The earliest examples, derived from the primitive cave \glspl{kiln}, were built in the early Shang period (ca. $16^{th}$ - $11^{th}$ century \gls{bce}). It developed into a semi-down-draft kiln in the Tang dynasty (618 - 907 \gls{ace}), and matured in the Song dynasty ( 960 - 1127 \gls{ce}).  %Print the glossary%\printacronyms % not working\printglossary[type=\acronymtype]%\printnoidxglossary[type=\acronymtype] Some text between the list of acronyms and the glossary. %\printglossaries%\printglossary\printglossary[title=Multilingual Glossary,toctitle=Multilingual Glossary] \end{document}

The definition file with acronyms and definitions looks like (name: "glossary_acron_test.tex"):

%Term definitions\newglossaryentry{kiln}{   name=kiln,   description={German: Brennofen (m.);\\Français: fourneau (m.)},   plural=kilns} \newglossaryentry{earthenware}{   name=earthenware,   description={German: Steingut (n.);\\Français: fa\"{\i}ence (f.)},   plural=earthenwares} %Acronym definitions:\newacronym[description={Or if you want before Jesus Christ''}]{bce}{BCE}{Before Common Era} \newacronym[description={Or if you want after Jesus Christ''}]{ce}{CE}{Common Era} \newacronym[description={Or if you want after Jesus Christ'', which is exactly the same as CE''}]{ace}{ACE}{After Common Era}

I am running in the shell the following commands over it:

pdflatex acron_testmakeglossaries acron_testpdflatex acron_test

The result you will see probably too is the same: two times all definitions together - Acronyms with Glossary entries - under the title "Acronyms" and "Multilingual Glossary".

I would be very grateful for a hint.

marek

Tags:

Johannes_B
Site Moderator
Posts: 3515
Joined: Thu Nov 01, 2012 4:08 pm
The first thing i saw was the use of include which you are not supposed to use. But i think the main reason is the use of nomain. Leave it out and everything works just fine.

Btw: In the example below i splitted the definitions to two files.

I also defined a command for yu to typeset those centuries. It might save you some work. Please compare the output.

Hint: You can click on »Open in Writelatex« ↓ to see the output.

EDIT: It just came to my mind that the macro does not work with 1st, 2nd and 3rd.

EDIT: No problem using the right package
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

marek_step
Posts: 23
Joined: Sun Aug 19, 2012 8:48 am
Thank you so much Johannes_B! This was a great help. Although I was confused of the package


you loaded in your example. Funny, we we need labyrinths for this example - I was thinking ... And your
\begin{filecontents}{\jobname Gls.tex}

was a big surprise. What we can do with LaTeX is amazing But for me, with at least 50 definitions in my glossary, this is too much for the main .tex document. So after some trial and error I finished with this solution - hope this will help some people out there, because I lost nearly two weeks to find it (this is file "acron_test.tex":

\documentclass{article} \usepackage[xindy,acronym]{glossaries}\makeglossaries\loadglsentries[main]{glossary_acron_test.tex} \begin{document} \title{How to Create a Glossary with a separate List of Acronyms}\date{}\maketitle \section{Chapter with Glossary} \Gls{earthenware} was burned in \glspl{kiln}.  \section{Chapter with Acronyms} Shang period (ca. $16^{th}$ - $11^{th}$ century \gls{bce}) ...  The mantou \gls{kiln} (or round kiln), a type traditional in north China, is named for its shape, like a steamed bun. The earliest examples, derived from the primitive cave \glspl{kiln}, were built in the early Shang period (ca. $16^{th}$ - $11^{th}$ century \gls{bce}). It developed into a semi-down-draft kiln in the Tang dynasty (618 - 907 \gls{ace}), and matured in the Song dynasty ( 960 - 1127 \gls{ce}).  And here we introduce a second ACE: we write the year 2014 \gls{ace} now! \printglossary[type=\acronymtype] \printglossary[title=Multilingual Glossary,toctitle=Multilingual Glossary] \end{document}

And the file "glossary_acron_test.tex" looks like:

%Term definitions\newglossaryentry{kiln}{   name=kiln,   description={German: Brennofen (m.);\\Français: fourneau (m.)},   plural=kilns} \newglossaryentry{earthenware}{   name=earthenware,   description={German: Steingut (n.);\\Français: fa\"{\i}ence (f.)},   plural=earthenwares} %Acronym definitions:\newacronym[description={Or if you want before Jesus Christ''}]{bce}{BCE}{Before Common Era} \newacronym[description={Or if you want after Jesus Christ''}]{ce}{CE}{Common Era} \newacronym[description={Or if you want after Jesus Christ'', which is exactly the same as CE''}]{ace}{ACE}{After Common Era}

Run in your shell:

pdflatex acron_testmakeglossaries acron_testpdflatex acron_test

And that is it! Hurray!

Johannes_B
Site Moderator
Posts: 3515
Joined: Thu Nov 01, 2012 4:08 pm
Hi Marek, the filecontents environment is just for convenience. A tester has to copy just a single file, LaTeX later extracts them. Have a look in your test folder with my MWE.

BTW: The documentation database is a bit confused (as i was myself). Package nth has nothing to do with labyrinths. I had a look at the package file (nth.sty) and saw the option there.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

marek_step
Posts: 23
Joined: Sun Aug 19, 2012 8:48 am
Thank you again! I understood later, that

texdoc nth

was finding the wrong package. Labyrinth is finishing just with nth ... (But is an interesting package too - so many things to discover!)

Meanwhile I changed all my centuries in my thesis. Very cute

Best greetings from Munich

marek

Johannes_B
Site Moderator
Posts: 3515
Joined: Thu Nov 01, 2012 4:08 pm
Hi Marek, if you are interested in german support, you should take a look at TeXWelt.de. The format produces precise questions and precise anwsers. You don't have to read long forum threads fully find the solution to a problem.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Return to “MakeIndex, Nomenclature, Glossaries and Acronyms”

### Who is online

Users browsing this forum: No registered users and 2 guests