在代码注释中写 LaTeX 数学方程?
最近,我参与了一个计算机视觉项目,其中涉及在代码中实现大量线性代数方程。所以我实现了大约两张数学方程。
我已经扫描了这些工作表,并将它们放在我的项目代码旁边,并且由于我现在正在将它们LaTeX'ing
放在一个单独的PDF
中,我想知道这不是吗很高兴将这些方程放在实现它的函数上方的代码注释中吗? (IDE 能够在我编写的 LaTeX 代码的代码注释中生成漂亮的方程,这听起来是个好主意吗?)
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?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Doxygen 支持以数学模式生成带有注释的乳胶文件:
相关 Doxygen 文档
但是,它不会出现在你的 IDE 中。
Doxygen supports to generate latex files with comments in math mode:
related Doxygen docs
However, it wouldn't show up in your IDE.
这就是所谓的文学编程。谷歌一下。
It's called literate programming. Google it.