3

I am using texstudio TeXstudio 2.12.22 (git 2.12.22) Using Qt Version 5.12.1, compiled with Qt 5.12.1 R and using glossaries library. When I use \gls autocomplete works and offers the glossary entries inside brackets. However when I use \glsentrytext it is neither completed nor entries are suggested. Although autocomplete does not work, the \glsentrytext command works well.

See the texstudio configuration below

[screenshot of the configuration[1]

What could be the reason? How can I fix it?

1 Answer 1

2

The \gls command is defined in glossaries.cwl in line 371 as

\gls{label}#r

where the #r classification enables the completion behavior you are looking for, while \glsentrytext is defined in line 156 as

\glsentrytext{arg1}#S

without that classification and with #S even explicitly disabling auto-completion.

If you want the same behavior for both commands, you have to create your own cwl where you overwrite that definition by writing the line

\glsentrytext{label%ref}#r

After restarting TeXstudio, the completion should work the way you want it to:

enter image description here

See also my answer here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .