[Tex/LaTex] TeXstudio: \ref and \eqref auto-completion

auto-completion

I've read quite a few questions and answers on this web site but none helps me to resolve my problem. I am using \ref and \eqref commands most often. After installing and re-installing the latest version of TeXstudio (2.10.0, 5.5.0), in some files the command \ref offers a list of available labels, but in some it gives an empty list although the file itself contains plenty of labels. At the same time, \eqref does not work at all. I would be grateful if somebody could help! Thanks!

Best Answer

When \ref offers the list of labels but \eqref does not, add \eqref{key}#r to your .cwl file. Then save it, close TeXstudio and again open TeXstudio.

I found it here and it solved the problem for me. Unfortunately, I don't have a link to an explanation of key and #r or of .cwl's in general.

Related Question