比如我的函数及其注释:
@doc raw"""
∇normedVoltage(z, ϕs::Float64, ϕ2s::Float64, r::Float64, h1::Int64, h::Int64, circum::Float64)::Float64
归一化电压的1阶导数。
"""
function ∇normedVoltage(z, ϕs::Float64, ϕ2s::Float64, r::Float64, h1::Int64, h::Int64, circum::Float64)::Float64
res = cos(ϕs - 2 * h1 * π * z / circum) + r * h * cos(ϕ2s - 2 * h1 * h * π * z / circum)
-2 * h1 * π / circum * res
end
@doc raw"""
∇normedVoltage(z, par::ParDBRF)::Float64
归一化电压的1阶导数。
"""
function ∇normedVoltage(z, par::ParDBRF)::Float64
∇normedVoltage(z, par.ϕs, par.ϕ2s, par.r, par.h1, par.h, par.circum)
end
可以看到我函数名有个\nabla
字符。
然后我在写包的说明文档时,在docs/src/
下的.md
文件内写入:
```@docs
∇normedVoltage
```
但是编译时候报错了。
PS F:\Documents\JuliaProgramme\MyModules\DoubleRFs\docs> julia --project .\make.jl
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: ExpandTemplates: expanding markdown templates.
┌ Error: undefined binding '∇normedVoltage' in `@docs` block in src\api.md:34-36
│ ```@docs
│ ∇normedVoltage
│ ```
└ @ Documenter C:\Users\16398\.julia\packages\Documenter\qoyeC\src\utilities\utilities.jl:44
[ Info: CrossReferences: building cross-references.
[ Info: CheckDocument: running document checks.
[ Info: Populate: populating indices.
ERROR: LoadError: `makedocs` encountered an error [:docs_block] -- terminating build before rendering.
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:35
[2] runner(::Type{Documenter.Builder.RenderDocument}, doc::Documenter.Document)
@ Documenter C:\Users\16398\.julia\packages\Documenter\qoyeC\src\builder_pipeline.jl:253
[3] dispatch(::Type{Documenter.Builder.DocumentPipeline}, x::Documenter.Document)
@ Documenter.Selectors C:\Users\16398\.julia\packages\Documenter\qoyeC\src\utilities\Selectors.jl:170
[4] #86
@ C:\Users\16398\.julia\packages\Documenter\qoyeC\src\makedocs.jl:248 [inlined]
[5] withenv(::Documenter.var"#86#88"{Documenter.Document}, ::Pair{String, Nothing}, ::Vararg{Pair{String, Nothing}})
@ Base .\env.jl:257
[6] #85
@ C:\Users\16398\.julia\packages\Documenter\qoyeC\src\makedocs.jl:247 [inlined]
[7] cd(f::Documenter.var"#85#87"{Documenter.Document}, dir::String)
@ Base.Filesystem .\file.jl:101
[8] #makedocs#84
@ C:\Users\16398\.julia\packages\Documenter\qoyeC\src\makedocs.jl:247 [inlined]
[9] top-level scope
@ F:\Documents\JuliaProgramme\MyModules\DoubleRFs\docs\make.jl:6
in expression starting at F:\Documents\JuliaProgramme\MyModules\DoubleRFs\docs\make.jl:6
没有这个特殊字符的函数名都编译通过了。这种没有,不知道怎么办了