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