1: #line 8 "latex_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_latex(pass_frame,basename, directory, prefix, eol, title, language): 7: if language: filename = directory + language + '_' + basename + '.tex' 8: else: filename = directory + basename + '.tex' 9: w = named_file_sink(pass_frame,filename, prefix) 10: if not title: title = basename 11: return latex_weaver(pass_frame,w, title=title,language=language) 12: 13: def cvt_code(line): 14: v = '\\verb+' 15: for ch in line: 16: if ch != '+': v = v + ch 17: else: v = v + '+\\verb-+-\\verb+' 18: v = v + '+' 19: return v 20: 21: def cvt_text(line): 22: l = '' 23: for ch in line: 24: if ch in '$&%#_^{}\\': l = l + '\\' 25: l = l + ch 26: return l 27: 28: class latex_weaver(weaver_base):
6.14.7.1. Initialisation
6.14.7.2. Termination
6.14.7.3. Identifier Cross Reference Table
6.14.7.4. Class Reference Table
6.14.7.5. Table of Contents
6.14.7.6. Code File List
6.14.7.7. Source List
6.14.7.8. Latex Preamble
6.14.7.9. Body Output and Mode Control
6.14.7.10. Headings
6.14.7.11. Tables
6.14.7.12. Lists
6.14.7.13. Code Output
6.14.7.14. Paragraphs
6.14.7.15. Fonts
6.14.7.16. Citations