简体   繁体   English

如何将多个备注组合到一个段落中?

[英]How do I group multiple remarks into a single paragraph?

I'm relatively new to doxygen, having preferred Javadocs (when I was writing more Java) and regular word processing tools (when I was working for IBM). 我对doxygen相对较新,拥有首选的Javadocs(当我编写更多Java时)和常规的文字处理工具(当我在IBM工作时)。

My comment style is to include a lot of running narrative interspersed throughout the code base so that the purpose of the code is very clear. 我的评论风格是在整个代码库中散布很多运行中的叙述,以便使代码的目的非常明确。 I'd prefer to re-work that text so it can be used to external documentation for the APIs I'm producing. 我希望对这些文本进行重新处理,以便可以将其用于我正在生成的API的外部文档中。

When I use \\remark tags I wind up with each \\remark as a separate paragraph in the HTML output. 当我使用\\ remark标记时,我会将每个\\ remark作为单独的段落显示在HTML输出中。 That doesn't look the way I want it to look. 那看起来不像我想要的样子。 I don't want to have one giant \\remark which might cover 6 or 8 blocks of code, either. 我不想有一个大的\\ remark可能覆盖6或8个代码块。

My question is this -- how can I tell doxygen to "merge" multiple \\remark sections into a single paragraph, starting a new paragraph only when I want it to? 我的问题是-如何告诉doxygen将多个\\ remark节“合并”到一个段落中,仅在需要时才开始一个新段落?

I'm not sure if I fully understood the question, but if the question was: "how to use more than 1 paragraph inside a single remark tag, you can use parblock and endparblock commands: 我不确定我是否完全理解该问题,但是如果问题是:“如何在单个备注标记中使用多个段落,则可以使用parblockendparblock命令:

/**
 *  \file utils.h
 *  \brief TODO complete the documentation of utils.h
 *
 * \remark  Lorem ipsum dolor sit amet, ex everti iracundia laboramus vel, in tota sensibus posidonium eam. His ei expetenda splendide, has eu iusto delicatissimi. Mei dolor deseruisse et. Viris graeco necessitatibus an est, quod reque vulputate sea cu, an has simul nihil numquam. Modo animal assentior pri ut, te mea duis prima, esse sonet ut vim. Duo in duis legere molestie.
 *
 * Ea mel prima atomorum liberavisse, ei odio voluptua dissentiet vix. Vix an ornatus suscipit perfecto. Ut propriae omnesque cum, usu ferri commune tacimates te, erant definitionem vim id. Vix cu copiosae imperdiet. Vis fierent nominati patrioque et, eam menandri vituperatoribus ei, ea has veritus volutpat neglegentur. Ius cu posse novum utroque.
 *
 * Ad per nobis periculis, legere cetero duo ut. In vis nihil admodum suscipit, per alia consequat expetendis ad, ex erant vocibus adversarium mel. Vix ut modus gloriatur, falli vitae eu eam, te per dicat persius. Vis nostrud maiorum et, sea ut etiam perfecto. Cum ut quod legimus convenire, iriure fabellas gloriatur qui ex.
 *
 * \remark
 *
 * \remark \parblock
 *
 * Lorem ipsum dolor sit amet, ex everti iracundia laboramus vel, in tota sensibus posidonium eam. His ei expetenda splendide, has eu iusto delicatissimi. Mei dolor deseruisse et. Viris graeco necessitatibus an est, quod reque vulputate sea cu, an has simul nihil numquam. Modo animal assentior pri ut, te mea duis prima, esse sonet ut vim. Duo in duis legere molestie.
 *
 * Ea mel prima atomorum liberavisse, ei odio voluptua dissentiet vix. Vix an ornatus suscipit perfecto. Ut propriae omnesque cum, usu ferri commune tacimates te, erant definitionem vim id. Vix cu copiosae imperdiet. Vis fierent nominati patrioque et, eam menandri vituperatoribus ei, ea has veritus volutpat neglegentur. Ius cu posse novum utroque.
 *
 * Ad per nobis periculis, legere cetero duo ut. In vis nihil admodum suscipit, per alia consequat expetendis ad, ex erant vocibus adversarium mel. Vix ut modus gloriatur, falli vitae eu eam, te per dicat persius. Vis nostrud maiorum et, sea ut etiam perfecto. Cum ut quod legimus convenire, iriure fabellas gloriatur qui ex.
 *
 * \endparblock
 *
 * \remark
 *  third remark
 */

Here's the HTML output: 这是HTML输出: 带和不带parblock的输出 . You can always check parblock documentation by following the link parblock doxygen documentation . 您始终可以通过链接parblock doxygen文档来检查parblock 文档 If you are still unsatisfied with the HTML output, I would recommend you to add a custom CSS file specifying remarks rules. 如果您仍然对HTML输出不满意,建议您添加一个指定注释规则的自定义CSS文件。 You can add additional CSS files via HTML_EXTRA_STYLESHEET: there is CSS class named "section remark" that should allow you to customize the appearance; 您可以通过HTML_EXTRA_STYLESHEET添加其他CSS文件:有一个名为“ section remark”的CSS类,应允许您自定义外观。 more info about this one here . 有关此的更多信息,请点击此处 I hope I helped you. 希望对您有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM