Here we describe approximately which @-commands can be used in which
contexts. It not exhaustive or meant to be a complete reference.
Discrepancies between the information here and the
TeX implementations are most likely to be resolved in favor of the
By general text below, we mean anything except sectioning and
other such outer-level document commands, such as
@if ... @end if conditional
commands may appear anywhere (except the conditionals must still be on
lines by themselves).
@caption may only appear in
@float but may contain general text.
@-commands with braces marking text (such as
@asis) may contain raw formatter commands such as
@html but no other block commands (other commands terminated
@end) and may not be split across paragraphs, but may
otherwise contain general text.
In addition to the block command restriction, on
@table lines, @-commands
that makes only sense in a paragraph are not accepted, such as
In addition to the above, sectioning commands cannot contain
In addition to the above, remaining commands (
@image, and so on) cannot
contain cross-reference commands (
@inforef). In one last addition,
@shortcaption may only appear inside
For precise and complete information, we suggest looking into the test suite in the sources, which exhaustively tries combinations.