1: #line 30 "lout_weaver.ipk" 2: from interscript.weavers.base import weaver_base 3: import string 4: 5: from interscript.drivers.sinks.bufdisk import named_file_sink 6: def mk_lout(pass_frame,basename, directory, prefix, eol, title, language): 7: if language: filename = directory + language + '_' + basename + '.lout' 8: else: filename = directory + basename + '.lout' 9: w = named_file_sink(pass_frame,filename, prefix) 10: if not title: title = basename 11: return lout_weaver(pass_frame,w, Title=title,language=language, 12: documentclass="report", 13: Include = 'tab', 14: InitialFont = "Times Base 10p", 15: InitialSpace = "tex", 16: CoverSheet = 'No', 17: PageHeaders = "Titles" 18: ) 19: 20: class lout_weaver(weaver_base): 21: def __init__(self, pass_frame, writer, language='', **kwds): 22: weaver_base.__init__(self, pass_frame, language) 23: self.sink = writer 24: if 'weavers' in self.process.trace: 25: print 'initialising Lout weaver, writer',writer.get_sink_name() 26: self.protocol = 'Lout' 27: self.persistent_frame['protocol']=self.protocol 28: self.tags = ['lout'] 29: self.enabled = 1 30: self.acount = 1 31: self.tag_stack = [] 32: self.comments = 0 33: self.master = pass_frame.master 34: self.list = [] 35: self.heading_level_offset = 0 36: self.currentLevel = 0 37: self.name = 'Lout weaver v1 for '+self.sink.name 38: self.persistent_frame['name']=self.name 39: self.verbatim = 0 40: self.documentClass = None 41: self.translating = 1 42: self.withinCode = None 43: self.prolog(kwds)