-
Notifications
You must be signed in to change notification settings - Fork 388
Autocomplete keyvalues from external glossaries file broken #4370
Description
I did a search yesterday to see if there was a similar issue already, but haven’t been able to find something. If there is, my apologies, and please point me to the solution.
Environment
- TeXstudio: 4.9.2
- Qt: 6.10.1
- OS: Windows 11
- TeX distribution: TeX Live 2026
Expected behavior
When loading an external glossary file from a different directory via \loadglsentries{path/to/file}, Texstudio will offer the defined keyvalues as a list to autocomplete when typing a glossaries command such as \gls{entry} or \ac{differententry}.
Actual behavior
I have two versions of Texstudio on my computer, 9.2.1 as a proper install and 4.8.8 as a portable installation with Qt 6.9.1. The glossary file I load is in a directory above my project, since I use the same glossary for several projects at the same time, so the structure looks something like this:
parent-directory/glossary/glossary-file.tex
parent-directory/project-directory/project-root-document.tex
parent-directory/project-directory/project-included-file.tex
Most of the time, I use glossary entries in the included file(s), but there are also some uses in the root document.
glossaries.cwl and glossaries-extra.cwl are both enabled. project-root-document.tex is explicitly declared as the root document in Texstudio.
With the portable 4.8.8 install, everything works fine. Once I start typing a glossaries command, \ac{} or \gls{}, I get the autocompletion list. In 4.9.2, I get \gls{gls-label} instead, and there is no list of glossary entries/acronyms to autocomplete from.
Consulting the documentation, specifically https://texstudio-org.github.io/background.html#loaded-documents, I tried to disable, when it didn’t work, re-enable loading included files, caching documents, as well as adding % !TeX root = root-filename to the included files, as well as closing and starting up both Texstudio and the computer after each change.
I also tried disabling and re-enabling glossaries.cwl and glossaries-extra.cwl. Nothing works.
I also checked on my work computer, where MiKTeX 24 and Texstudio 4.8.7 are installed (I know they are out of date. IT updates both when they feel like it, which is usually every 2-3 years or so).
Note: When compiling project-root-document, all of the glossary terms appear in the output as intended, regardless of whether the Texstudio version is 4.9.2, 4.8.8 or 4.8.7. It’s not an issue of the glossary-file not being found by Tex Live. There are no compilation errors whatsoever.
How to reproduce
I’m not sure how to reproduce this issue, since it works fine both with 4.8.8 as a portable install on the same computer, using the same Texlive distribution, and on a different computer with an even older version of Texstudio and MiKTeX. I vaguely remember having this issue with 4.9 already, but I equally vaguely recall that I could fix it by redeclaring the project-root-document as root and opening glossary-file in alongside the root document. Neither of these solutions work with 4.9.2.
Considering everything works as expected with 4.8.8, I don’t think it’s an issue with the TeX Live install, but I can’t be 100% certain of course. If you need more information, please tell me what.