Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Help System Developer's Guide > Chapter 3 Writing a Help Topic

Displaying Graphics

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

HP Help supports four graphics formats:

  • Tagged Image File Format (TIFF) -- Color, grayscale, and black and white images created by many standard drawing and scanning applications (filename.tif).

  • X Window Dump -- Screen dumps from the X Window System created with the xwd utility (filename.xwd).

  • X Pixmap -- Color icon images (filename.pm).

  • X Bitmap -- Two-color icon images (filename.bm).

Each graphic is maintained as a separate file. The file format is determined using the filename extensions listed above.

To create a figure

  1. Declare a file entity to identify the image file to be included in the figure.

       <!entity graphic-entity  FILE "filename.ext">
    

    Remember, all entity declarations must come before any other markup at the top of your help volume.

  2. Use the <figure> element as shown:

       <figure entity=graphic-entity>
    
       caption string
    
       <\figure>
    

    Where graphic-entity is the entity name for the graphic file you want to display, and caption string is an optional string to be displayed above the graphic.

By default, figures are numbered and the number is prepended to your caption string. To create a non-numbered figure, include the nonumber parameter (as shown in one of the following examples).

If you want the figure to be a hyperlink, use the the ghyperlink (graphic hyperlink) and glinktype (graphic link type) parameters as shown:

   <figure entity=graphic-entity ghyperlink="id" glinktype=type>

   caption string

   <\figure>

The ghyperlink and glinktype parameters work just like the hyperlink and type parameters for the <link> element.

Examples. For these examples, assume that you've declared these two file entities at the top of your help volume:

   <!entity FirstPicture   FILE  "first.tif">

   <!entity SecondPicture  FILE  "second.pm">

The following figure displays the graphic in the first.tif file and displays a number (by default) and caption:

   <figure entity=FirstPicture>

   Here's the First Picture

   <\figure>

Here's a figure that displays the second.pm file without a number or a caption:

   <figure nonumber entity=SecondPicture>

   <\figure>

If you add an ID to a figure, you must have a caption. The caption is needed in case an <xref> uses the figure's ID, in which case the caption is inserted in place of the <xref> and becomes a hyperlink to the figure.

The following figure is an execution hyperlink that runs the xclock program:

   <figure entity=SecondPicture ghyperlink="xclock &" glinktype=execute>

   Choose This Figure to Start the Clock

   <\figure>

See Also. 

To display an inline graphic

  1. Declare a file entity to identify the image file to be used in the figure.

       <!entity graphic-entity  FILE "filename.ext">
    

    Remember, all entity declarations must come before any other markup at the top of your help volume.

  2. Use the <graphic> element as shown:

       ... text <graphic entity=graphic-entity> text ...
    

    Where graphic-entity is the entity name for the graphic file you want to display.

To use a graphic as a hyperlink, place it inside a <link> element:

   <link parameters><graphic entity=graphic-entity><\link>
NOTE: The <graphic> element is intended for small graphics. Larger images may overlap the text on the preceding line.

Example. Here's an example that uses a small X pixmap image in the middle of a sentence. First, at the top of the volume, the pixmap file must be declared as a file entity:

   <!entity SmallStopSign  FILE "stopsign.pm">

Within the help text, the image is inserted using the <graphic> element:

   Whenever you see the <graphic entity=SmallStopSign> symbol, 

   stop and think about what you are doing.

To wrap text around a graphic

  1. Declare a file entity to identify the image file to be included with the paragraph.

       <!entity graphic-entity  FILE "filename.ext">
    

    Remember, all entity declarations must come before any other markup at the top of your help volume.

  2. Use the <p> element (paragraph) with the gentity parameter as shown:

       <p gentity=graphic-entity>Paragraph text here ...
    

    Where graphic-entity is an entity name that refers to the graphic file you want inserted.

Example. Suppose you want to display an icon named sample.pm and wrap paragraph text around it. First, declare the file entity:

   <!entity sample-multicolor-icon  FILE "sample.pm">

Then, enter the paragraph:

   <p gentity=sample-multicolor-icon>Many HP VUE components 

   support multicolor icons, in addition to the two-color 

   images used in previous versions of HP VUE.  

To right-justify the graphic, add the gposition parameter like this:

   <p gentity=sample-multicolor-icon gposition=right>Many 

   HP VUE components support multicolor icons, in addition 

   to the two-color images used in previous versions of HP VUE.

Here's the markup for a paragraph wrapped around an icon, where the icon is a hyperlink that displays a topic with the ID icon-editor in a new window:

   <p gentity=my-icon ghyperlink="icon-editor" 

   glinktype=JumpNewView>Many HP VUE components support 

   multicolor icons, in addition to the two-color images 

   used in previous versions of HP VUE.  

See Also. 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1988 Hewlett-Packard Development Company, L.P.