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.
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