documentation-generation - 如何为 Julia 创建离线文档

标签 documentation-generation julia

如何为 julia 创建本地版本的文档?我尝试过:

/Applications/Julia-0.3.1.app/Contents/Resources/julia/share/julia/doc make html
fatal: Not a git repository (or any of the parent directories): .git
make: [juliadoc-pkg] Error 128 (ignored)
PYTHONPATH=:juliadoc sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v1.3b1

Extension error:
Could not import extension juliadoc.jldoctest (exception: cannot import name bytes)
make: *** [html] Error 1
/Applications/Julia-0.3.1.app/Contents/Resources/julia/share/julia/doc 

虽然 sphinx 似乎可以工作,但我似乎缺少一些扩展?有人可以帮忙吗?谢谢!

最佳答案

Julia v0.4 以后的文档系统是内联的,可以使用 Documenter.jl 包生成。位于函数、类型、宏、模块和其他对象正上方的内联文档字符串被解释为记录随附对象。下面显示了函数 get_coeff() 的示例,

""" 
    get_coeff(a, v)
Return the coefficient of `a::TaylorN`, specified by
`v::Array{Int,1}` which has the indices of the specific monomial.
"""
function get_coeff(a::TaylorN, v::Array{Int,1})

有关文档的更多详细信息,请参阅 here .

下一步是文档生成,使用 Documenter.jl 包。详细步骤讲解here ,正如所解释的,输出可以以 markdown 或 html 形式获得。如果需要 pdf,我会使用 pandocs 将 .md 文件转换为 pdf。

关于documentation-generation - 如何为 Julia 创建离线文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26763593/

相关文章:

documentation-generation - gRPC 文档生成器

julia - 等价于 Julia 中的 c\c++ 编译器指令

parallel-processing - MMap 和 SharedArray

matplotlib - 如何将 PyPlot 图形保存到 Julia 中的视频文件?

python - Python 模块,以便您可以生成独立的、自记录的命令行实用程序(如 Perl 的 pod2man/pod2usage)?

java - 自动将 Spring @RequestMapping 注释记录到一个位置?

c# - 如何从 aspdotnet web 项目生成纯 HTML 文档?

java - 如何使用 DOCX4J 在 docx 文件生成中应用新行

arrays - 读入 Julia 中的数组

dictionary - Julia,在遍历字典时更改键时的奇怪行为