Prev Next

An Example Using Images

image, icon
The image and icon commands are used to display images.

Execute The Following Steps

pre_example.omh
Use an editor of your choice to create the file image_example.omh in the test directory with the following contents:
     
$begin
image_example$$
     $section An Image Example$$
     
     $image w3c_home.gif$$
     
     
     $head Discussion$$
     As you can see above, the $code image$$ command
     displays an image centered and by itself.
     As you can see in this sentence,
     the $code icon$$ command
     $icon w3c_home.gif$$
     displays an image in line with the nearby text.
     
     $end
Note that you can copy and paste the commands above to your editor window. You may just copy the file with the same name from the getting started directory .

W3c_home.gif
Copy the file
http://www.w3.org/TR/1998/REC-html40-19980424/images/w3c_home.gif
to the file w3c_home.gif in the test directory You may just copy the file with the same name from the getting started directory .

Example In This Web Site Context
You can view the result of making image_example.omh part of the OMhelp help web site by selecting image_example .

Execute OMhelp
In a command window and in the htm directory execute the following command
 
     omhelp ../image_example.omh -noframe

Example by Itself
Use a web browser of your choosing to view the file test/htm/image_example.htm .
Input File: getstarted/start_image.omh