3

I have a class file hmcpset.cls which defines some macros and environments.

If I have it in the same directory as a TeX file, which uses \documentclass{hmcpset}, I would like AUCTeX to parse the class file, so it can complete the macros and environments defined in it.

I know AUCTeX can do this, because, with (setq TeX-auto-save t) opening hmcpset.cls and saving it causes the file to be parsed and from then on, I can complete things defined in it, even in the TeX file.

  • Open the class file and force parsing with C-c C-n, then do the same in your document file. – giordano Oct 8 '17 at 23:52
  • I would like to make this automatic. – PythonNut Oct 9 '17 at 1:34
  • It is if you set TeX-auto-save to t. You just have to edit the file to trigger parsing – giordano Oct 9 '17 at 4:27
  • I mean, I would like this to happen even if I don't edit the class file and only edit the TeX file. – PythonNut Oct 9 '17 at 16:57
  • You have at least to visit the file somehow in order for the parsing to happen. – giordano Oct 9 '17 at 17:13

Your Answer

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

Browse other questions tagged or ask your own question.