latex.py 526 B

1234567891011121314151617181920
  1. # Import your model, using the SinGen example
  2. from SinGen import *
  3. # Import the simulator and LaTeX generator
  4. from CBD.simulator import Simulator
  5. from CBD.converters.latexify import CBD2Latex
  6. # Create the model
  7. model = SinGen('model')
  8. # Create the converter (see docs for info on args)
  9. cbd2latex = CBD2Latex(model, show_steps=True, render_latex=False)
  10. # Simplify the set of equations
  11. cbd2latex.simplify()
  12. # Show the result (will be shown automatically because of show_steps)
  13. print("RESULT IS:")
  14. print(cbd2latex.render())