FeatureBox

A tag for a feature box used in some textbooks (like examples)

class disseminate.tags.featurebox.ExampleBox(name, *args, **kwargs)

Bases: disseminate.tags.featurebox.FeatureBox

A box for examples

class disseminate.tags.featurebox.FeatureBox(name, *args, **kwargs)

Bases: disseminate.tags.tag.Tag

A box with a feature for some texts, like an Example or Note box.

Attributes
activebool

This tag is active.

include_paragraphsbool

The contents of this tag cannot be included in paragraphs.

html_classesstr

Classes to append in the html tag.

html_fmt(attributes=None, **kwargs)

Convert the tag to an html string or html element.

Parameters
contentOptional[Union[str, List[Union[str, list, Tag]]]

Specify an alternative content from the tag’s content. It can either be a string, a tag or a list of strings, tags and lists.

attributesOptional[Union[str, Attributes]]

Specify an alternative attributes dict from the tag’s attributes. It can either be a string or an attributes dict.

format_funcOptional[str]

The format function to use with by formatted_content when formatting sub-tags.

methodOptional[str]

The rendering method for the string. ex: ‘html’ or ‘xml’

levelOptional[int]

The level of the tag.

Returns
htmlstr or html element

A string in HTML format or an HTML element (lxml.builder.E).

class disseminate.tags.featurebox.ProblemBox(name, *args, **kwargs)

Bases: disseminate.tags.featurebox.FeatureBox

A box for problems