6.14.7.11. Tables

Start python section to interscript/weavers/latex.py[12 /19 ] Next Prev First Last
   304: #line 327 "latex_weaver.ipk"
   305:   def begin_table(self, *headings, **kwds):
   306:     self._writeline('\\begin{table}[h]\\begin{tabular}{|'+'l|'*len(headings)+'}\hline')
   307:     self.write(headings[0])
   308:     for h in headings[1:]:
   309:       self._write('&')
   310:       self.write(h)
   311:     self._writeline(r'\\\hline')
   312: 
   313:   def table_row(self,data):
   314:     self.write(data[0])
   315:     for d in data[1:]:
   316:       self._write('&')
   317:       self.write(d)
   318:     self._writeline(r'\\')
   319: 
   320:   def table_rule(self):
   321:     self._writeline(r'\hline')
   322: 
   323:   def end_table(self):
   324:     self._writeline('\\hline\\end{tabular}\\end{table}')
   325: 
End python section to interscript/weavers/latex.py[12]