经过一番调查,我认为这似乎是一个错误,但这只是因为它有点违反直觉。
考虑以下:
The Main Section {#the_main_section}
================
Subsection One {#first}
--------------
Something highly interesting...
该文档以 1 级标题开始(如此处所述),因此 Doxygen 将“主要部分”解析为页面的名称和标题。{#the_main_section}
将标题转换为页面名称后,标题和标签似乎将被忽略。
然后处理继续到文档的其余部分,当它到达“Subsection One”时,它认为“subsection”没有父“Section”(因为“Section”已转换为页面名称)并且这是它窒息的地方。
更具体地说,它丢弃子节(标题),因为它认为没有父“节”。所有其他文本仍然存在,但被视为“页面”的一部分(没有部分父级)。
“修复”是在初始“1 级标题”之后添加另一个“1 级标题”,例如
My Great Documentation (Which Becomes the Page Name)
====================================================
The First Section
=================
Q. What? I already created a level 1 heading?
A. Yup, but that was converted to a page name/title and discarded, so now
we have to create another level 1 heading for my first section. Don't
be fooled into thinking that the opening heading in this document is
still treated as an opening heading by Doxygen - it's not!