Skip to content

add basic markdown template#70

Open
whoburg wants to merge 3 commits into
masterfrom
md_template
Open

add basic markdown template#70
whoburg wants to merge 3 commits into
masterfrom
md_template

Conversation

@whoburg

@whoburg whoburg commented May 9, 2016

Copy link
Copy Markdown
Collaborator

@bqpd, please review and add additional commits if you see ways to improve

Comment thread md_template/model.md Outdated
import numpy as np
import matplotlib.pyplot as plt
xmin = np.linspace(0.01, 3, 30)
# TODO changing 0.01 to 0 above results in an error -- suspected GPkit bug

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to remove_unbounded_zeros to use a <= 0 constraint.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true - good point

@whoburg

whoburg commented May 13, 2016

Copy link
Copy Markdown
Collaborator Author

responded to code review.

Comment thread md_template/model.md
with open("gp.generated.tex", "w") as f:
f.write(m._repr_latex_())
# TODO wish model name didn't get printed in the above
f.write("$%s$" % m.latex(excluded=["models", "units"]))

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bqpd note the need for dollar signs here

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup.

@bqpd

bqpd commented May 13, 2016

Copy link
Copy Markdown
Contributor

Looks good to me! Do we want any tests?

@bqpd

bqpd commented Jun 18, 2016

Copy link
Copy Markdown
Contributor

@whoburg, I think this is ready to merge?

@whoburg

whoburg commented Sep 11, 2016

Copy link
Copy Markdown
Collaborator Author

@mjburton11, you've been using markdown a lot. Do you see any improvements that could be made to this template before we merge? (e.g. maybe your gen_tex_fig)?

Let's all start new projects from this template and hopefully thereby make it better over time.

@mjburton11

Copy link
Copy Markdown

Just added gen_tex_fig. The other really useful thing that may be more difficult to represent here is the function I use to generate model latex if the model has submodels. If you think that should be added here let me know.

Comment thread md_template/model.md
\begin{figure}[h!]
\label{fig:sweep}
\begin{center}
\includegraphics{simple_sweep.pdf}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@whoburg, @bqpd when I removed [scale=0.5] it worked just fine. Now have 3 ways of putting a figure in the md.

@whoburg

whoburg commented Sep 21, 2016

Copy link
Copy Markdown
Collaborator Author

@mjburton11 is tackling convexengineering/gpkit#890, and then this should be good to merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants