On 20 Jul 2021, at 3:14, Mandar Mitra wrote:

Kourosh Kalayeh wrote (Mon, Jul 19, 2021 at 10:42:57PM -0400):
Also, does changing TeX-master in my “personal_macros.sty” only affect my ability to compile my master file in “personal_macros.sty”. What I mean is that if TeX-master in “personal_macros.sty” is set to “specific_aims.tex” and I use the same “personal_macros.sty” for “background_and_goals.tex” the only thing that I will be missing is the ability to compile “background_and_goals.tex” from “personal_macros.sty”, is that right? Basically, my main concern is to makes sure that AUCTeX knows all the packages that I have imported in personal macros whether I am in “specific_aims.tex” or “background_and_goals.tex”.

Yes, I have a similar ~/latex/macros.tex for which auctex has generated .../auto/macros.el, and things work fine. I also have the following comments at the beginning and end of my macros.tex (suggested a long time ago by some kind soul on this list, I'm sure):

---------------------------------------------------------------------------
% Following workaround required in order to get auctex to parse this file
% and update auto/macros.el properly.
\iffalse
\documentclass{article}
\begin{document}
\fi

... actual \usepackage, \newcommand, \def etc. go here ...

\iffalse
\end{document}
\fi
---------------------------------------------------------------------------

I don't know if this "workaround" is still necessary though.

-mandar

Thanks, I don't know what those comments are. But my macros are in ```.sty``` file and I use ```input``` command to input them into my main tex file. The file starts and ends as below,

Start,

```
\ProvidesPackage{personal_macros}
```

End,
```
\endinput
```

Kourosh

Reply via email to