Closed BrushXue closed 2 years ago
that is why you can can manually set the path.
it is unclear in what context epstopdf is called. But that specifically is a PATH issue (which has even less to do with txs)
@BrushXue Does your problem reproduce if you manually run pdflatex or xelatex in Terminal.app?
no feedback
@BrushXue Does your problem reproduce if you manually run pdflatex or xelatex in Terminal.app?
No. In terminal or VScode everything's fine. Only texstudio can't find gs
.
@sunderme Let me clarify it again:
x86 Mac + MacTeX.pkg
(with gs
) + texstudio = no problem.
x86 Mac + brew install mactex-no-gui
+ texstudio = no problem
M1 Mac + MacTeX.pkg
(with gs
) + texstudio = no problem.
M1 Mac + brew install mactex-no-gui
+ terminal/vscode = no problem
M1 Mac + brew install mactex-no-gui
+ texstudio = can't open gs
On x86 Mac
$ which gs
/usr/local/bin/gs
On M1 Mac
$ which gs
/opt/homebrew/bin/gs
I think the problem is very clear as gs
is installed separately in another directory (and that directory changed in ARM Macs according to https://docs.brew.sh/Installation)
looks like a PATH error. see #1740
Let me try if adding /opt/homebrew/bin/
works https://github.com/texstudio-org/texstudio/blob/2589d22696f44977a4ecd475824749719d31723c/src/buildmanager.cpp#L910
I added the path and compiled again, the GUI can find gs
automatically.
However I still get the same error
epstopdf ($Id: epstopdf.pl 48681 2018-09-16 23:03:58Z karl $) 2.28 !!! Error: Cannot open Ghostscript for piped input: gs -q -dSAFER -dNOPAUSE -dBATCH -dCompatibilityLevel=1.5 -sDEVICE=pdfwrite -sOutputFile=fig/cru-eps-converted-to.pdf -dPDFSETTINGS#/prepress -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -dAutoRotatePages#/None - -c quit
With the additional $PATH, the document can be compiled. /opt/homebrew/bin/
is a kind of "standard" $PATH in ARM Macs. There should be a seamless solution for this.
The problem is that the PATH is not set correctly in .profile or whatever mac uses as source for the variable when a GUI app is started. (it is not .bashrc) If you start txs from command line, PATH is correct and everything works. txs uses currently a method which is recommended by apple to gather all the PATH information. If you find a better solution, please provide a PR/patch.
I experience a similar problem.
Texstudio dont read ether the .bashrc, .bashprofile, .zshrc or .zprofile.
Its only aware of the paths: usr/bin:/bin:/usr/sbin:/sbin Except the additional paths i add in the .ini or through preferences -> build.
This information i got by using terminal commands like "echo $PATH" under preferences ->build ->user commands. Even the additional search paths i added are not available through this texstudio invoked terminal.
I wanted edit my own type of latex sub document compile. it with a python program i start through this user command and show the generated pdf file in the texstudio internal pdf viewer. This works fine on linux, but not on my M1 mac, because of this paths issues. This Texstudio invoked terminal isn't able to find my environment variables i defined in .zprofile and .zshrc. But only the terminal. If i use my environment variable to define standard bibfile paths it works fine. (ex. \bibliography{talk.bib,$ZETTELKASTEN_STD_BIBTEX)
Because of the path issue that the path is constrained to usr/bin:/bin:/usr/sbin:/sbin, it finds an older python version. which python3 gives: /usr/bin/python3 And python3 --version: 3.9.6 My version i installed by homebrew is 3.10.8.
I tried to find out why texstudio don't loads any of my rc or profile or login files, but i got no conclusion
Thanks for any help.
Installed
mactex-no-gui
(andgs
as dependency). Texstudio failed to findgs
and can't convert .eps to .pdfEnvironment
Expected behavior
Installed same packages on my x86 Mac with no issue.
Actual behavior
I guess the problem is the different path on M1
How to reproduce