feynml.head.Head

class feynml.head.Head(metas: List[feynml.meta.Meta] = <factory>, links: List[feynml.link.Link] = <factory>, title: Optional[str] = None, style: cssutils.css.cssstylesheet.CSSStyleSheet = <factory>)[source]

Bases: SheetHandler

__init__(metas: ~typing.List[~feynml.meta.Meta] = <factory>, links: ~typing.List[~feynml.link.Link] = <factory>, title: str | None = None, style: ~cssutils.css.cssstylesheet.CSSStyleSheet = <factory>) None

Methods

__init__([metas, links, title, style])

add_rule(rule)

Add a rule to the style.

add_rules(rules)

Add rules to the style.

get_link_dict([cached, cache])

Return a dictionary of resolved links.

get_meta_dict()

Return a dictionary of meta tags.

get_sheet()

Return the sheet.

get_sheets()

Return the sheet.

get_style(obj[, xml])

Get the style of an object.

get_style_property(obj, property_name[, xml])

Get a style property of an object.

with_rule(rule)

Replace rules of the style.

with_rules(rules)

Replace rules of the style.

with_sheet(sheet)

Return the object with the sheet.

Attributes

cached_links

default_sheet

root

title

metas

links

style

add_rule(rule: str)

Add a rule to the style.

add_rules(rules: str)

Add rules to the style.

Return a dictionary of resolved links.

If cached is True, then the cached resolved links are returned.

get_meta_dict()[source]

Return a dictionary of meta tags.

get_sheet()[source]

Return the sheet.

get_sheets()[source]

Return the sheet.

get_style(obj, xml: XML | None = None) CSSStyleDeclaration

Get the style of an object.

This is prefered over accessing the style attribute directly, since it includes class and pdgid definitions.

get_style_property(obj, property_name, xml: XML | None = None) str

Get a style property of an object.

with_rule(rule: str)

Replace rules of the style.

with_rules(rules: str)

Replace rules of the style.

with_sheet(sheet)[source]

Return the object with the sheet.