1#!/usr/bin/env python 2 3from plasTeX import Command, IgnoreCommand 4from plasTeX.Base.LaTeX.Verbatim import verbatim 5from plasTeX.DOM import Text 6 7class htmladdnormallink(Command): 8 args = 'self url' 9 10class htmladdimg(Command): 11 args = 'url' 12 13class rawhtml(verbatim): 14 captionable = True 15 blockType = False 16 def digest(self, tokens): 17 verbatim.digest(self, tokens) 18 self.str = Text(''.join(self)) 19 self.str.isMarkup = True 20 return [] 21 22class latexonly(IgnoreCommand): 23 args = 'latex:nox' 24 25class htmlonly(Command): 26 args = 'self' 27 28class latexhtml(Command): 29 args = 'latex:nox self' 30 31class hyperref(Command): 32 args = 'self latexpre:nox latexpost:nox label:idref' 33 34class htmlref(Command): 35 args = 'self label:idref' 36 37class externallabels(IgnoreCommand): 38 args = 'url labels' 39 40class externalref(IgnoreCommand): 41 args = 'label' 42 43class segment(IgnoreCommand): 44 args = 'file type self' 45 46class internal(IgnoreCommand): 47 args = '[ type ] prefix' 48 49class startdocument(IgnoreCommand): 50 pass 51 52class htmlhead(IgnoreCommand): 53 args = 'type self' 54 55class htmladdtonavigation(IgnoreCommand): 56 args = 'self'