TeX scanner does not recognize glossary entries file
Opened this issue · 0 comments
It's known that it's hard for the TEX scanner to recognize all files that are included and put them into the dependency graph (see #1730 for a mention of the general problem). However, "missing" include files cause problems any time there's a variant directory involved. A specific case is a file of glossary entries.
If you like, you can put all your definitions in another file (for example, defns.tex) and load that file in the preamble using \loadglsentries with the filename as the argument. For example:
\loadglsentries{defns}
We can see this problem if we take an existing (working) test - test/TEX/newglossary.py
- unpack it (a cheap way is PRESERVE=1 ./runtest.py test/TEX/newglossary.py
and go to the preserve directory).
The test program creates two source files, newglossary.tex
and symbols.tex
, and the former includes the latter as part of this sequence:
\newacronym{gnu}{GNU}{GNU's Not UNIX}
\makeglossaries
\glstoctrue
%\loadglsentries[\acronymtype]{chapters/acronyms}
\loadglsentries[symbol]{symbols}
%\loadglsentries[definition]{defns}
This build works fine as written, because the included file is in the same directory we're running the build in, but if you add a variant_dir to the mix, the TEX processor will fail with an error missing symbols.tex
. Which is because SCons never discovered this file and added to its dependency tree (and so, in the variant_dir case, never copied/linked it from the source dir):
$ scons -Qn --tree=prune
cd . && latex -interaction=nonstopmode -recorder newglossary.tex ...
+-.
+-SConstruct
+-newglossary.acn
| +-newglossary.pdf
| +-newglossary.tex
+-newglossary.acr
| +-[newglossary.pdf]
+-newglossary.alg
| +-[newglossary.pdf]
+-newglossary.aux
| +-[newglossary.pdf]
+-newglossary.defi
| +-[newglossary.pdf]
+-newglossary.deflog
| +-[newglossary.pdf]
+-newglossary.defo
| +-[newglossary.pdf]
+-newglossary.fls
| +-[newglossary.pdf]
+-newglossary.glg
| +-[newglossary.pdf]
+-newglossary.glo
| +-[newglossary.pdf]
+-newglossary.gls
| +-[newglossary.pdf]
+-newglossary.log
| +-[newglossary.pdf]
+-[newglossary.pdf]
+-newglossary.symi
| +-[newglossary.pdf]
+-newglossary.symlog
| +-[newglossary.pdf]
+-newglossary.symo
| +-[newglossary.pdf]
+-newglossary.synctex.gz
| +-[newglossary.pdf]
+-newglossary.tex
No sign of symbols.tex
.