3

Good morning. I've been searching about this topic but I cannot find a good answer to my problem. I'm writing everything with Latex lately, last but not least a sequence of notes from my French class, and I thought, it could be useful to list all the verbs and all the words that I find during my language studies.
I would love to make a Glossary of all the words, but the most common package used for this kind of topics, "glossary", forces you to list all the words in the preamble of the document, which is not an admissible way for me. I would love to have something that works like footnote, i.e. calling it in the text like

\myawesomeglossarymadebyotherscauseimanoob{new_word}{verb,noun,masculine/feminine}

that lists all the words in alphabetical order at the end of the document, printing all the details in the calling. Any ideas on how to do that?

Two things:
If you want to challenge yourself solving my problem and giving me a readymade answer, be aware that I would love to understand how it works so I can modify your answer and make it fit all my needs, and also to learn something.
If you are going to make just some suggestion on how to do that, take into consideration that I'm really a noob on latex, I've been using it for 3 years without need for digging too much into its interior, so I'm acquainted with it but still I'm far from understanding it. So balance your suggestions with basic explanation of what every package or command or symbol do.

Thanks in advance to everybody that would like to answer

  • I'm not sure you are going to get an answer, since your question doesn't fit the scheme of the site, but I like the premise. This could even require somebody to write an answer that could eventually lead to a package being written that does these things, but if you're lucky, ... well, these things have happened in the past. – thymaro Jun 12 '18 at 7:29
  • For completeness, this is the comment you should have gotten from me: Welcome to TeX.SE! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. The easier it is to copy and test your code, the more likely your question will be answered and can help others in a similar situation. – thymaro Jun 12 '18 at 7:30
  • 2
    The glossaries package encourages you to define your terms in the preamble, but it is possible to define terms in the document under certain circumstances. If you want your list at the end of the document, then you might want to look at \usepackage[docdef=restricted]{glossaries-extra}. – Nicola Talbot Jun 12 '18 at 7:53
  • @NicolaTalbot I'm looking at this option now, thanks a lot, the beginners guide does not mention it so I wasn't able to find it out before asking. – Kimala Jun 12 '18 at 8:06
  • @thymaro Sorry I thought that the MWE would be just an Hello world in latex since I did not have any specific trouble referred to a package or an action, so I did not include it. – Kimala Jun 12 '18 at 8:08
2
\documentclass{article}
\usepackage{nomencl} 
\makenomenclature
\def\nomname{Glossary}
\begin{document}
Bla bla bla wasted \nomenclature{wasted}{adjetive. Useless; of no use.}
and bla bla people\nomenclature{people}{plural noun}.
\settowidth{\nomlabelwidth}{xxxxxxxxx}
\printnomenclature
\end{document}

I hope that the MWE is self-explanatory except in that run pdflatex is not enough if you use the nomencl package.

You must run also makeindex to produce an auxiliar .nls file, for instance:

makeindex test.nlo -s nomencl.ist -o test.nls

Then you must run pdflatex again (maybe two times or even more in order to resolve all cross-references, but that is not the case in this MWE). The result should be:

mwe

  • This is exactly what I was looking for, I will go through the documentation of the nominal package as soon as possible. Thanks for your answer! – Kimala Jul 14 '18 at 20:39

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.