|
7.20 Customizing other commands, and unknown commands
Many commands without braces are available in texinfo, sometimes with
a specific syntax. For example we have @sp, @noindent,
@documentlanguage, @oddheading, @headings,
@shortcontents, @shorttitlepage or @comment.
texi2html interprets
some of these commands and some functions or variables are used for
their formatting or to access their information.
In the default case, however, most of these constructs are ignored.
It is possible to change how the things following these commands
on the line are handled, what is considered to be an arg for those
commands and it is also possible to keep them instead of discarding
them such that it is possible to handle them specially, with the
same function than the one used for unknown commands.
Those special commands without braces are the key of a hash:
%misc_command. The associated value is a reference on a
hash enabling to set the properties of these commands. The
keys of this hash reference is the name of a property, the value
is the value of the property. For example here we have line
for the arg property for the command @-command.
| | $misc_command{'command'} = {'arg' => 'line', 'skip' => 'space'};
|
The properties and possible values are:
-
skip
This property enables to set what is skipped after the command arguments.
Here are the possible values:
-
line
The remaining of the line is skipped.
-
space
Spaces are skipped but not newline.
-
whitespace
Spaces are skipped
-
linewhitespace
Spaces are skipped if there are only spaces remaining on the line.
-
linespace
Spaces are skipped, but not newline if
there are only spaces remaining on the line
-
arg
If the associated value is line the line is considered to be the
argument. If it is a number it is the number of args (separated by spaces).
-
texi
If true the arguments are considered to real texinfo, therefore
@value and @macro are expanded.
-
keep
If true the args and the macro are kept, otherwise they are discarded.
The defaut is to have keep undef for all the commands.
If keep is true for @verbatiminclude the default
action for this macro isn't done.
Commands which don't appear in the hashes
%simple_map,
%simple_map_pre,
%simple_map_texi and %misc_command, or that appear in
%misc_command but with keep true are processed by the
following function reference:
- Function Reference: ($result_line, $result, $result_text, $message) unknown $command $line
$command is the @-command, $line is the line following the
$command. $result is a boolean. If it is true then the other return
values are taken into account otherwise the default actions are
used. In case $result is true, $result_line is the new line
to be processed further, $result_text is the resulting formatted text
and $message, if defined is a message outputted to the output
with line number added by texi2html.
Commands with braces not specified above
nor in
%style_map,
%style_map_pre and
%style_map_texi are processed
by the following function reference
- Function Reference: ($result, $result_text, $message) unknown_style $command $text
$command is the @-command, $text is the text appearing within
the braces (allready formatted). $result is a boolean. If it is true then
the other return
values are taken into account otherwise the default actions are
used. In case $result is true, $result_text is the resulting
formatted text
and $message, if defined is a message outputted to the output
with line number added by texi2html.
Doku-Base
This document was created by Netzdino using texi2html.
|