6.14.9.14.1. Heading Helper openLevels

Now we need to open levels from self.currentLevel up to and including newLevel. This means emitting the proper sequence of @Begin[Sub]*Sections commands as appropriate for the document class.

Start python section to interscript/weavers/lout.py[23 /34 ] Next Prev First Last
   309: #line 645 "lout_weaver.ipk"
   310:     def openLevels(self, newLevel):
   311:         assert newLevel > self.currentLevel, \
   312:                "Invalid call to openLevels with %d, current %d" % \
   313:                (newLevel, self.currentLevel)
   314: 
   315:         # We do nothing for level 1 unless the document class is doc.
   316: 
   317:         if newLevel == 1 and self.documentClass != 'doc':
   318:             return
   319: 
   320:         while self.currentLevel < newLevel:
   321:             lev = self.currentLevel
   322:             self._writeline("@Begin%ss" % self.sectionLevels[lev])
   323:             self.currentLevel = lev + 1
   324:         return
End python section to interscript/weavers/lout.py[23]