pyfeyn2¶
Subpackages¶
Submodules¶
Package Contents¶
Classes¶
A class that contains a full LaTeX document. |
|
A class that contains a full LaTeX document. |
|
A class that contains a full LaTeX document. |
|
Attributes¶
- class pyfeyn2.DotRender(fd=None, documentclass='standalone', document_options=None, *args, **kwargs)[source]¶
Bases:
pyfeyn2.render.latex.latex.LatexRenderA class that contains a full LaTeX document.
If needed, you can append stuff to the preamble or the packages. For instance, if you need to use
\maketitleyou can add the title, author and date commands to the preamble to make it work.- Parameters:
default_filepath (str) – The default path to save files.
documentclass (str or ~.Command) – The LaTeX class of the document.
document_options (str or list) – The options to supply to the documentclass
fontenc (str) – The option for the fontenc package. If it is None, the fontenc package will not be loaded at all.
inputenc (str) – The option for the inputenc package. If it is None, the inputenc package will not be loaded at all.
font_size (str) – The font size to declare as normalsize
lmodern (bool) – Use the Latin Modern font. This is a font that contains more glyphs than the standard LaTeX font.
textcomp (bool) – Adds even more glyphs, for instance the Euro (€) sign.
page_numbers (bool) – Adds the ability to add the last page to the document.
indent (bool) – Determines whether or not the document requires indentation. If it is None it will use the value from the active config. Which is True by default.
geometry_options (dict) – The options to supply to the geometry package
data (list) – Initial content of the document.
- set_feynman_diagram(fd)¶
- get_src_dot()¶
- static valid_attribute(attr: str) bool¶
- static valid_type(typ)¶
- class pyfeyn2.FeynmpRender(fd=None, documentclass='standalone', document_options=None, *args, **kwargs)[source]¶
Bases:
pyfeyn2.render.latex.metapost.MetaPostRenderA class that contains a full LaTeX document.
If needed, you can append stuff to the preamble or the packages. For instance, if you need to use
\maketitleyou can add the title, author and date commands to the preamble to make it work.- Parameters:
default_filepath (str) – The default path to save files.
documentclass (str or ~.Command) – The LaTeX class of the document.
document_options (str or list) – The options to supply to the documentclass
fontenc (str) – The option for the fontenc package. If it is None, the fontenc package will not be loaded at all.
inputenc (str) – The option for the inputenc package. If it is None, the inputenc package will not be loaded at all.
font_size (str) – The font size to declare as normalsize
lmodern (bool) – Use the Latin Modern font. This is a font that contains more glyphs than the standard LaTeX font.
textcomp (bool) – Adds even more glyphs, for instance the Euro (€) sign.
page_numbers (bool) – Adds the ability to add the last page to the document.
indent (bool) – Determines whether or not the document requires indentation. If it is None it will use the value from the active config. Which is True by default.
geometry_options (dict) – The options to supply to the geometry package
data (list) – Initial content of the document.
- set_feynman_diagram(fd)¶
- static valid_attribute(attr: str) bool¶
- static valid_type(typ: str)¶
- class pyfeyn2.TikzFeynmanRender(fd=None, documentclass='standalone', document_options=None, *args, **kwargs)[source]¶
Bases:
pyfeyn2.render.latex.latex.LatexRenderA class that contains a full LaTeX document.
If needed, you can append stuff to the preamble or the packages. For instance, if you need to use
\maketitleyou can add the title, author and date commands to the preamble to make it work.- Parameters:
default_filepath (str) – The default path to save files.
documentclass (str or ~.Command) – The LaTeX class of the document.
document_options (str or list) – The options to supply to the documentclass
fontenc (str) – The option for the fontenc package. If it is None, the fontenc package will not be loaded at all.
inputenc (str) – The option for the inputenc package. If it is None, the inputenc package will not be loaded at all.
font_size (str) – The font size to declare as normalsize
lmodern (bool) – Use the Latin Modern font. This is a font that contains more glyphs than the standard LaTeX font.
textcomp (bool) – Adds even more glyphs, for instance the Euro (€) sign.
page_numbers (bool) – Adds the ability to add the last page to the document.
indent (bool) – Determines whether or not the document requires indentation. If it is None it will use the value from the active config. Which is True by default.
geometry_options (dict) – The options to supply to the geometry package
data (list) – Initial content of the document.
- set_feynman_diagram(fd)¶
- static valid_styles(style: str) bool¶
- static valid_attribute(attr: str) bool¶
- static valid_type(typ)¶
- class pyfeyn2.PyxRender(fd=None, *args, **kwargs)[source]¶
Bases:
pyfeyn2.render.render.Render- render(file=None, show=True, resolution=200, width=None, height=None, clean_up=False)¶
Render the diagram.
- apply_layout(stylestring, obj)¶
Apply the decorators encoded in a style string to an object.
- static valid_type(typ: str)¶
- static valid_attribute(attr: str) bool¶
- static valid_style(style: str) bool¶
- pyfeyn2.styles = ['color', 'opacity', 'arrow-pos', 'parallel-arrow-sense', 'parallel-arrow-displace'][source]¶