pyltk/pyltk/subfloat.py

24 lines
537 B
Python

# -*- encoding: utf-8 -*-
from .element import element
class subfloat(element):
""" Class representing a latex subfloat. """
templates = {
'content': """\\subfloat[{caption}]{{
{inner}
}}"""
}
def __init__(self, caption, parent=None, childrens=None, label=None):
super().__init__(parent, childrens, label=label)
self.caption = caption
def content(self):
return self.fmt().format('content', {
'caption': self.caption,
'inner': super().content()
})