这可以在其中一个opencv源标头的注释部分找到。在doxygen中,这种语言看起来像乳胶。我正在使用CLion,是否可以通过使用插件以可读格式扩展它?
/** @brief Checks if array elements lie between the elements of two other arrays.
The function checks the range as follows:
- For every element of a single-channel input array:
\f[\texttt{dst} (I)= \texttt{lowerb} (I)_0 \leq \texttt{src} (I)_0 \leq \texttt{upperb} (I)_0\f]
- For two-channel arrays:
\f[\texttt{dst} (I)= \texttt{lowerb} (I)_0 \leq \texttt{src} (I)_0 \leq \texttt{upperb} (I)_0 \land \texttt{lowerb} (I)_1 \leq \texttt{src} (I)_1 \leq \texttt{upperb} (I)_1\f]
- and so forth.
*/
答案 0 :(得分:1)
我认为这可能存在一些限制(请注意,目前CLion不提供公共API)。
似乎为了您的目的,您可以编写自己的小“注入语言”,然后将其引入评论正文。
这是一个描述“how to write a simple language for Intellij IDEA”的教程。请注意,为了您的目的,您只能实现词法分析器,解析器和荧光笔。
使用语言注入器,您可以将您的语言“注入”评论正文。 您可以在此处找到更多信息:
<languageInjector implementation="com.YourLatexCommentLanguageInjector"/>
com.intellij.core.CoreASTFactory#createComment
并且您也可以write your own QuickDocumentationProvider并尝试在快速文档弹出窗口中呈现乳胶,如您所愿。