AUCTeX fails to put auxilary files in a certain directory
I'm using Emacs + Auctex to edit and compile file .tex with xelatex at present. I want put those auxiliary files(created during compile) in another directory, e.g. /tmp. So I have the following code in my init.el. But it does not work - auxilary files still are in root directory. What's wrong with my code and anyone can help me with this?
(add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex%(mode)%' %t" TeX-run-TeX nil t))
(setq TeX-command-default "XeLaTeX -aux-directory=./tmp")
emacs auctex
add a comment |
I'm using Emacs + Auctex to edit and compile file .tex with xelatex at present. I want put those auxiliary files(created during compile) in another directory, e.g. /tmp. So I have the following code in my init.el. But it does not work - auxilary files still are in root directory. What's wrong with my code and anyone can help me with this?
(add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex%(mode)%' %t" TeX-run-TeX nil t))
(setq TeX-command-default "XeLaTeX -aux-directory=./tmp")
emacs auctex
add a comment |
I'm using Emacs + Auctex to edit and compile file .tex with xelatex at present. I want put those auxiliary files(created during compile) in another directory, e.g. /tmp. So I have the following code in my init.el. But it does not work - auxilary files still are in root directory. What's wrong with my code and anyone can help me with this?
(add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex%(mode)%' %t" TeX-run-TeX nil t))
(setq TeX-command-default "XeLaTeX -aux-directory=./tmp")
emacs auctex
I'm using Emacs + Auctex to edit and compile file .tex with xelatex at present. I want put those auxiliary files(created during compile) in another directory, e.g. /tmp. So I have the following code in my init.el. But it does not work - auxilary files still are in root directory. What's wrong with my code and anyone can help me with this?
(add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex%(mode)%' %t" TeX-run-TeX nil t))
(setq TeX-command-default "XeLaTeX -aux-directory=./tmp")
emacs auctex
emacs auctex
edited 1 hour ago
lyl
asked 1 hour ago
lyllyl
66238
66238
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
To add XeLaTeX explicitly in the TeX-command-list might get things to work (I haven't tried), but it is certainly not very "AUCTeXy", so to speak.
AUCTeX tries to guess the correct engine to be used (say, if you load fontspec it will ask you about it), and lets you set it for the current file easily, with local variables.
As to your use of TeX-command-default, as far as I understand, that is not what is expected there.
I suggest you make use of local variables to set this, instead of fiddling with your init file. And let AUCTeX do the hard work, as it does well.
You can add local variables to your file with M-x add-file-local-variable. You can add two: TeX-engine and TeX-command-extra-options. (You will be asked if these options should be run when you open the file, you may choose to save the option). You should end with something like the following at the bottom of your file:
% Local Variables:
% TeX-engine: xetex
% TeX-command-extra-options: "-aux-directory=./tmp"
% End:
(assuming "-aux-directory=./tmp" works. I can't test it here, I believe this is a MikTeX only option. It does work though with "-output-directory=./tmp".)
With that in place, build your document LaTeX (and whatever else is needed).
Thank you for your helpful proposal!! And if I want the name of directory which is used to store those auxilary files is the same as the name of master tex file, not just ./tmp, what shall I do?
– lyl
29 mins ago
Well, per default, the aux files and output files will end up in the same directory as your .tex file. So, if you want that, simply do not use the option-aux-directory.
– gusbrs
24 mins ago
Oh, I guess now I understand. Just put the name of the directory there, instead oftmp.
– gusbrs
21 mins ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478329%2fauctex-fails-to-put-auxilary-files-in-a-certain-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
To add XeLaTeX explicitly in the TeX-command-list might get things to work (I haven't tried), but it is certainly not very "AUCTeXy", so to speak.
AUCTeX tries to guess the correct engine to be used (say, if you load fontspec it will ask you about it), and lets you set it for the current file easily, with local variables.
As to your use of TeX-command-default, as far as I understand, that is not what is expected there.
I suggest you make use of local variables to set this, instead of fiddling with your init file. And let AUCTeX do the hard work, as it does well.
You can add local variables to your file with M-x add-file-local-variable. You can add two: TeX-engine and TeX-command-extra-options. (You will be asked if these options should be run when you open the file, you may choose to save the option). You should end with something like the following at the bottom of your file:
% Local Variables:
% TeX-engine: xetex
% TeX-command-extra-options: "-aux-directory=./tmp"
% End:
(assuming "-aux-directory=./tmp" works. I can't test it here, I believe this is a MikTeX only option. It does work though with "-output-directory=./tmp".)
With that in place, build your document LaTeX (and whatever else is needed).
Thank you for your helpful proposal!! And if I want the name of directory which is used to store those auxilary files is the same as the name of master tex file, not just ./tmp, what shall I do?
– lyl
29 mins ago
Well, per default, the aux files and output files will end up in the same directory as your .tex file. So, if you want that, simply do not use the option-aux-directory.
– gusbrs
24 mins ago
Oh, I guess now I understand. Just put the name of the directory there, instead oftmp.
– gusbrs
21 mins ago
add a comment |
To add XeLaTeX explicitly in the TeX-command-list might get things to work (I haven't tried), but it is certainly not very "AUCTeXy", so to speak.
AUCTeX tries to guess the correct engine to be used (say, if you load fontspec it will ask you about it), and lets you set it for the current file easily, with local variables.
As to your use of TeX-command-default, as far as I understand, that is not what is expected there.
I suggest you make use of local variables to set this, instead of fiddling with your init file. And let AUCTeX do the hard work, as it does well.
You can add local variables to your file with M-x add-file-local-variable. You can add two: TeX-engine and TeX-command-extra-options. (You will be asked if these options should be run when you open the file, you may choose to save the option). You should end with something like the following at the bottom of your file:
% Local Variables:
% TeX-engine: xetex
% TeX-command-extra-options: "-aux-directory=./tmp"
% End:
(assuming "-aux-directory=./tmp" works. I can't test it here, I believe this is a MikTeX only option. It does work though with "-output-directory=./tmp".)
With that in place, build your document LaTeX (and whatever else is needed).
Thank you for your helpful proposal!! And if I want the name of directory which is used to store those auxilary files is the same as the name of master tex file, not just ./tmp, what shall I do?
– lyl
29 mins ago
Well, per default, the aux files and output files will end up in the same directory as your .tex file. So, if you want that, simply do not use the option-aux-directory.
– gusbrs
24 mins ago
Oh, I guess now I understand. Just put the name of the directory there, instead oftmp.
– gusbrs
21 mins ago
add a comment |
To add XeLaTeX explicitly in the TeX-command-list might get things to work (I haven't tried), but it is certainly not very "AUCTeXy", so to speak.
AUCTeX tries to guess the correct engine to be used (say, if you load fontspec it will ask you about it), and lets you set it for the current file easily, with local variables.
As to your use of TeX-command-default, as far as I understand, that is not what is expected there.
I suggest you make use of local variables to set this, instead of fiddling with your init file. And let AUCTeX do the hard work, as it does well.
You can add local variables to your file with M-x add-file-local-variable. You can add two: TeX-engine and TeX-command-extra-options. (You will be asked if these options should be run when you open the file, you may choose to save the option). You should end with something like the following at the bottom of your file:
% Local Variables:
% TeX-engine: xetex
% TeX-command-extra-options: "-aux-directory=./tmp"
% End:
(assuming "-aux-directory=./tmp" works. I can't test it here, I believe this is a MikTeX only option. It does work though with "-output-directory=./tmp".)
With that in place, build your document LaTeX (and whatever else is needed).
To add XeLaTeX explicitly in the TeX-command-list might get things to work (I haven't tried), but it is certainly not very "AUCTeXy", so to speak.
AUCTeX tries to guess the correct engine to be used (say, if you load fontspec it will ask you about it), and lets you set it for the current file easily, with local variables.
As to your use of TeX-command-default, as far as I understand, that is not what is expected there.
I suggest you make use of local variables to set this, instead of fiddling with your init file. And let AUCTeX do the hard work, as it does well.
You can add local variables to your file with M-x add-file-local-variable. You can add two: TeX-engine and TeX-command-extra-options. (You will be asked if these options should be run when you open the file, you may choose to save the option). You should end with something like the following at the bottom of your file:
% Local Variables:
% TeX-engine: xetex
% TeX-command-extra-options: "-aux-directory=./tmp"
% End:
(assuming "-aux-directory=./tmp" works. I can't test it here, I believe this is a MikTeX only option. It does work though with "-output-directory=./tmp".)
With that in place, build your document LaTeX (and whatever else is needed).
edited 33 mins ago
answered 39 mins ago
gusbrsgusbrs
8,0142841
8,0142841
Thank you for your helpful proposal!! And if I want the name of directory which is used to store those auxilary files is the same as the name of master tex file, not just ./tmp, what shall I do?
– lyl
29 mins ago
Well, per default, the aux files and output files will end up in the same directory as your .tex file. So, if you want that, simply do not use the option-aux-directory.
– gusbrs
24 mins ago
Oh, I guess now I understand. Just put the name of the directory there, instead oftmp.
– gusbrs
21 mins ago
add a comment |
Thank you for your helpful proposal!! And if I want the name of directory which is used to store those auxilary files is the same as the name of master tex file, not just ./tmp, what shall I do?
– lyl
29 mins ago
Well, per default, the aux files and output files will end up in the same directory as your .tex file. So, if you want that, simply do not use the option-aux-directory.
– gusbrs
24 mins ago
Oh, I guess now I understand. Just put the name of the directory there, instead oftmp.
– gusbrs
21 mins ago
Thank you for your helpful proposal!! And if I want the name of directory which is used to store those auxilary files is the same as the name of master tex file, not just ./tmp, what shall I do?
– lyl
29 mins ago
Thank you for your helpful proposal!! And if I want the name of directory which is used to store those auxilary files is the same as the name of master tex file, not just ./tmp, what shall I do?
– lyl
29 mins ago
Well, per default, the aux files and output files will end up in the same directory as your .tex file. So, if you want that, simply do not use the option
-aux-directory.– gusbrs
24 mins ago
Well, per default, the aux files and output files will end up in the same directory as your .tex file. So, if you want that, simply do not use the option
-aux-directory.– gusbrs
24 mins ago
Oh, I guess now I understand. Just put the name of the directory there, instead of
tmp.– gusbrs
21 mins ago
Oh, I guess now I understand. Just put the name of the directory there, instead of
tmp.– gusbrs
21 mins ago
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f478329%2fauctex-fails-to-put-auxilary-files-in-a-certain-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown