def _propagate_packages(self):
        """Make sure packages get propagated."""

        for item in self.data:
            if isinstance(item, LatexObject):
                if isinstance(item, Container):
                    item._propagate_packages()
                for p in item.packages:
                    self.packages.add(p)
def _propagate_packages ( self ) : for item in self . data : if isinstance ( item , LatexObject ) : if isinstance ( item , Container ) : item . _propagate_packages ( ) for p in item . packages : self . packages . add ( p )
Make sure packages get propagated.