Reputation: 59841
I would like to define an alias that behaves similar to \sa
or \see
, e.g. groups subsequent paragraphs marked with it into one section and lists each item on a single line.
e.g.
\foo One
\foo Two
\foo Three
Should end up as
Foo:
One
Two
Three
Long story short: An alias that behaves like \see
but has a different label.
Upvotes: 0
Views: 1432
Reputation: 46346
Have a look at the \xrefitem
command. From the doxygen documentation (emphasis mine):
This command is a generalization of commands such as
\todo
and\bug
. It can be used to create user-defined text sections which are automatically cross-referenced between the place of occurrence and a related page, which will be generated. On the related page all sections of the same type will be collected.
The example in the documentation suggests that you place the alias
ALIASES += "reminder=\xrefitem reminders \"Reminder\" \"Reminders\""
in your configuration file. Then writing something like
\reminder test 1
\reminder test 2
\reminder test 3
in your documentation will result in something like:
Reminder:
test 1
test 2
test 3
The only problem with this is that you will under an additional page under the "Related pages" tab called "Reminders". If you don't want this related page you can use an alias as documented in the custom commands documentation:
ALIASES += sideeffect="\par Side Effects:\n"
which will allow you to put the command \sideeffect
in the documentation, which will result in a user-defined paragraph with a heading Side Effects:. However, these will not be grouped together in the final documentation (i.e. each \sideeffect
will generate a Side Effects: heading).
Upvotes: 3