6.4.7.10. Headings

6.4.7.10. Headings

Start python section to interscript/weavers/latex.py[11]
   258: #line 280 "latex_weaver.ipk"
   259:   def head(self,level, text, atext='', anchor=''):
   260:     cmds = {
   261:       1:'\\part',
   262:       2:'\\chapter',
   263:       3:'\\section',
   264:       4:'\\subsection',
   265:       5:'\\subsubsection',
   266:       6:'\\paragraph',
   267:       7:'\\subparagraph'}
   268:     lev = level+self.heading_level_offset
   269:     if lev>7:lev=7
   270:     cmd = cmds[lev]
   271:     if anchor == '': anchor = atext
   272:     if anchor == '':
   273:       anchor = 'h'+str(self.acount)
   274:       self.acount = self.acount + 1
   275: 
   276:     if atext:
   277:       self._writeline(cmd+'['+atext+']{'+text+'}\\label{'+anchor+'}')
   278:     else:
   279:       self._writeline(cmd+'{'+text+'}\\label{'+anchor+'}')
   280: 
End python section to interscript/weavers/latex.py[11]