convexengineering / gplibrary

Useful subsystem models
MIT License
10 stars 11 forks source link

Markdown modeling #47

Open bqpd opened 8 years ago

bqpd commented 8 years ago

@whoburg, @mjburton11, @pgkirsch, curious for your feedback on this proposed documentation technique.

mjburton11 commented 8 years ago

@bqpd, could you briefly explain to me what you're doing here and how default.latex and gas_hale.md interact with the model?

bqpd commented 8 years ago

@mjburton11, sure thing!

gas_hale.md is all the code from gas_hale_rebuild3.py plus all the documentation in documentation/. It's a markdown file that can be:

default.latex is a latex template with \usepackage{bigtable} so that the solution table can be compiled in the pdf.

mjburton11 commented 8 years ago

I think this is very useful. How are you pulling the data from documentation? I'm having trouble running pandoc error: pandoc: command not found

bqpd commented 8 years ago

Whoops, you'll have to install pandoc first.

The idea is that instead of maintaining separate models and model documentation, they can be combined into a single file, so I copied the assumptions from documentation/ by hand.

The rest of what was in there were constraint and variables lists, which I think we can (and should) be generating automatically. Special python comments in code blocks can skip that block or replace it with generated latex in the PDF, so all that remains is writing the python to generate the right latex.

bqpd commented 8 years ago

I could imagine incremently replacing the code with generated latex such that the final result is a lovely codeless PDF

bqpd commented 8 years ago

From @whoburg: