On Sun, Jul 11, 2021 at 2:28 PM Ikumi Keita <ik...@ikumi.que.jp> wrote: > > Hi Hongyi, > > > Hongyi Zhao wrote (Sun, Jul 11, 2021 at 01:50:41PM +0800): > >> But, how to let auctex do this trivial job for me automatically? > > I recommend you to consult the relevant manual: > https://www.gnu.org/software/auctex/manual/auctex/Multifile.html > > ,---- > | If you insert > | the following in your init file ('init.el' or '.emacs'), AUCTeX will use > | a more advanced algorithm. > | > | (setq-default TeX-master nil) ; Query for master file. > | > | In this case, AUCTeX will ask for the name of the master file > | associated with the buffer. To avoid asking you again, AUCTeX will > | automatically insert the name of the master file as a file variable > `----
I've already set this: $ grep TeX-master .emacs.d/init.el (setq-default TeX-master nil) ; Query for master file. > ,---- > | -- Command: TeX-master-file-ask > | ('C-c _') Query for the name of a master file and add the > | respective File Variables (*note (emacs)File Variables::) to the > | file for setting this variable permanently. > | > | AUCTeX will not ask for a master file when it encounters existing > | files. This function shall give you the possibility to insert the > | variable manually. > `---- > I didn't understand the above command well until I read this email. > N.B. The web manual falls behind the recent revise of the document and > contains obsolete sentence "If AUCTeX finds the line indicating the end > of the header in a master file (TeX-header-end), it can figure out for > itself that this is a master file.", which isn't true. > I've read the above descriptions in the web manual and hence think all things will be done intelligently. > >>>>> Mandar Mitra <mandar.mi...@gmail.com> writes: > > When I open a new .tex file, I'm prompted for the master file. If I provide > > a > > file name, it's automatically quoted. > > More precisely, that occurs when TeX-master is customized to nil, as > described above. > > > I don't remember giving auctex any special instructions to achieve > > this. > > That's TeX-master-file-ask, bound to C-c _ and available in menu item > LaTeX->Multifile/Parsing ->Set Master File also. > > Regards, > Ikumi Keita Regards -- Assoc. Prof. Hongyi Zhao <hongyi.z...@gmail.com> Theory and Simulation of Materials Hebei Vocational University of Technology and Engineering No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province