amc.output package

Submodules

amc.output.latex module

LaTeX output for reduced and unreduced equations.

amc.output.latex.convert_expression(expr, print_threejs=False)

Convert an expression to a LaTeX string.

The output is meant to be used in a dmath environment defined by the breqn LaTeX package.

Parameters
exprast.AST

An expression represented by an abstract syntax tree.

print_threejsbool

Output 3j triangular constraints. In general, these are unnecessary because the constraints are implicitly contained in the tensor variables.

Returns
latexstr

A LaTeX representation of the expression.

amc.output.latex.equations_to_document(equations, print_threejs=False)

Convert a list of equations to a complete LaTeX document.

Generates a section for each equation in the list, and subsections for each term if the root of the right-hand side expression is an ast.Add operation. Automatic line breaking of the generated equations is provided by the breqn LaTeX package.

Parameters
equationsiterable of ast.Equation

Equations to process.

print_threejsbool

Output 3j triangular constraints. In general, these are unnecessary because the constraints are implicitly contained in the tensor variables.

Returns
latexstr

A LaTeX document as a string.

Module contents

Module for handling output of reduced equations.