/usr/share/pyshared/plasTeX/Packages/float.py is in python-plastex 0.9.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 42 43 44 45 46 | import new
from plasTeX import Command, Environment
from plasTeX.Base.LaTeX.Floats import Float, Caption
class newfloat(Command):
args = 'name:str pos:str capfile:str [ reset:str ]'
def invoke(self, tex):
Command.invoke(self, tex)
name = str(self.attributes['name'])
# Create the float class and the caption class
floatcls = new.classobj(name, (Float,), {})
captioncls = new.classobj('caption', (Caption,),
{'macroName':'caption', 'counter':name})
floatcls.caption = captioncls
c = self.ownerDocument.context
c.addGlobal(name, floatcls)
# Create a counter
resetby = self.attributes['reset'] or 'chapter'
c.newcounter(name, resetby, 0, format='${the%s}.${%s}' % (resetby,name))
# Create the float name macro
c.newcommand(name+'name', 0, name)
class floatstyle(Command):
args = 'style:str'
class restylefloat(Command):
args = 'float:str'
class floatname(Command):
args = 'float:str name:str'
def invoke(self, tex):
Command.invoke(self, tex)
float = str(self.attributes['float'])
name = self.attributes['name']
c = self.ownerDocument.context
c.newcommand(float+'name', 0, name)
class floatplacement(Command):
args = 'float:str pos:str'
class listof(Command):
args = 'float:str title'
|