{"action":"created","issue":{"url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/3202","repository_url":"https://api.github.com/repos/sphinx-doc/sphinx","labels_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/3202/labels{/name}","comments_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/3202/comments","events_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/3202/events","html_url":"https://github.com/sphinx-doc/sphinx/issues/3202","id":193826038,"number":3202,"title":"Broken latex image scale in Sphinx 1.5.0","user":{"login":"davidh-ssec","id":1828519,"avatar_url":"https://avatars.githubusercontent.com/u/1828519?v=3","gravatar_id":"","url":"https://api.github.com/users/davidh-ssec","html_url":"https://github.com/davidh-ssec","followers_url":"https://api.github.com/users/davidh-ssec/followers","following_url":"https://api.github.com/users/davidh-ssec/following{/other_user}","gists_url":"https://api.github.com/users/davidh-ssec/gists{/gist_id}","starred_url":"https://api.github.com/users/davidh-ssec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidh-ssec/subscriptions","organizations_url":"https://api.github.com/users/davidh-ssec/orgs","repos_url":"https://api.github.com/users/davidh-ssec/repos","events_url":"https://api.github.com/users/davidh-ssec/events{/privacy}","received_events_url":"https://api.github.com/users/davidh-ssec/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-06T16:55:33Z","updated_at":"2016-12-06T17:59:50Z","closed_at":null,"body":"I was trying to help a coworker build our documentation PDF and when testing a fresh build environment found that image scaling no longer works. I'm using conda with python 2.7 and installed sphinx via pip and I'm using my mac. In a subpage of my documentation I have:\r\n\r\n    .. image:: my_image.jpg\r\n        :scale: 50%\r\n        :align: center\r\n        :alt: my_image.jpg\r\n\r\nWhen running `make latexpdf` I see messages like this in the output where the image filename is referenced and the images are not resized (they may be resized to textwidth):\r\n\r\n    Overfull \\vbox (166.22621pt too high) has occurred while \\output is active\r\n\r\nIf I then run `pip install sphinx==1.4.5`, `make clean`, and `make latexpdf` I don't see the above message and the images are scaled properly. No other dependencies were changed between these two runs. The difference in latex seems to be:\r\n\r\n    # version 1.4.5\r\n    < \\noindent{\\hspace*{\\fill}\\scalebox{0.500000}{\\sphinxincludegraphics{{my_image}.jpg}}\\hspace*{\\fill}}\r\n    ---\r\n    # version 1.5\r\n    > \\noindent{\\hspace*{\\fill}\\sphinxincludegraphics[scale=0.5]{{my_image}.jpg}\\hspace*{\\fill}}\r\n"},"comment":{"url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/comments/265223129","html_url":"https://github.com/sphinx-doc/sphinx/issues/3202#issuecomment-265223129","issue_url":"https://api.github.com/repos/sphinx-doc/sphinx/issues/3202","id":265223129,"user":{"login":"jfbu","id":2589111,"avatar_url":"https://avatars.githubusercontent.com/u/2589111?v=3","gravatar_id":"","url":"https://api.github.com/users/jfbu","html_url":"https://github.com/jfbu","followers_url":"https://api.github.com/users/jfbu/followers","following_url":"https://api.github.com/users/jfbu/following{/other_user}","gists_url":"https://api.github.com/users/jfbu/gists{/gist_id}","starred_url":"https://api.github.com/users/jfbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfbu/subscriptions","organizations_url":"https://api.github.com/users/jfbu/orgs","repos_url":"https://api.github.com/users/jfbu/repos","events_url":"https://api.github.com/users/jfbu/events{/privacy}","received_events_url":"https://api.github.com/users/jfbu/received_events","type":"User","site_admin":false},"created_at":"2016-12-06T17:59:50Z","updated_at":"2016-12-06T17:59:50Z","body":"Thanks for report. I can reproduce, but actually with both of 1.4.5 and 1.5.\r\n\r\nIn my testing it is with 1.4.5 that one gets `\\scalebox{0.500000}{...}` and with 1.5 that one gets `[scale=0.5]` syntax. But the problem is not related with this, it happens with pure pristine LaTeX `\\includegraphics` with no options.\r\n\r\nThe following post seems relevant http://smallideasforabigworld.blogspot.fr/2013/08/latex-jpg-dimension-too-large.html, my test case also failed due to a jpg having a setting of 1 pixel per inch ! (I obtained the jpg from old 6.8.3 version of ImageMagick convert utility applied to a png inside Sphinx own doc, and Preview.app on the Mac tells me it has this 1dpi setting. If I use the png original image directly, rather than the jpg image, I experience no issue with Sphinx be it 1.4.5 or 1.5)\r\n\r\nCan you open jpg in some image editor and check its dpi setting ? But maybe your issue is something else as you don't experience it on 1.4.5."}}
{"actor":{"display_login":"jfbu"}}