# Latex¶

Export of model equations to latex (or even LaTeX) is provided.

Limitations:

• The pacing mechanism is not included in the resulting documents

## API¶

The standard exporting API is provided:

myokit.formats.latex.exporters()

Returns a dict of all exporters available in this module.

class myokit.formats.latex.PdfExporter

This Exporter exports model equations to a simple latex document.

To create a pdf using pdflatex:

pdflatex filename.tex

info()

This should be implemented by each subclass.

model(path, model, protocol=None)

Export to an xml document.

supports_model()

Returns True

class myokit.formats.latex.PosterExporter

This Exporter exports model equations to a terrifying poster format, designed to strike fear into the heart of its beholders.

To create a pdf using pdflatex:

pdflatex filename.tex


The poster class requires a couple of latex classes you may need to install.

info()

This should be implemented by each subclass.

model(path, model, protocol=None)

Exports a model to an xml document.

supports_model()

Returns True.

myokit.formats.latex.ewriters()

Returns a dict of all expression writers available in this module.

class myokit.formats.latex.LatexExpressionWriter

This ExpressionWriter translates Myokit expressions to their Tex equivalent.

eq(eq)

Converts an equation to a string.

ex(e)

Converts an expression to a string.

set_lhs_function(f)
Sets a naming function, will be called to get the variable name from a
myokit.LhsExpression object.

The argument f should be a function that takes an LhsExpression as input and returns a string.

set_time_variable_name(name='t')

Sets a name to use for the time variable in derivatives