My TEXshop gives me a error because of the known problem "can not determine size of graphic in filename.jpg" (no bounding box)

So i tried several atempts to solve it.

One was this Cannot determine size of graphic by setting the natwidth and so on.

Because nothing helped and out of curiosity i opened macOS terminal an executed this line: pdflatex "filename" and that runns through without a error.

So i tried to understand the settings in TEXshop by defining the path (pdf)Tex to what i get when searching for the path in terminal with which pdflatex as i read here: https://tex.stackexchange.com/a/237764/118709 in my case it spits out:

/Library/TeX/texbin/pdflatex in terminal.

But copy pasteing this line does not work as described in the post. When i click "setzen" in TEXshop with the dropdown set to LaTeX.

Althrough the path is the same until the part of /pdflatex so i assumed that pdflatex is the file itself and not the path. Especially because beneth of that path i have a line to set the Tex and Latex Variables and there i have this in the Latex line:

pdflatex --file-line-error --synctex=1

So i have no idea how to get the same result as if i use pdflatex in Terminal with TEXshop..

Does anybody have a clue?

And how is the line TEX+divips+distiller related to the result?


1 Answer 1


I found the solution to this problem my self. the document title:

%!TEX TS-program = LaTeX
%!TEX encoding = UTF-8 Unicode

gets read by the program! it seams like the % symbol here is not recognized as a comment. Instead it sets the environment to compile the document as you like.

%!TEX TS-program = pdfLaTeX
%!TEX encoding = UTF-8 Unicode

Helps to define the compilation as pdflatex but also prevents the settings in the tool you use. well for shure in TEXshop on mac...

Hope that helps somebody in future...

  • it is a comment to tex but it is a texshop-specific comment which your editor "TS-program" uses to have document-specific settings. Commented Dec 19, 2016 at 8:26
  • Read the Help->TeXShop Tips and Tricks document in TeXShop. Commented Dec 20, 2016 at 14:01

Not the answer you're looking for? Browse other questions tagged .