I needed to customize the settings from LaTeX tools, so that the glossaries package works.
Now everything works fine. But I also want to have the temporary files in one folder and the produced PDF at the .tex file.
The first thing works fine: Everything is in the build folder. But I can't get the PDF File out of this folder because my quotes will be deleted in the script commands.
Here are my script commands for building:
"script_commands": [
"latexmk -cd -e -f -pdf -synctex=1 -interaction=nonstopmode -auxdir=build -outdir=build",
"makeglossaries -d build",
"latexmk -cd -e -f -pdf -synctex=1 -interaction=nonstopmode -auxdir=build -outdir=build",
"move /y \"build/$file_base_name.pdf\" \"$file_base_name.pdf\"",
"move /y \"build/$file_base_name.synctex.gz\" \"$file_base_name.synctex.gz\"",
// "move /y \"build/$file_base_name.log\" \"$file_base_name.log\""
]
The first three commands works fine. The PDF gets correctly build. But the move command does not work.
I've also tried to use the full path but the problem was that I can't do a \
sign so that the call looked like move /y C:\path\to\the\texdocument/build/Document.pdf
which also not worked.
I've also tried to use the '
signs. And copy as a replacement for move. But doesn't help.
Can someone help me?
P.S.: I'm using Windows.
// Edit: I've also a question regarding the Logoutput: Is it possible to show Errors and Warning via LaTeX Tools? Like the built in builders?
This is now the script-building system.
Thanks
Your script does not work, because LaTeXTools sets shell
to False
when calling the build command. Hence you can only call programs and not shell commands like move
. If you have Cygwin or Coreutils installed they ship the mv
program, which is the unix move command. It is installed as a program rather than a command and can be used in the builder.
Just change your build to:
"script_commands": [
"latexmk -cd -e -f -pdf -synctex=1 -interaction=nonstopmode -auxdir=build -outdir=build",
"makeglossaries -d build",
"latexmk -cd -e -f -pdf -synctex=1 -interaction=nonstopmode -auxdir=build -outdir=build",
"mv -f \"build\\$file_base_name.pdf\" \"$file_base_name.pdf\"",
"mv -f \"build\\$file_base_name.synctex.gz\" \"$file_base_name.synctex.gz\"",
"mv -f \"build\\$file_base_name.log\" \"$file_base_name.log\""
]
To answer your additional question: If you have the log file available it will automatically parse and show errors and warnings.