{"action":"opened","issue":{"url":"https://api.github.com/repos/openbabel/openbabel/issues/129","labels_url":"https://api.github.com/repos/openbabel/openbabel/issues/129/labels{/name}","comments_url":"https://api.github.com/repos/openbabel/openbabel/issues/129/comments","events_url":"https://api.github.com/repos/openbabel/openbabel/issues/129/events","html_url":"https://github.com/openbabel/openbabel/issues/129","id":60136896,"number":129,"title":"Nested SVG format causes IPython render issues","user":{"login":"patrickfuller","id":1449833,"avatar_url":"https://avatars.githubusercontent.com/u/1449833?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickfuller","html_url":"https://github.com/patrickfuller","followers_url":"https://api.github.com/users/patrickfuller/followers","following_url":"https://api.github.com/users/patrickfuller/following{/other_user}","gists_url":"https://api.github.com/users/patrickfuller/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickfuller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickfuller/subscriptions","organizations_url":"https://api.github.com/users/patrickfuller/orgs","repos_url":"https://api.github.com/users/patrickfuller/repos","events_url":"https://api.github.com/users/patrickfuller/events{/privacy}","received_events_url":"https://api.github.com/users/patrickfuller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-06T18:05:26Z","updated_at":"2015-03-06T18:05:26Z","closed_at":null,"body":"**The bug**\r\n\r\n![svg](https://cloud.githubusercontent.com/assets/1449833/6530662/5b89de9e-c3f8-11e4-96ae-3653fd0bab56.png)\r\n\r\n**Why it's happening**\r\n\r\n```python\r\nmol.write(\"svg\")\r\n```\r\n\r\nProduces\r\n\r\n```svg\r\n<?xml version=\"1.0\"?>\r\n<svg version=\"1.1\" id=\"topsvg\"\r\nxmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\r\nxmlns:cml=\"http://www.xml-cml.org/schema\" x=\"0\" y=\"0\" width=\"200px\" height=\"200px\" viewBox=\"0 0 100 100\">\r\n<title>Multiple Molecules - Open Babel Depiction</title>\r\n<rect x=\"0\" y=\"0\" width=\"100\" height=\"100\" fill=\"white\"/>\r\n<text text-anchor=\"middle\" font-size=\"6\" fill =\"black\" font-family=\"sans-serif\"\r\nx=\"50\" y=\"98\" ></text>\r\n<g transform=\"translate(0,0)\">\r\n<svg width=\"100\" height=\"100\" x=\"0\" y=\"0\" viewBox=\"0 0 149.282 160\"\r\nfont-family=\"sans-serif\" stroke=\"rgb(0,0,0)\" stroke-width=\"2\"  stroke-linecap=\"round\">\r\n<line x1=\"40.0\" y1=\"60.0\" x2=\"74.6\" y2=\"40.0\" stroke=\"rgb(0,0,0)\"  stroke-width=\"2.0\"/>\r\n<line x1=\"48.8\" y1=\"63.2\" x2=\"73.0\" y2=\"49.2\" stroke=\"rgb(0,0,0)\"  stroke-width=\"2.0\"/>\r\n<line x1=\"74.6\" y1=\"40.0\" x2=\"109.3\" y2=\"60.0\" stroke=\"rgb(0,0,0)\"  stroke-width=\"2.0\"/>\r\n<line x1=\"109.3\" y1=\"60.0\" x2=\"109.3\" y2=\"100.0\" stroke=\"rgb(0,0,0)\"  stroke-width=\"2.0\"/>\r\n<line x1=\"102.1\" y1=\"66.0\" x2=\"102.1\" y2=\"94.0\" stroke=\"rgb(0,0,0)\"  stroke-width=\"2.0\"/>\r\n<line x1=\"109.3\" y1=\"100.0\" x2=\"74.6\" y2=\"120.0\" stroke=\"rgb(0,0,0)\"  stroke-width=\"2.0\"/>\r\n<line x1=\"74.6\" y1=\"120.0\" x2=\"40.0\" y2=\"100.0\" stroke=\"rgb(0,0,0)\"  stroke-width=\"2.0\"/>\r\n<line x1=\"73.0\" y1=\"110.8\" x2=\"48.8\" y2=\"96.8\" stroke=\"rgb(0,0,0)\"  stroke-width=\"2.0\"/>\r\n<line x1=\"40.0\" y1=\"100.0\" x2=\"40.0\" y2=\"60.0\" stroke=\"rgb(0,0,0)\"  stroke-width=\"2.0\"/>\r\n</svg>\r\n</g>\r\n</svg>\r\n```\r\n\r\nThose nested SVGs are split apart in rendering.\r\n\r\n![screenshot from 2015-03-06 12 03 25](https://cloud.githubusercontent.com/assets/1449833/6530708/cc74256a-c3f8-11e4-9734-3a91bd02ee04.png)\r\n\r\nTo fix, look at [svgformat.cpp](https://github.com/openbabel/openbabel/blob/master/src/formats/svgformat.cpp)."}}