Vaibhav Bajpai
Vaibhav Bajpai

Reputation: 16774

Write LaTeX Math Equations in Code Comments?

Lately I worked on a project in Computer Vision that involved implementing lot of linear algebra equations in the code. So I had around 2 sheets of math equations which I implemented.

I have scanned the sheets and I put them along side my project code, and as I am LaTeX'ing them now in a separate PDF, am wondering wouldn't it be nice to have these equations in the code comments just above the function that implements it? (something like the IDE being able to generate beautiful equations in the code comments from the LaTeX code I write, does it sound like a good idea?)

Upvotes: 1

Views: 2142

Answers (2)

erenon
erenon

Reputation: 19118

Doxygen supports to generate latex files with comments in math mode:

related Doxygen docs

However, it wouldn't show up in your IDE.

Upvotes: 3

Tyler Eaves
Tyler Eaves

Reputation: 13121

It's called literate programming. Google it.

Upvotes: -3

Related Questions