【发布时间】:2020-07-27 18:50:41
【问题描述】:
我的问题是this one 的扩展,我想要的是 Doxygen 输出我的 python 源代码的同一注释行中的数学公式和文本。举个例子:
# Create homogeneous probability matrix from the colors matrix
def create_probability_map(colors_map):
"""!\f$(x_1,y_1)\f$"""
pass
当我运行上述代码时,Doxygen 会按预期输出correct math formula。 但是,如果我在数学公式之前添加一些文本:
# Create homogeneous probability matrix from the colors matrix
def create_probability_map(colors_map):
"""Formula is: !\f$(x_1,y_1)\f$"""
pass
输出不如预期。 有人知道如何解决这个问题吗?
在尝试其他几种组合时,我发现如果文本在数学公式之后,则 Doxygen outputs 正确注释,如下所示:
# Create homogeneous probability matrix from the colors matrix
def create_probability_map(colors_map):
"""!\f$(x_1,y_1)\f$ is the formula"""
pass
P.S:我还发现奇怪的是,据说 Doxygen 无法在 Python 上处理数学公式,正如 documentation 中所述(特别是在 here 中)。文档过期了吗?
【问题讨论】: