1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
"""
C.13.1 Length (p215)
"""
from plasTeX import Command, DimenCommand
class fill(DimenCommand):
value = DimenCommand.new('1fill')
class stretch(Command):
args = 'num:dimen'
class newlength(Command):
args = 'name:cs'
def invoke(self, tex):
self.ownerDocument.context.newdimen(self.parse(tex)['name'])
class setlength(Command):
args = 'name:cs len:nox'
# def invoke(self, tex):
# a = self.parse(tex)
# ownerDocument.createElement(a['name']).setlength(a['len'])
class addtolength(Command):
args = 'name:cs len:nox'
# def invoke(self, tex):
# a = self.parse(tex)
# self.ownerDocument.createElement(a['name']).addtolength(a['len'])
class settowidth(Command):
args = 'name:cs text:nox'
class settoheight(Command):
args = 'name:cs text:nox'
class settodepth(Command):
args = 'name:cs text:nox'
|