1 Texinfo::Commands


1.1 Texinfo::Commands NAME

Texinfo::Commands - Classification of commands


1.2 Texinfo::Commands SYNOPSIS

  use Texinfo::Commands;
  if ($Texinfo::Commands::accent_commands{$a_command}) {
    print STDERR "$a_command is an accent command\n";
  }

1.3 Texinfo::Commands NOTES

The Texinfo Perl module main purpose is to be used in texi2any to convert Texinfo to other formats. There is no promise of API stability.


1.4 Texinfo::Commands DESCRIPTION

Texinfo::Commands holds a few hashes with information on @-commands and hashes classifying Texinfo @-commands.


1.5 @-COMMAND INFORMATION

Hashes are defined as our variables, and are therefore available outside of the module.

%index_names

Hash describing the default Texinfo indices. The format of this hash is described in Texinfo::Parser::indices_information.


1.6 @-COMMAND CLASSES

Hashes are defined as 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:

%accent_commands

Accent @-commands taking an argument, like @' or @ringaccent, including @dotless and @tieaccent.

%block_commands

Commands delimiting a block with a closing @end. The values are:

conditional

@if* commands;

def

Definition commands like @deffn;

float

@float;

format_raw

raw output format commands such as @html or @info;

item_container

commands with @item containing any content, @itemize and @enumerate;

item_line

commands like @table in which the @item argument is on its line;

menu

menu @-commands, @menu, @detailmenu and @direntry;

math

Math block commands, like @displaymath.

multitable

@multitable;

other

The remaining block commands.

preformatted

Commands whose content should not be filled, like @example or @display.

quotation

Commands like @quotation.

raw

@-commands that have no expansion of @-commands in their bodies (@macro, @verbatim and @ignore);

region

Commands delimiting a region of the document out of the main processing: @titlepage, @copying, @documentdescription.

%blockitem_commands

Block commands containing @item with possible content before an @item, like @itemize, @table or @multitable.

%brace_code_commands

Brace commands that have their argument in code style, like @code.

%brace_commands

The commands that take braces. Value is noarg for brace commands without argument such as @AA, @TeX, or @equiv. Other values include accent, arguments, context and other values.

%close_paragraph_commands

Commands that stop a paragraph. Root commands are not specified here, but they also close paragraphs.

%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 @example which has an unlimited (variadic) number of arguments, 1 for @quotation, 2 for @float, 1 for most brace commands, 2 for @email and @abbr, 5 for @image and @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).

%contain_basic_inline_commands

Commands containing simple text only, much like paragraph text, but without @ref, @footnote, @titlefont, @anchor nor @verb.

%contain_plain_text_commands

Commands accepting only plain text with accent, symbol and glyph commands.

%def_commands

Definition commands.

%default_index_commands

Index entry commands corresponding to default indices. For example @cindex.

%explained_commands

@-commands whose second argument explain first argument and further @-command call without first argument, as @abbr and @acronym.

%formattable_line_commands

Line commands which may be formatted as text, but that require constructing some replacement text, for example @printindex, @need or @verbatiminclude. @contents and @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.

%formatted_nobrace_commands

Commands not taking brace formatted as text or with text in the main document body, corresponding to symbol commands such as @@ or @: and commands such as @item. @-commands appearing only in headers are not in this hash, but in in %in_heading_spec_commands.

%formatted_line_commands

Line commands which arguments may be formatted as text, such as @center, @author, @item, @node, @chapter and other. Index commands may be formatted as text too, but they may be added with @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.

%heading_spec_commands

@-commands used to specify custom headings, like @everyheading.

%in_heading_spec_commands

Special @-commands appearing in custom headings, such as @thischapter, @thistitle or @|.

%in_index_commands

@-commands only valid in index entries, such as @sortas or @subentry.

%inline_conditional_commands
%inline_format_commands

Inline conditional commands, like @inlineifclear, and inline format commands like @inlineraw and @inlinefmt.

%letter_no_arg_commands

@-commands with braces but no argument corresponding to letters, like @AA{} or @ss{} or @o{}.

%math_commands

@-commands which contains math, like @math or @displaymath.

%line_commands

Commands that do not take braces, take arguments on the command line and are not block commands either, like @node, @chapter, @cindex, @deffnx, @end, @footnotestyle, @set, @settitle, @itemx, @definfoenclose, @comment and many others.

Note that @item is in %line_commands for its role in @table and similar @-commands.

%no_paragraph_commands

Commands that do not start a paragraph.

%nobrace_commands

Command that do not take braces, do not have argument on their line and are not block commands either. The value is symbol for single character non-alphabetical @-commands such as @@, @ or @:. Other commands in that hash include @indent, @tab or @thissection.

Note that @item is in %nobrace_commands for its role in @multitable, @itemize and @enumerate.

%non_formatted_block_commands

Block commands not formatted as text, such as @ignore or @macro.

%preamble_commands

@-commands that do not stop the preamble.

%preformatted_commands
%preformatted_code_commands

%preformatted_commands is for commands whose content should not be filled, like @example or @display. If the command is meant for code, it is also in %preformatted_code_commands, like @example.

%ref_commands

Cross reference @-command referencing nodes, like @xref or @link.

%root_commands

Commands that are at the root of a Texinfo document, namely @node and sectioning commands, except heading commands like @heading.

%sectioning_heading_commands

All the sectioning and heading commands.

%variadic_commands

Commands with unlimited arguments, like @example.


1.7 Texinfo::Commands SEE ALSO

Texinfo::Parser.


1.8 Texinfo::Commands AUTHOR

Patrice Dumas, <pertusus@free.fr>