6.14.2. Raw weaver

The raw weaver outputs text exactly as it is input, special characters included. It cannot do any formatting.

Use of raw weavers is vital for output of typesetter specialised constructions. For example, If you are generating output for both HTML and Latex, and you have a complex table to print, you can set the weaver to a raw weaver attached to the same sink file as the HTML weaver and write HTML directly, then you can do the same for Latex. In that way, you get tables optimised for the various typesetting systems.

Start python section to interscript/weavers/raw.py[1 /1 ]
     1: #line 65 "weavers.ipk"
     2: from interscript.weavers.base import weaver_base
     3: class raw_weaver(weaver_base):
     4:   def __init__(self, pass_frame, writer ,**kwds):
     5:     weaver_base.__init__(self, pass_frame)
     6:     if 'weavers' in self.process.trace:
     7:       print 'initialising raw weaver, writer',writer.get_sink_name()
     8:     self.protocol = 'raw'
     9:     self.persistent_frame['protocol']=self.raw
    10:     self.tags = ['raw']
    11:     self.sink = writer
    12:     self.name = 'raw weaver v1 for '+self.sink.name
    13:     self.persistent_frame['name']=self.name
    14: 
End python section to interscript/weavers/raw.py[1]