Description
This command will cause the specified
input file
to be displayed
with out any formatting; i.e., verbatim.
This provides a way in which a single source code file
can be used both for input to OMhelp and input to another program
with out having OMhelp commands in the file.
(The
source code example
option for the codep
command
provides another way of doing this that does
have OMhelp commands in the file.)
%filename%indent%start%stop%skip%
is a delimiter sequence
where % can be any character that is not a letter.
New Lines
If
start
is not present,
the verbatim output starts and ends with a new line.
If
start
is present,
the verbatim output
does not start on a new line.
This enables you to include the starting text
just before the verbatim output and not have an extra new line
follow the starting text in the output
(see the Five Delimiters example below).
Example File
The file omh/copyright.omh contains the following text:
$comment This file is used as an example by include.omh and verbatim.omh$$
$codep
# BEGIN SHORT COPYRIGHT
# ---------------------------------------------------------------------------
# OMhelp: Source Code -> Help Files: Copyright (C) 1998-2004 Bradley M. Bell
#
# This program 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 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# ---------------------------------------------------------------------------
# END SHORT COPYRIGHT
$$
All of the font
commands allow you to
have other commands nested inside of them.
Filename
The value of
filename
specifies the name
of the file that is displayed.
Leading and trailing white space in
filename
is ignored.
Example
The following sequence displays the file omh/copyright.omh
in code font
.
$code
$verbatim!copyright.omh!$$
$$
creates the following output
$comment This file is used as an example by include.omh and verbatim.omh$$
$codep
# BEGIN SHORT COPYRIGHT
# ---------------------------------------------------------------------------
# OMhelp: Source Code -> Help Files: Copyright (C) 1998-2004 Bradley M. Bell
#
# This program 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 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# ---------------------------------------------------------------------------
# END SHORT COPYRIGHT
$$
Highlighting
The hilite
command can be used to highlight text in the output
created by the verbatim command. For example,
$hilitecmd%verbatim%$$
$hiliteseq%%Bradley M. Bell%%%$$
$verbatim!copyright.omh!$$
creates the following output
$comment This file is used as an example by include.omh and verbatim.omh$$
$codep
# BEGIN SHORT COPYRIGHT
# ---------------------------------------------------------------------------
# OMhelp: Source Code -> Help Files: Copyright (C) 1998-2004 Bradley M. Bell
#
# This program 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 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# ---------------------------------------------------------------------------
# END SHORT COPYRIGHT
$$
Indent
If
indent
is present,
it is a positive integer and specifies
the number of spaces to indent the output.
Example
The following sequence displays the file omh/copyright.omh
in italic font
and indented five spaces.
$italic
$verbatim!copyright.omh!5!$$
$$
creates the following output
$comment This file is used as an example by include.omh and verbatim.omh$$
$codep
# BEGIN SHORT COPYRIGHT
# ---------------------------------------------------------------------------
# OMhelp: Source Code -> Help Files: Copyright (C) 1998-2004 Bradley M. Bell
#
# This program 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 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# ---------------------------------------------------------------------------
# END SHORT COPYRIGHT
$$
Start
If
start
is present,
it specifies a sequence of characters after which output should start.
In this case none of the characters in the file before,
and including,
this starting sequence are displayed.
If the escape
character is present in
start
,
there must be three decimal digits following it.
In this case the escape character together with the three following
characters, represent the single character with ascii code equal
to the decimal value of the three decimal digits.
Stop
If
stop
is present,
it specifies
a sequence of characters just before which output should stop.
In this case none of the characters in the file following,
and including,
this stopping sequences are displayed.
If the escape
character is present in the stopping
sequence, there must be three decimal digits following it.
In this case the escape character together with the three following
characters, represent the single character with ascii code equal
to the decimal value of the three decimal digits.
Example
The following command sequence
replaces Bradley M. Bell by
http://www.seanet.com/~bradbell in the file omh/copyright.omh:
$code
$pre
$$#$verbatim!copyright.omh!5!#!Bradley M. Bell!$$
http://www.seanet.com/~bradbell
$verbatim!copyright.omh!5!Bradley M. Bell ! COPYRIGHT!$$
COPYRIGHT
$$
Here is a description of the command sequence:
$code
$pre
$$#
A $code command is started and
a single # is displayed starting on a new line,
indented 5 spaces,
$verbatim!copyright.omh!5!#!Bradley M. Bell!$$
This commands displays some of the text in omh/copyright.omh.
The text starts at, and does not include,
the first # in omh/copyright.omh.
The text ends at, and does not include,
the Bradley M. Bell in omh/copyright.omh
that follows the starting text.
http://www.seanet.com/~bradbell
The text http://www.seanet.com/~bradbell is output.
$verbatim!copyright.omh!5!Bradley M. Bell !COPYRIGHT!$$
This commands displays some of the text in omh/copyright.omh.
The text starts at, and does not include,
the first Bradley M. Bell in omh/copyright.omh.
The text ends at, and does not include,
the COPYRIGHT in omh/copyright.omh
that follows the starting text.
$$
The $code command is terminated.
Note that
a new line
is not automatically included at the beginning and end
of the verbatim text when the
start
text is present.
Here is the result of the command sequence:
#
BEGIN SHORT COPYRIGHT
# ---------------------------------------------------------------------------
# OMhelp: Source Code -> Help Files: Copyright (C) 1998-2004
http://www.seanet.com/~bradbell
#
# This program 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 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# ---------------------------------------------------------------------------
# END SHORT
COPYRIGHT
Skip
If
skip
is present,
it is a positive integer that specifies the number of
start
matches to skip.
This is very useful when the verbatim command and
refers to the same file as the command is in.
The skip option can be used to skip the match on the command
and go forward to the location that you wish to display.
Example
The following command displays
the second paragraph in the copyright description.
$code
$pre
$$# This
$verbatim!copyright.omh!5!# This ! details.!1!$$
details.
$$
creates the following output
# This
program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more
details.
Tab Stops
The tabsize
command
enables you to match the indentation of the verbatim command
with one of the tabbing columns.
Input File: omh/verbatim.omh