开发者

Latex Javadoc generation

Is there a way to generate a latex document fr开发者_Go百科om my java sourcefile's documentation? I don't want to include LaTeX Elements in my documentation comments, I simply want to create LaTeX files instead of HTML.

Thanks


An alternative to Texdoclet is the ltxdoclet I created.

I think the main difference is that it also includes the source code, not only the Javadoc comments, though you can switch this off.

It is not very well documented on the github site - just download the code and do ant pdfdoku for an example output (ant latexdoku if you only want the LaTeX files). (It is documented in german, though.)

I really should add a readme file there.


For now, here is the jar file - download it somewhere, and then use

 javadoc -docletpath ltxdoclet.jar -doclet de.dclj.paul.ltxdoclet.DocletStart -help

to see a list of options available. (This will be in german, if you have no english locale. Prefix it with "LC_ALL=en_US" or similar on bash to get the english version, or have a look at help_en.txt instead if you don't know german.)

I'm working on a webpage with some more documentation, but I'm not sure when it will be ready.


Now we have a webpage, too. It links the jar file, and also as an example the javadocs when applied to itself.


Texdoclet seems to be what you need. As for how to use it: just like any other doclet.


If you don't want to rely on any doclet dependency, but rather on a javascript one, you can just add the following javadoc param:

-header "<script type='text/javascript' src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>"

and simply use clean latex inside your comments such as \(\sum_i a_i\) or \[\sum_i a_i\]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜