1 from twisted.lore import latex
2 from twisted.lore.latex import processFile
5 # 2. Create a new mixin that does what the old MyLatexSpitter used to do:
6 # process the new classes we defined
8 def visitNode_span_productname(self, node):
9 self.writer('\\underline{')
10 self.visitNodeDefault(node)
13 def visitNode_span_marketinglie(self, node):
14 self.writer('\\begin{bf}\\begin{Large}')
15 self.visitNodeDefault(node)
16 self.writer('\\end{Large}\\end{bf}')
18 # 3. inherit from the mixin class for each of the three sub-spitters
19 class MyLatexSpitter(MySpitterMixin, latex.LatexSpitter):
22 class MySectionLatexSpitter(MySpitterMixin, latex.SectionLatexSpitter):
25 class MyChapterLatexSpitter(MySpitterMixin, latex.ChapterLatexSpitter):