pylatex.base_classes.float

This module implements the classes that deal with floating environments.

class Float(*, position=None, **kwargs)[source]

Bases: pylatex.base_classes.containers.Environment

A class that represents a floating environment.

Parameters:position (str) – Define the positioning of a floating environment, for instance 'h'. See the references for more information.

References

separate_paragraph = True[source]

By default floats are positioned inside a separate paragraph. Setting this to option to False will change that.

add_caption(caption)[source]

Add a caption to the float.

Parameters:caption (str) – The text of the caption.
omit_if_empty = False