I'm using TeXstudio and a package I've written, which includes a command called \co. I've told TeXstudio to use the corresponding .cwl file and it recognizes \co as a command.

Here is the problem: When I type \co{, it gets completed to \contentsline{. How do I change this behavior?

In case somebody is wondering: I use \co very often, so it deserves such a simple name.


Just write a file %APPDATA%\texstudio\myPackage.cwl which contains the only line


and safe that as utf8.

When I insert \usepackage{myPackage} to my preamble, it works as expected.

If your package is on CTAN, you might want to send your complete myPackage.cwlto the TXS team. To do so, just create an entry in the feature request tracker and attach the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.