我想在用ocamldoc生成的文档中包含等式。我正在使用一个小型(bat)脚本:
ocamldoc -latex maths.ml
pdflatex ocamldoc.out其中maths.ml包含以下注释:
(** "Given a list of indices \\( v \\) and a vector of weights \f$ w \f$, this returns $ sum_iw_{v_i} $"*)
let dot_product indices weights = [...]但是,pdf文件中唯一产生的内容是:
val dot_product : int list -> float array -> float
"Given a list of indices \\( v \\) and a vector of weights \f$ w \f$, this returns $ sum_iw_
$"我尝试了各种方法来表示这些方程($,\f$,(),但是没有一个被识别出来。是否有一种特定的方法来表示方程,以便被ocamldoc所识别?
发布于 2016-09-05 13:54:39
您可以使用目标特定格式:
{%latex: ... %}注意,通常情况下,ocamldoc文档被呈现为HTML,而不是PDF。因此,我不会利用该指令和/或关心HTML输出。对于子/超级脚本,ocamldoc语言直接支持它们。对于HTML特定的输出,只需执行以下操作
{%html: ... %}https://stackoverflow.com/questions/39331542
复制相似问题