0

Is it possible to point AUCTeX to extra *.sty files I load from an inner folder? Currently, I don't have access to environments defined e.g. in amsmath.

I realise the problem is AUCTeX does not seem to parse custom files in folders. I created sub-folders to keep my project clean. Currently, this is the structure:

root\
    setupfiles\
        packages.sty
        settings.sty
        definitions.sty
    main.tex
    % other tex files

All custom packages (my files) either load common packages such as amsmath or define some extra macros. LaTeX finds everything but AUCTeX does not seem to see the files.

I understand I would solve the problem by moving everything back to the root folder. However, I wonder if there is something I could let AUCTeX know about the files.

Thanks.

1 Answer 1

1

You could add the folder setupfiles to the list pointed to by TeX-macro-private whose documentation reads:

Directories where you store your personal TeX macros.

Equally, AUXTeX should pick this up from the TEXINPUTS environment variable if you have set that.

3
  • Thanks. I chased the case and it turns out I also use a common sty file: smallreport.sty, which is located in ~/texmf/tex/latex/local/smallreport.sty. It is where amsmath is loaded. I have \usepackage{smallreport} in master file but for some reason AUCTeX has not parsed this file by default. I had to run TeX-auto-generate, which created smallreport.el in the <root>/auto/. It is working now. However, I wonder if AUCTeX could do that automatically every time I run a new project that loads smallreport.sty.
    – Celdor
    Mar 22, 2023 at 18:14
  • Put smallreport.el in the folder pointed to by TeX-style-private and then it will be loaded whenever your TeX file loads smallreport.sty. Mar 22, 2023 at 18:23
  • I must be doing something wrong because the last recommendation did not work. Thanks for suggestion :)
    – Celdor
    Mar 22, 2023 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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