Closed FloMiLe closed 6 years ago
I just checked: Using pdfLaTeX with the command below does not cause this error message.
"/Library/TeX/texbin/pdflatex" -synctex=1 -interaction=nonstopmode -shell-escape %.tex
The commands in TeXstudio are executed directly and not within a shell. Probably this will be the cause of the error, though I don't know how tput
is involved here.
You may wrap the command in a shell. See the user manual
Why is this issue closed? This bug still exists. I am using TeXStudio 3.1.2 on macOS 11.5.2. I have the following command saved.
sh -c "export TERM=xterm-256color && mkdir -p .temp & lualatex -shell-escape -synctex=1 -interaction=nonstopmode -output-directory=.temp %.tex && cp .temp/%.pdf %.pdf"
Once compiled, I get the same error message as the OP (only for LuaLaTex, not pdfLaTeX).
tput: No value for $TERM and no -T specified
How do we fix this?
@j-rahman Hi, I am using texstudio 4.0.0beta2 with basictex distribution on macOS 11.5.2, and I see no errors executing
# either
/Library/TeX/texbin/lualatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex
# or just
lualatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex
Btw, since texstudio replaces %
with a quoted filename without extension, sh -c "lualatex %.tex"
will expand to sh -c "lualatex "main".tex"
, which seems to be wrongly quoted.
Update: Using '?m)'.tex
/ '?m)'.pdf
instead of %.tex
/ %.pdf
works. I tried to get \"main\".tex
but \\"?m)\\".tex
expands to triple quotes \"""main""".tex
.
@muzimuzhi The quotations are not a problem. I have exactly the same command set up with pdflatex
as well, which throws no complaints. lualatex
finishes the compilation and produces a pdf stating that the Process exited normally
, but in addition to that, it also yells out tput: No value for $TERM and no -T specified
which behaviour is absent with pdflatex
.
Perhaps you should try to replicate this using TeXStudio 3.1.2 instead of the beta. Also, I have the MacTeX-2021
distribution installed, if that matters.
Update from 2023. With texstudio v4.5.2beta4 installed on macOS 12.6.3, I have to explicitly set TERM
.
% !TeX program = sh -c "export TERM=xterm-256color && lualatex -shell-escape %.tex"
sh -c "..."
doesn't work (% !TeX program = sh -c "lualatex -shell-escape %.tex"
).In Linux, changing
Exec=texstudio %F
to Exec=env TERM=screen-256color texstudio %F
in /usr/share/applications/texstudio.desktop sets $TERM and then compiling with LuaLaTeX and -shell-escape does not return an error (I had this when trying to convert eps files using epstopdf
tput
error message occurs when compiling withshell-escape
. I need this in order to take full advantage of thestandalone
package.Environment
Expected behavior
Upon compiling with LuaLaTeX and
-shell-escape
in the compile command, no error should be thrown.Actual behavior
the following error is thrown, even though everything seems to work normally:
How to reproduce
Add
-shell-escape
to the LuaLaTeX compile command:Compile a file.