Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeX scanner does not recognize glossary entries file #4506

Open
mwichmann opened this issue Mar 26, 2024 · 0 comments
Open

TeX scanner does not recognize glossary entries file #4506

mwichmann opened this issue Mar 26, 2024 · 0 comments
Labels
LaTex LaTex related issues. scanner variantdir

Comments

@mwichmann
Copy link
Collaborator

mwichmann commented Mar 26, 2024

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.

@mwichmann mwichmann added LaTex LaTex related issues. variantdir labels Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LaTex LaTex related issues. scanner variantdir
Projects
None yet
Development

No branches or pull requests

1 participant