6.14.7.9. Body Output and Mode Control

Start python section to interscript/weavers/latex.py[10 /19 ] Next Prev First Last
   215: #line 236 "latex_weaver.ipk"
   216:   def _writeline(self,line=''):
   217:     if self.enabled:
   218:       self.sink.writeline(line)
   219:       self.start_of_line = 1
   220: 
   221:   def _write(self,line):
   222:     if self.enabled:
   223:       self.sink.write(line)
   224:       self.start_of_line = 0
   225: 
   226:   def write(self,line):
   227:     if self.translating and not self.verbatim:
   228:       self._write(cvt_text(line))
   229:     else:
   230:       self._write(line)
   231: 
   232:   def writeline(self,line=''):
   233:     line = string.rstrip(line)
   234:     self.write(line);
   235:     if not self.start_of_line: self._writeline()
   236: 
   237:   def writecode(self,line):
   238:     self._writeline('\\hbox to 0pt{'+cvt_code(line)+'\\hss}\\\\')
   239: 
   240:   def begin_displayed_text(self):
   241:     self._write('\\begin{quote}\n')
   242: 
   243:   def end_displayed_text(self):
   244:     self._write('\\end{quote}\n')
   245: 
   246: 
   247:   def begin_displayed_code(self):
   248:     self._writeline('\\begin{verbatim}')
   249:     self.verbatim = 1
   250: 
   251:   def end_displayed_code(self):
   252:     self._writeline('\\end{verbatim}')
   253:     self.verbatim = 0
   254: 
   255:   def line_break(self):
   256:     self._writeline('\\newline')
   257: 
   258:   def page_break(self):
   259:     self._writeline('\\newpage')
   260: 
   261:   def write_tagged(self,tag, data):
   262:     self._write('{\\'+tag)
   263:     self._write(data)
   264:     self._write('}')
   265: 
   266: 
   267:   def code_head(self,tangler, secno):
   268:     if tangler:
   269:       self._write( '{\\par\\noindent\\small Start section to '+\
   270:         cvt_code(tangler.sink.get_sink_name())+\
   271:         '['+str(secno)+']}\\\\')
   272: 
   273:   def code_foot(self,tangler, secno):
   274:     if tangler:
   275:       self._write( '{\\small End section to '+\
   276:         cvt_code(tangler.sink.get_sink_name())+\
   277:         '['+str(secno)+']}')
   278: 
End python section to interscript/weavers/latex.py[10]