code: def sectionOutZip(self,zipcontainer,zipdir='',figtype='png'):
          
          from io import StringIO, BytesIO
          text = self.p if not self.settings['doubleslashnewline'] else self.p.replace('//','\n')
          zipcontainer.writestr(
              zipdir+'section.txt',
              '# {}\n{}'.format(self.title,text).encode()
          )
          c = count(1)
          for ftitle,f in self.figs.items():
              figfile = zipdir+'fig{}_{}.{}'.format(next(c),ftitle.replace(' ','_'),figtype)
              b = BytesIO()
              f.savefig(b,format=figtype,transparent=True)
              b.seek(0)
              zipcontainer.writestr(figfile,b.getvalue())
          c = count(1)
          for ttitle,t in self.tabs.items():
              b = StringIO()
              t.to_csv(b,sep=csvsep,decimal=csvdec)
              b.seek(0)
              zipcontainer.writestr(
                  zipdir+'table{}_{}.csv'.format(next(c),ttitle.replace(' ','_')),
                  b.read().encode()
              )
          c = count(1)
          for s in self.subs:
              s.sectionOutZip(zipcontainer,'{}s{}_{}/'.format(zipdir,next(c),s.title.replace(' ','_')),figtype=figtype)
docs: Prepares section for zip output