【问题标题】:Doxygen command paragraph (hanging) indentation limitations?Doxygen 命令段落(悬挂)缩进限制?
【发布时间】:2014-11-04 05:59:50
【问题描述】:

对于多行(段落)命令可以使用多少缩进有任何限制吗?

考虑在函数上下文中@details 的典型用例:

/**
 * @brief Do foo.
 * @details Lorem ipsum dolor sit amet, mentitum rationibus nec an.
 *          Usu magna eirmod et, aperiri discere volumus pri ex.
 *
 *          Te pro alii vidit, cu nonumes mediocritatem duo.
 *          Paulo detracto tincidunt id vim, ad has oblique percipit.
 *
 * @tparam T The argument type.
 * @param param1 The first parameter.
 * @param param2 The second parameter.
 * @return The return value.
 */
 template< typename T >
 inline
 T foo( T const& param1, T const& param2 );

很长的@details段落必须要换行,这就引出了这个缩进有什么限制的问题吗?

我知道 Doxygen 使用 Markdown,它有特定的缩进限制/用途,例如代码块的“4 空格缩进”。如果我想插入代码,上面的缩进会混淆或冲突吗?

更一般地说,还有其他我不知道的缩进用途和可能的冲突吗?

@thomas-matthews,这是一个关于技术限制的问题,而不是审美风格

【问题讨论】:

  • @thomas-matthews,这是一个关于技术限制的问题,而不是审美风格
  • @thomas-matthews,另外,“......之前问过并且已经有了答案。”是不正确的;还没有人解决其他问题。
  • 致要求重新打开此内容的人:谢谢。
  • 我没有明确的答案,但我建议不要使用这种缩进,因为根据我的经验,混淆解释器并不需要太多,尤其是在启用 Markdown 支持的情况下。为了美观,请考虑启用JAVADOC_AUTOBRIEF。这将消除对源注释中任何缩进的需要。

标签: c++ doxygen indentation restrictions


【解决方案1】:

非常粗略的建议,但这对我有用 -

/**
 * @brief Do foo.
 * @details Lorem ipsum dolor sit amet, mentitum rationibus nec an.
 *
 * &nbsp; &nbsp; &nbsp; &nbsp; Usu magna eirmod et, aperiri discere volumus pri ex.
 * &nbsp; &nbsp; &nbsp; &nbsp; 
 * &nbsp; &nbsp; &nbsp; &nbsp; Te pro alii vidit, cu nonumes mediocritatem duo.
 * &nbsp; &nbsp; &nbsp; &nbsp; Paulo detracto tincidunt id vim, ad has oblique percipit.
 *
 * @tparam T The argument type.
 * @param param1 The first parameter.
 * @param param2 The second parameter.
 * @return The return value.
 */

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-10
    • 1970-01-01
    相关资源
    最近更新 更多