{"action":"created","issue":{"url":"https://api.github.com/repos/gjtorikian/mathematical/issues/51","labels_url":"https://api.github.com/repos/gjtorikian/mathematical/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/gjtorikian/mathematical/issues/51/comments","events_url":"https://api.github.com/repos/gjtorikian/mathematical/issues/51/events","html_url":"https://github.com/gjtorikian/mathematical/issues/51","id":99805355,"number":51,"title":"Rendering issues","user":{"login":"AndorChen","id":436680,"avatar_url":"https://avatars.githubusercontent.com/u/436680?v=3","gravatar_id":"","url":"https://api.github.com/users/AndorChen","html_url":"https://github.com/AndorChen","followers_url":"https://api.github.com/users/AndorChen/followers","following_url":"https://api.github.com/users/AndorChen/following{/other_user}","gists_url":"https://api.github.com/users/AndorChen/gists{/gist_id}","starred_url":"https://api.github.com/users/AndorChen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndorChen/subscriptions","organizations_url":"https://api.github.com/users/AndorChen/orgs","repos_url":"https://api.github.com/users/AndorChen/repos","events_url":"https://api.github.com/users/AndorChen/events{/privacy}","received_events_url":"https://api.github.com/users/AndorChen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-08-08T14:18:50Z","updated_at":"2015-09-22T07:28:34Z","closed_at":null,"body":"Some issues came up when rendering. First, in svg mode, the output data has no content:\r\n\r\n```irb\r\n>> render = Mathematical.new\r\n=> #<Mathematical:0x007f94fb9719d0 @config={:ppi=>72.0, :zoom=>1.0, :base64=>false, :maxsize=>0, :format=>:svg, :delimiter=>3, :formatInt=>0}, @processer=#<Mathematical::Process:0x007f94fb971278 @ppi=72.0, @zoom=1.0, @maxsize=0, @format=0, @delimiter=3, @png=nil, @svg=nil>>\r\n>> render.render '$a \\ne b$'\r\n=> {:data=>\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" width=\\\"27.688152pt\\\" height=\\\"8.361328pt\\\" viewBox=\\\"0 0 27.688152 8.361328\\\" version=\\\"1.1\\\">\\n</svg>\\n\", :width=>27, :height=>8}\r\n```\r\n\r\nThere's just a newline within `svg` tag.\r\n\r\nSecond, in png mode, \"Failed to read PNG contents\" error:\r\n\r\n```irb\r\n>> render =  Mathematical.new format: :png\r\n=> #<Mathematical:0x007f94fb9616c0 @config={:ppi=>72.0, :zoom=>1.0, :base64=>false, :maxsize=>0, :format=>:png, :delimiter=>3, :formatInt=>1}, @processer=#<Mathematical::Process:0x007f94fb95b6d0 @ppi=72.0, @zoom=1.0, @maxsize=0, @format=1, @delimiter=3, @png=nil, @svg=nil>>\r\n>> render.render '$a \\ne b$'\r\nFailed to read PNG contents=> {:data=>\"$a \\\\ne b$\", :exception=>#<Mathematical::DocumentReadError: Failed to read PNG contents>}\r\n```\r\n\r\nI tried and installed XQuartz, but the issues still.\r\n\r\nAnd also installed Cairo@1.12.16 , but got this error:\r\n\r\n```\r\nIncompatible library version: libpangocairo-1.0.0.dylib requires version 11403.0.0 or later, but libcairo.2.dylib provides version 11203.0.0\r\n```\r\n\r\nIt just seems like there are some libs missed."},"comment":{"url":"https://api.github.com/repos/gjtorikian/mathematical/issues/comments/142201740","html_url":"https://github.com/gjtorikian/mathematical/issues/51#issuecomment-142201740","issue_url":"https://api.github.com/repos/gjtorikian/mathematical/issues/51","id":142201740,"user":{"login":"gjtorikian","id":64050,"avatar_url":"https://avatars.githubusercontent.com/u/64050?v=3","gravatar_id":"","url":"https://api.github.com/users/gjtorikian","html_url":"https://github.com/gjtorikian","followers_url":"https://api.github.com/users/gjtorikian/followers","following_url":"https://api.github.com/users/gjtorikian/following{/other_user}","gists_url":"https://api.github.com/users/gjtorikian/gists{/gist_id}","starred_url":"https://api.github.com/users/gjtorikian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjtorikian/subscriptions","organizations_url":"https://api.github.com/users/gjtorikian/orgs","repos_url":"https://api.github.com/users/gjtorikian/repos","events_url":"https://api.github.com/users/gjtorikian/events{/privacy}","received_events_url":"https://api.github.com/users/gjtorikian/received_events","type":"User","site_admin":true},"created_at":"2015-09-22T07:28:34Z","updated_at":"2015-09-22T07:28:34Z","body":"Cool, I can reproduce your problem. Try `brew link gettext --force`, and then the same gem install. If you don't like it, you can `brew unlink gettext` once it's done.\r\n\r\nI'm trying to now figure out why `libintl` is a dependency, though it may always have been."}}