1160: #line 1517 "input_frame.ipk"
1161: def head(self, level, text, **kwds):
1162: level = int(level)
1163: level = level + self.head_offset
1164: self.last_head = level
1165: if 'headings' in self.process.trace:
1166: print (' '*(level-1))+'"'+text+'"'
1167: self.pass_frame.toc.append((level,text, kwds))
1168: if self.current_tangler: self.code_foot()
1169: self.tangler_set(None)
1170: apply(add_translation,(text,),kwds.get('translations',{}))
1171: apply(self.current_weaver.head,(level,text),kwds)
1172:
1173:
1174:
1175:
1176:
1177:
1178: def heading(self, level, text, **kwds):
1179: "Weave a heading"
1180: level = int(level)
1181: level = level + self.head_offset
1182: self.last_head = level
1183: if 'headings' in self.process.trace:
1184: print (' '*(level-1))+'"'+text+'"'
1185: self.pass_frame.toc.append((level,text, kwds))
1186: apply(self.current_weaver.head,(level,text),kwds)
1187:
1188: def push_head(self, amt=1):
1189: "Push the heading level onto the heading level stack"
1190: self.head_offset = self.head_offset + amt
1191:
1192: def pop_head(self, amt=1):
1193: "Pop the heading level from the heading level stack"
1194: self.push_head(-amt)
1195:
1196: def set_head(self, amt=None):
1197: "Set the heading level"
1198: if amt != None:
1199: self.head_offset = amt - 1
1200: else:
1201: self.head_offset = self.last_head - 1
1202: