Question
How is possible to automatically create a glossary with name, definition and each page in which the current word is present in a set of tex files (more than one), without explicit references such as \gls{myword}...?
Situation
I have one (two) dictionary with the entry and the definition, that I'm able to export in any convenient format.
I have a bunch of LaTeX files (around 50 between beamer presentations and articles) in which some of those words are present, without any referring system as
\gls{myword}...
They logically belong to different group types, for simplicity let's say T, as Text, and B as beamer presentation.
They all have a common macro header that I can modify to include package or macros in all the files at the same time.I have no resources to manually edit all the files adding reference as
\gls{myword}, and it is too risky to blindly do it withsed.
I need
- I need a glossary with name, definition and document name (or symbol T1: p.2,4-7,12; T3:p.4,8; B12:p1) + page where it is possible to find it.
What I've done
I made a bash script to strip the tex source files comments, used
grepto find in which file each word is present. With some more gym I can keep count of the\sectionor\begin{frame}current numbers and start to build the index.
It remains open the problem in beamer to correct count the current slide whenallowframebreaksbreaks a slide...I checked some introduction book on glossaries
Of course I search for a solution in not less than 20-25 Q&A on this site before posting this question (but they all rely on the
\gls{myword}mechanism).
Conclusion
I've the feeling I'm trying to reinvent the wheel.
Is there a LaTeX way/tool to do it without citing from inside the text?
(It's even simple :-)?)
glossaries(\gls) then there's no point using that package for indexing. It seems more as though you want a concordance like How to generate an automatic index (concordance) in a large file?. – Nicola Talbot Apr 16 '18 at 11:00