Discussion:
[AUCTeX] macros from master file do not work...
François Patte
2017-08-15 16:49:41 UTC
Permalink
Bonjour,

I use to prepare multifile documents adding

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "my-master-file"
%%% TeX-engine: xetex
%%% End:

at the end of each file.

Once upon a time, all macros defined in the master file used to be
accessed through keyboard shortcuts in all "slave" files: for instance,
using babel-french, I could type " and get \og{}, or using C-c-e, I
could access all newenvironment defined in the master file.

This does not work anymore...

Are there some changes about this in last AucTex version?

Thank you.
--
François Patte
UFR de mathématiques et informatique
Laboratoire CNRS MAP5, UMR 8145
Université Paris Descartes
45, rue des Saints PÚres
F-75270 Paris Cedex 06
Tél. +33 (0)1 8394 5849
http://www.math-info.univ-paris5.fr/~patte
Mosè Giordano
2017-08-15 16:55:23 UTC
Permalink
Hi François,
Post by François Patte
This does not work anymore...
Works for me.
Post by François Patte
Are there some changes about this in last AucTex version?
No.

Silly but necessary question: are you sure you spelled the name of
master file correctly? What's the value of `TeX-active-styles'
variable in the slave's buffer?

Bye,
Mosè
Mosè Giordano
2017-08-15 17:01:00 UTC
Permalink
Post by Mosè Giordano
Hi François,
Post by François Patte
This does not work anymore...
Works for me.
Post by François Patte
Are there some changes about this in last AucTex version?
No.
Silly but necessary question: are you sure you spelled the name of
master file correctly?
Yes! C-c-c compile fine.
Ok.
Post by Mosè Giordano
What's the value of `TeX-active-styles'
variable in the slave's buffer?
How can I test this?
Issue

C-h v TeX-active-styles RET

in the slave's buffer.

Bye,
Mosè

PS: please, do not reply to me alone, hit the "Reply all" button when
writing to mailing lists ;-)
François Patte
2017-08-15 17:18:33 UTC
Permalink
Post by Mosè Giordano
Hi François,
Post by François Patte
This does not work anymore...
Works for me.
Post by François Patte
Are there some changes about this in last AucTex version?
No.
Silly but necessary question: are you sure you spelled the name of
master file correctly?
Yes! C-c-c compile fine.
Ok.
What's the value of `TeX-active-styles'
variable in the slave's buffer?
How can I test this?
Issue
C-h v TeX-active-styles RET
in the slave's buffer.
TeX-active-styles is a variable defined in ‘tex.el’.
Its value is ("../gangadhara-tr-xelatex" "gmk-vargakarma-fr" "LATEX")

Local in buffer gmk-vargakarma-fr.tex; global value is nil

Automatically becomes buffer-local when set.

the master file is ../gangadhara-tr-xelatex and slave gmk-vargakarma-fr
Post by Mosè Giordano
PS: please, do not reply to me alone, hit the "Reply all" button when
writing to mailing lists ;-)
Sorry!
--
François Patte
UFR de mathématiques et informatique
Laboratoire CNRS MAP5, UMR 8145
Université Paris Descartes
45, rue des Saints PÚres
F-75270 Paris Cedex 06
Tél. +33 (0)1 8394 5849
http://www.math-info.univ-paris5.fr/~patte
Mosè Giordano
2017-08-15 17:21:03 UTC
Permalink
TeX-active-styles is a variable defined in ‘tex.el’.
Its value is ("../gangadhara-tr-xelatex" "gmk-vargakarma-fr" "LATEX")
Local in buffer gmk-vargakarma-fr.tex; global value is nil
Automatically becomes buffer-local when set.
the master file is ../gangadhara-tr-xelatex and slave gmk-vargakarma-fr
And what's the value of the same variable in master's buffer?

Bye,
Mosè
François Patte
2017-08-15 17:30:35 UTC
Permalink
Post by Mosè Giordano
Post by François Patte
TeX-active-styles is a variable defined in ‘tex.el’.
Its value is ("../gangadhara-tr-xelatex" "gmk-vargakarma-fr" "LATEX")
Local in buffer gmk-vargakarma-fr.tex; global value is nil
Automatically becomes buffer-local when set.
the master file is ../gangadhara-tr-xelatex and slave gmk-vargakarma-fr
And what's the value of the same variable in master's buffer?
Its value is
("stackengine" "nameref" "url" "hyperref" "xr-hyper" "lineno" "caption"
"float" "currfile" "xspace" "ulem" "numprint" "rotating" "multirow"
"wasysym" "tikz" "version" "comment" "amsopn" "amsbsy" "amstext"
"amsmath" "array" "longtable" "frenchb" "babel" "xparse" "expl3"
"fontspec" "geometry" "rep11" "report" "Tankach6-xelatex"
"Tankach5-2-xelatex" "Tankach5-1-xelatex" "Tankach4-xelatex" "fancyhdr"
"datetime" "trcommandes-xelatex" "latex2e" "gangadhara-tr-xelatex" "LATEX")

Local in buffer gangadhara-tr-xelatex.tex; global value is nil

Automatically becomes buffer-local when set.

Strange: it does not see babel french, but sees this file
"trcommandes-xelatex" where I have defined new macros and environments,
but I can't access them from slave...
--
François Patte
UFR de mathématiques et informatique
Laboratoire CNRS MAP5, UMR 8145
Université Paris Descartes
45, rue des Saints PÚres
F-75270 Paris Cedex 06
Tél. +33 (0)1 8394 5849
http://www.math-info.univ-paris5.fr/~patte
Mosè Giordano
2017-08-15 17:46:08 UTC
Permalink
Post by François Patte
Its value is
("stackengine" "nameref" "url" "hyperref" "xr-hyper" "lineno" "caption"
"float" "currfile" "xspace" "ulem" "numprint" "rotating" "multirow"
"wasysym" "tikz" "version" "comment" "amsopn" "amsbsy" "amstext"
"amsmath" "array" "longtable" "frenchb" "babel" "xparse" "expl3"
"fontspec" "geometry" "rep11" "report" "Tankach6-xelatex"
"Tankach5-2-xelatex" "Tankach5-1-xelatex" "Tankach4-xelatex" "fancyhdr"
"datetime" "trcommandes-xelatex" "latex2e" "gangadhara-tr-xelatex" "LATEX")
Local in buffer gangadhara-tr-xelatex.tex; global value is nil
Automatically becomes buffer-local when set.
Strange: it does not see babel french,
There is "frenchb", before "babel".
Post by François Patte
but sees this file
"trcommandes-xelatex" where I have defined new macros and environments,
but I can't access them from slave...
It's strange that the slave file can't find the information about the
master file. Is there the auxiliary file autogenerated after parsing
(should be in auto/gangadhara-tr-xelatex.el)? If not, try creating it
with C-c C-n in the master file and then issue C-c C-n also in the
slave file. Is it fixed now?

Bye,
Mosè
François Patte
2017-08-16 06:35:00 UTC
Permalink
Post by Mosè Giordano
Post by François Patte
Its value is
("stackengine" "nameref" "url" "hyperref" "xr-hyper" "lineno" "caption"
"float" "currfile" "xspace" "ulem" "numprint" "rotating" "multirow"
"wasysym" "tikz" "version" "comment" "amsopn" "amsbsy" "amstext"
"amsmath" "array" "longtable" "frenchb" "babel" "xparse" "expl3"
"fontspec" "geometry" "rep11" "report" "Tankach6-xelatex"
"Tankach5-2-xelatex" "Tankach5-1-xelatex" "Tankach4-xelatex" "fancyhdr"
"datetime" "trcommandes-xelatex" "latex2e" "gangadhara-tr-xelatex" "LATEX")
Local in buffer gangadhara-tr-xelatex.tex; global value is nil
Automatically becomes buffer-local when set.
Strange: it does not see babel french,
There is "frenchb", before "babel".
Post by François Patte
but sees this file
"trcommandes-xelatex" where I have defined new macros and environments,
but I can't access them from slave...
It's strange that the slave file can't find the information about the
master file. Is there the auxiliary file autogenerated after parsing
(should be in auto/gangadhara-tr-xelatex.el)? If not, try creating it
with C-c C-n in the master file and then issue C-c C-n also in the
slave file. Is it fixed now?
Yes it is fixed, after closing and reopening emacs.

Something that I don't understand: in the auto directory I have a
master-file.el and only some slave-file.el (not all slave files declared
in the master file) and nevertheless the macros defined in the master
can be used in the slave file even if this one does not appear in the
auto directory....

Thank you for helping.
--
François Patte
UFR de mathématiques et informatique
Laboratoire CNRS MAP5, UMR 8145
Université Paris Descartes
45, rue des Saints PÚres
F-75270 Paris Cedex 06
Tél. +33 (0)1 8394 5849
http://www.math-info.univ-paris5.fr/~patte
Loading...