     svg.setAttributeNS SVGNS, 'height', @height = viewBox[3]
     svg.setAttributeNS SVGNS, 'preserveAspectRatio', 'xMinYMin meet'
     doc
-  renderSVG: (mappings) ->
-    out = new XMLSerializer().serializeToString @renderSVGDOM mappings
+  renderSVG: (mappings, styles) ->
+    out = new XMLSerializer().serializeToString @renderSVGDOM mappings, styles
     ## Parsing xlink:href in user's SVG fragments, and then serializing,
     ## can lead to these null namespace definitions.  Remove.
     out = out.replace /\sxmlns:xlink=""/g, ''

      new Context @drawing, i, j

extensionMap =
  '.txt': ASCIIMapping
  '.js': JSMapping
  '.jsx': JSMapping
  '.coffee': CoffeeMapping
  '.cjsx': CoffeeMapping
  '.asc': ASCIIDrawing
  '.ssv': SSVDrawing
  '.csv': CSVDrawing

      filename2.base += @constructor.filenameSeparator + drawing.subname
    filename2.base += extension
    path.format filename2
  writeSVG: (mappings, styles, filename) ->
    for drawing in @drawings
      drawing.writeSVG mappings, styles, @subfilename '.svg', drawing
  writeTeX: (filename) ->
    for drawing in @drawings
      drawing.writeTeX @subfilename '.svg_tex', drawing
