=head1 NAME Texinfo::Commands - Classification of commands =head1 SYNOPSIS use Texinfo::Commands; if ($Texinfo::Commands::accent_commands{$a_command}) { print STDERR "$a_command is an accent command\n"; } =head1 NOTES The Texinfo Perl module main purpose is to be used in C to convert Texinfo to other formats. There is no promise of API stability. =head1 DESCRIPTION Texinfo::Commands holds a few hashes with information on @-commands and hashes classifying Texinfo @-commands. =head1 @-COMMAND INFORMATION Hashes are defined as C variables, and are therefore available outside of the module. =over =item %index_names X> Hash describing the default Texinfo indices. The format of this hash is described in L<< C|Texinfo::Parser/$indices_information = $parser->indices_information() >>. =back =head1 @-COMMAND CLASSES Hashes are defined as C variables, and are therefore available outside of the module. The key of the hashes are @-command names without the @. The following hashes are available: =over =item %accent_commands X> Accent @-commands taking an argument, like C<@'> or C<@ringaccent>, including C<@dotless> and C<@tieaccent>. =item %block_commands X> Commands delimiting a block with a closing C<@end>. The values are: =over =item I C<@if*> commands; =item I Definition commands like C<@deffn>; =item I C<@float>; =item I raw output format commands such as C<@html> or C<@info>; =item I commands with C<@item> containing any content, C<@itemize> and C<@enumerate>; =item I commands like C<@table> in which the C<@item> argument is on its line; =item I menu @-commands, C<@menu>, C<@detailmenu> and C<@direntry>; =item I Math block commands, like C<@displaymath>. =item I C<@multitable>; =item I The remaining block commands. =item I Commands whose content should not be filled, like C<@example> or C<@display>. =item I Commands like C<@quotation>. =item I @-commands that have no expansion of @-commands in their bodies (C<@macro>, C<@verbatim> and C<@ignore>); =item I Commands delimiting a region of the document out of the main processing: C<@titlepage>, C<@copying>, C<@documentdescription>. =back =item %blockitem_commands X> Block commands containing C<@item> with possible content before an C<@item>, like C<@itemize>, C<@table> or C<@multitable>. =item %brace_code_commands X> Brace commands that have their argument in code style, like C<@code>. =item %brace_commands X> The commands that take braces. Value is I for brace commands without argument such as C<@AA>, C<@TeX>, or C<@equiv>. Other values include I, I, I and other values. =item %close_paragraph_commands X> Commands that stop a paragraph. Root commands are not specified here, but they also close paragraphs. =item %commands_args_number X> Set to the number of arguments separated by commas that may appear in braces or on the @-command line. That means 0 or unset for most block commands, including C<@example> which has an unlimited (variadic) number of arguments, 1 for C<@quotation>, 2 for C<@float>, 1 for most brace commands, 2 for C<@email> and C<@abbr>, 5 for C<@image> and C<@ref>. Values are not necessarily set for all the commands, as commands are also classified by type of command, some type of commands implying a number of arguments, and the number of arguments may not be set if it corresponds to the default (0 for block commands, 1 for other commands that take arguments). =item %contain_basic_inline_commands X> Commands containing simple text only, much like paragraph text, but without C<@ref>, C<@footnote>, C<@titlefont>, C<@anchor> nor C<@verb>. =item %contain_plain_text_commands X> Commands accepting only plain text with accent, symbol and glyph commands. =item %def_commands X> Definition commands. =item %default_index_commands X> Index entry commands corresponding to default indices. For example C<@cindex>. =item %explained_commands X> @-commands whose second argument explain first argument and further @-command call without first argument, as C<@abbr> and C<@acronym>. =item %formattable_line_commands X> Line commands which may be formatted as text, but that require constructing some replacement text, for example C<@printindex>, C<@need> or C<@verbatiminclude>. C<@contents> and C<@shortcontents> are not in this hash, since they are in a corresponding situation only when the tables of contents are formatted where the commands are. =item %formatted_nobrace_commands X> Commands not taking brace formatted as text or with text in the main document body, corresponding to symbol commands such as C<@@> or C<@:> and commands such as C<@item>. @-commands appearing only in headers are not in this hash, but in in C<%in_heading_spec_commands>. =item %formatted_line_commands X> Line commands which arguments may be formatted as text, such as C<@center>, C<@author>, C<@item>, C<@node>, C<@chapter> and other. Index commands may be formatted as text too, but they may be added with C<@def*index>, therefore they are not in that hash. Also, in general, they are not formatted as text where they appear, only when an index is printed. =item %heading_spec_commands X> @-commands used to specify custom headings, like C<@everyheading>. =item %in_heading_spec_commands X> Special @-commands appearing in custom headings, such as C<@thischapter>, C<@thistitle> or C<@|>. =item %in_index_commands @-commands only valid in index entries, such as C<@sortas> or C<@subentry>. =item %inline_conditional_commands =item %inline_format_commands X> X> Inline conditional commands, like C<@inlineifclear>, and inline format commands like C<@inlineraw> and C<@inlinefmt>. =item %letter_no_arg_commands X> @-commands with braces but no argument corresponding to letters, like C<@AA{}> or C<@ss{}> or C<@o{}>. =item %math_commands X> @-commands which contains math, like C<@math> or C<@displaymath>. =item %line_commands X> Commands that do not take braces, take arguments on the command line and are not block commands either, like C<@node>, C<@chapter>, C<@cindex>, C<@deffnx>, C<@end>, C<@footnotestyle>, C<@set>, C<@settitle>, C<@itemx>, C<@definfoenclose>, C<@comment> and many others. Note that C<@item> is in C<%line_commands> for its role in C<@table> and similar @-commands. =item %no_paragraph_commands X> Commands that do not start a paragraph. =item %nobrace_commands X> Command that do not take braces, do not have argument on their line and are not block commands either. The value is I for single character non-alphabetical @-commands such as C<@@>, C<@ > or C<@:>. Other commands in that hash include C<@indent>, C<@tab> or C<@thissection>. Note that C<@item> is in C<%nobrace_commands> for its role in C<@multitable>, C<@itemize> and C<@enumerate>. =item %non_formatted_block_commands X> Block commands not formatted as text, such as C<@ignore> or C<@macro>. =item %preamble_commands X> @-commands that do not stop the preamble. =item %preformatted_commands =item %preformatted_code_commands X> X> I<%preformatted_commands> is for commands whose content should not be filled, like C<@example> or C<@display>. If the command is meant for code, it is also in I<%preformatted_code_commands>, like C<@example>. =item %ref_commands X> Cross reference @-command referencing nodes, like C<@xref> or C<@link>. =item %root_commands X> Commands that are at the root of a Texinfo document, namely C<@node> and sectioning commands, except heading commands like C<@heading>. =item %sectioning_heading_commands X> All the sectioning and heading commands. =item %variadic_commands X> Commands with unlimited arguments, like C<@example>. =back =head1 SEE ALSO L. =head1 AUTHOR Patrice Dumas, Epertusus@free.frE =head1 COPYRIGHT AND LICENSE Copyright 2010- Free Software Foundation, Inc. See the source file for all copyright years. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. =cut