use Texinfo::Commands; if ($Texinfo::Commands::accent_commands{$a_command}) { print STDERR "$a_command is an accent command\n"; }
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.
Texinfo::Commands holds a few hashes with information on @-commands and hashes classifying Texinfo @-commands.
Hashes are defined as our
variables, and are therefore available
outside of the module.
Hash describing the default Texinfo indices. The format of this hash is
described in Texinfo::Parser::indices_information
.
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 taking an argument, like @'
or @ringaccent
,
including @dotless
and @tieaccent
.
Commands delimiting a block with a closing @end
. The values are:
@if*
commands;
Definition commands like @deffn
;
@float
;
raw output format commands such as @html
or @info
;
commands with @item
containing
any content, @itemize
and @enumerate
;
commands like @table
in which the @item
argument is on its line;
menu @-commands, @menu
, @detailmenu
and @direntry
;
Math block commands, like @displaymath
.
@multitable
;
The remaining block commands.
Commands whose content should not be filled, like @example
or @display
.
Commands like @quotation
.
@-commands that have no expansion
of @-commands in their bodies (@macro
, @verbatim
and @ignore
);
Commands delimiting a region of the document out of the main processing:
@titlepage
, @copying
, @documentdescription
.
Block commands containing @item
with possible content before an @item
,
like @itemize
, @table
or @multitable
.
Brace commands that have their argument in code style, like
@code
.
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.
Commands that stop a paragraph. Root commands are not specified here, but they also close paragraphs.
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).
Commands containing simple text only, much like paragraph text, but
without @ref
, @footnote
, @titlefont
, @anchor
nor @verb
.
Commands accepting only plain text with accent, symbol and glyph commands.
Definition commands.
Index entry commands corresponding to default indices. For example
@cindex
.
@-commands whose second argument explain first argument and further
@-command call without first argument, as @abbr
and @acronym
.
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.
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
.
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.
@-commands used to specify custom headings, like @everyheading
.
Special @-commands appearing in custom headings, such as @thischapter
,
@thistitle
or @|
.
@-commands only valid in index entries, such as @sortas
or @subentry
.
Inline conditional commands, like @inlineifclear
, and inline format
commands like @inlineraw
and @inlinefmt
.
@-commands with braces but no argument corresponding to letters,
like @AA{}
or @ss{}
or @o{}
.
@-commands which contains math, like @math
or @displaymath
.
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.
Commands that do not start a paragraph.
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
.
Block commands not formatted as text, such as @ignore
or @macro
.
@-commands that do not stop the preamble.
%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
.
Cross reference @-command referencing nodes, like @xref
or @link
.
Commands that are at the root of a Texinfo document, namely
@node
and sectioning commands, except heading commands
like @heading
.
All the sectioning and heading commands.
Commands with unlimited arguments, like @example
.
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.