Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tput error message occurs when compiling with shell-escape #143

Closed
FloMiLe opened this issue May 16, 2018 · 7 comments
Closed

tput error message occurs when compiling with shell-escape #143

FloMiLe opened this issue May 16, 2018 · 7 comments

Comments

@FloMiLe
Copy link

FloMiLe commented May 16, 2018

tput error message occurs when compiling with shell-escape. I need this in order to take full advantage of the standalone package.

Environment

  • TeXstudio: 2.12.8
  • Qt: 5.10.0
  • OS: macOS 10.13.4
  • TeX distribution: texlive

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:

tput: No value for $TERM and no -T specified

How to reproduce

Add -shell-escape to the LuaLaTeX compile command:

/Library/TeX/texbin/lualatex -synctex=1 -interaction=nonstopmode -shell-escape %.tex

Compile a file.

@FloMiLe
Copy link
Author

FloMiLe commented May 16, 2018

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

@timhoffm
Copy link
Member

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

@j-rahman
Copy link

j-rahman commented Sep 8, 2021

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?

@muzimuzhi
Copy link
Contributor

muzimuzhi commented Sep 8, 2021

@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.

@j-rahman
Copy link

j-rahman commented Sep 9, 2021

@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.

@muzimuzhi
Copy link
Contributor

muzimuzhi commented Apr 5, 2023

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"
  • ✅ Quotations are not a problem.
  • ❌ Wrapping in sh -c "..." doesn't work (% !TeX program = sh -c "lualatex -shell-escape %.tex").

@evangelosR
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants