I have reinstalled TeXstudio and can't seem to find the setting anymore.

I'd like my own commands–which I defined in the preamble–to be recognized by TeXstudio and not highlighted as syntax errors. The thing is, sometimes it already lists the custom commands as possibilities in the auto-completion popup. I think the setting must be hidden somewhere... unless I am mistaken?


I assume, that your preamble is in a separate file. TXS interprets newcommand definitions and adds these to the list of known commands. Of course, this can only work, if TXS has parsed that part of code.

Therefore, you either need to have the preample file open or activate the option "Editor -> Automatically load included files". Alternatively, you could declare the command via a cwl file and statically enable it in the options.

See also FAQ: How does TXS know about valid commands.

  • "I assume, that your preamble is in a separate file." I could have added that to the op. You assumed right! Thank you, Tim. – henry Jun 24 '15 at 9:30

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.