agate-model / Agate.jl

A Julia library to build flexible and composable aquatic ecosystems.
MIT License
5 stars 0 forks source link

parse model specification to pdf (or LaTeX) #65

Open nanophyto opened 4 days ago

radka-j commented 4 days ago

The Latexify package can be used to turn Julia expressions into latex, for example:

using Latexify
latexify(:(x + y))  |> print

Since the tracers are written as expressions already, this should be fairly straightforward. A potential issue is that we are using functions within the expressions so the output will just be the function name, which might not be what you're thinking of. Try for example:

latexify(:(phytoplankton_metabolic_loss(P, lᵖⁿ) ))

Additionally, any _ in a function or parameter name renders anything that follows as a subscript (which is correct behaviour in latex but not appropriate here). Maybe #64 might be a way to get around that.