Chapter 4. Working With Figures
Prev |  | Next

## Chapter 4. Working With Figures

The online build tools can support six image formats for use in figures. An extension (suffix) on the file name of the imported image designates the format of the image. Except for FrameMaker line art, all images must be imported by reference into a FrameMaker document, from the `print` subdirectory of your book directory.

The figures for a book are stored in the print, online, and orig directories as described in “The Figure Subdirectories”. Using the formats described in “Supported Image Formats and Naming Conventions”, the book building tools will automatically convert figures in the various directories to create a print version for use by FrameMaker and an online version for use in the HTML copy of the book.

This chapter explains how to prepare figures during the book development process. The chapter contains these sections:

- “Supported Image Formats and Naming Conventions”

- “The Figure Subdirectories”

- “About FrameMaker Art”

- “Capturing Images”

- “Processing and Importing Image Files”

- “Things to Remember About Figures”

## Supported Image Formats and Naming Conventions

The bookbuilding tools currently support the image formats listed in Table 4-1. Note in Table 4-1 that composite figures (figures containing multiple imported images in a single anchored frame) are supported for some, but not all, image formats. The standard extension for each image format and its proper subdirectory location are provided.

Table 4-1. Supported Image Formats and Naming Conventions

File Format | Ext. | Directory | Number of Files per Anchored Frame
--- | --- | --- | ---
RGB (color) | .rgb | `print` or `orig` | One or more
RGB (bw)[a] | .bw | `print` | One or more
FrameMaker line art | n/a | n/a | One or more
EPS (Encapsulated PostScript) | .eps .ai .ps | `print` | One
GIF | .gif | `online` and `print` | One
PNG | .png | `online` and `print` | One
JPG | .jpg | `online` and `print` | One
[a] These images are screen snapshots (or other RGB files) that have been converted to black and white with the `tobw` utility.

The `print` directory contains at least one image file for each figure in your book (composite figures may use more than one file). The filename for each image file in the `print` directory must end with a standard extension (or suffix) that designates the format of the image, as provided in Table 4-1.

If it is not desired to have a GIF file automatically generated for the online directory, just copy a manually created GIF file into the online directory and it will never be overwritten.

## The Figure Subdirectories

There are two image directories used to create the online book: `print`, which contains images for the hard copy book; and `online`, which contains processed images for the online book. Original image files and the components of composite figures are stored in the `print` directory. All graphics in the FrameMaker figures are imported by reference from the `print` directory. If original RGB figures are used, but a BW version is preferred for use in FrameMaker, put the RGB files in an `orig` subdirectory.

`print` |  | Place all original image files and the components of figure composites in this directory. All RGB snaps, Adobe Illustrator EPS files, and other original pieces of art belong in this directory. This directory contains all image files that will be used in the printed version of your book.
`online` |  | This directory, once you've populated it by using the `make _online` command, contains all image files that will be used in the online version of your book. Normally there's no reason to alter `online` or its contents through any means other than the make _online command.
`orig` |  | This directory is only used to contain RGB artwork which will be converted into a BW file in the print directory for use by FrameMaker and a color GIF file for the online book.

## About FrameMaker Art

The drawing tools in FrameMaker allow users to work with straight and curved lines, circles, polygons, and text. Frame artwork is PostScript-based and commonly used for simple illustrations or callouts to imported artwork.

To create FrameMaker line art:

1. Press Enter to create a new paragraph.

2. Apply the Fig paragraph tag to the paragraph.

3. Press Enter again to create a paragraph that automatically has the FigTitle paragraph tag applied to it. Type in the figure title.

4. Place the cursor in the Fig paragraph and Choose Special > Anchored Frame.

5. In the Anchored Frame dialog box, choose these settings:

   - Anchoring Position: Below Current Line

   - Alignment: Right

   - Cropped

   - Size: width = 5.375” and height = your choice (the frame can be resized once it's inserted)

6. Click New Frame.

7. Choose Graphics > Tools.

8. Use the drawing tools with a line weight of 0.5 pts. to create your simple diagram.

9. Use the A button to create a text cursor and click it in the anchored frame.

10. Choose Callout from the font catalog and type the callout.

    - Avoid using CalloutBold and CalloutSmall.

    - Do not use text boxes.

11. Select the callout using the Object Selection tool (the black arrow in the Tools GUI) and position the callout using the Ctrl and arrow keys.

## Capturing Images

It's often necessary to use screen captures as illustrations in books. There are a variety of tools available to aid you in producing screen captures; use whichever seems most appropriate to your needs.

### Tools and Where to Get Them

#### snapshot

The `snapshot` utility (`/usr/sbin/snapshot`) is part of the IRIX 6.5 and later system software, in the `eoe.sw.gltools` software subsystem. `snapshot` reads an area of the screen specified by the user and saves it to a file named `snap.rgb` in your home directory. This utility can capture an entire screen. For more information on snapshot, refer to the snapshot man page.

#### bsnap, ssnap, and winsnap

The SGI Book Building Environment includes three shell-script capture utilities, all of which can be found in `/usr/share/Insight/bin` and are part of the `insight_dev.sw.tools` subsystem. All three scripts require `/usr/sbin/scrsave` (which is part of the `eoe.sw.gltools` subsystem in the IRIX 6.5 and later distributions).

To use these tools, you must append `/usr/share/Insight/bin` to your path or PATH environment variable. This variable is initialized in your `~/.cshrc` file if you use the C shell or a shell derived from the C shell, and in your `~/.profile` file if you use the Bourne shell or a shell derived from it. Be sure to use the `rehash` command after editing your `.cshrc` file.

`bsnap` |  | Snaps a bordered image without rubber-banding and captures screen images to RGB. Allows variable time delay with the `-s` command-line option. Includes window borders by default; to avoid window borders, use the `-n` option.
`ssnap` |  | identical to `bsnap`, except that after capturing a window, it shrinks the window to 65% of its size in both horizontal and vertical directions, then brightens and sharpens the result. `ssnap` requires `/usr/sbin/izoom` and `/usr/sbin/hipass3`, both of which are part of the `eoe.sw.imagetools` subsystem.
`winsnap` |  | Has no command-line options. Doesn't capture window borders.

#### capture

In addition to these tools, if you have an Indy or O2 system you probably have the `/usr/sbin/capture` utility installed on it. `capture`, an interactive program that records digital media files, is part of the `dmedia_tools.sw.movietools` subsystem. It can capture images from an IndyCam or O2CAM, a video input, or the screen. See the `capture(1)` reference page for more information.

### Screen Capture File Names

Name your screen capture figure files descriptively, so that someone else can tell which figures go where. The filenames should end in the .rgb suffix. For example, if your book is called MyBook, and you have three figures in chapter one, you might name the figures `mybook_fig1.1.rgb`, `mybook_fig1.2.rgb`, and `mybook_fig1.3.rgb`. Or you might use descriptive names such as `01.1.sample.rgb`, `01.2.menubar.rgb`, and`01.3.dialog.rgb`.

### Screen Capture Procedure

The screen capture procedure is slightly different depending on what you want to capture: full windows, portions of windows, or pull-down menus. Note that for any of these approaches, if you want to show your screen capture against a white background, you must first place the background, then place the window you're capturing on top of that background. One way of doing this is to open a shell window with a white background:

    % xwsh -bg white

#### Screen Captures of Windows

If you want to capture an entire window, with or without its borders, use `bsnap`.

1. In a shell window, change to the directory where you are going to store the screen captures (the `orig` subdirectory of your book's working directory).

2. Decide what you're going to name the screen capture. (See “Screen Capture File Names” for some guidelines.)

3. Bring the window you want to capture to the front, leaving part of your shell window visible.

4. If you want to include the window's border (including its title bar), launch `bsnap` from the shell window:

       % bsnap filename

5. If you don't want to include the window's border, launch `bsnap` like this:

       % bsnap -n filename

6. Click anywhere in the window you wish to capture.

7. Wait a few seconds for the capture to complete.

8. Verify that the capture worked as desired:

       % ipaste filename

9. If the image isn't as you expected, repeat steps 3 through 8.

#### Screen Captures of Portions of Windows

If you only want to snap part of a window, it's best to use `snapshot`.

1. Change to the directory where you are going to store the screen captures (the `orig` subdirectory of your books' working directory).

2. Decide what you're going to name the screen capture. (See “Screen Capture File Names” for some guidelines.)

3. Bring the window you want to capture to the front, leaving part of your shell window visible.

4. Start `snapshot` from the shell window:

       % snapshot

5. Use the right mouse button in the `snapshot` window to bring up the `snapshot` menu. Select “New file name” from that menu. Enter the name you want your screen capture to have. Press Enter.

6. Move the `snapshot` window out of the way:

   - Move the cursor over the `snapshot` window.

   - Press Alt+F7.

   - Move the cursor; the `snapshot` window's outline moves with it.

   - Click the left mouse button when the window is where you want it.

7. With the cursor still in the `snapshot` window, hold down the Shift key to let `snapshot` retain keyboard and mouse focus.

8. Still holding down the Shift key, move the camera cursor into the window you want to capture.

9. Drag out a rectangle, using the left mouse button, around the portion you want to capture.

10. Move the cursor off to one side and, still keeping the Shift key depressed, use the right mouse button to bring up the `snapshot` menu. Choose “Save as filename” from that menu.

11. To make additional screen captures, repeat steps 7 through 10.

#### Screen Captures of Pull-Down or Popup Menus

Use the same procedure for pull-down menus as for complete windows, except:

- Use `bsnap -s 5` to make `bsnap` delay five seconds before beginning the capture.

- After you click in the window you're capturing from, quickly pull down the menu you want to capture. Keep it pulled down for several seconds, until `bsnap` finishes.

## Processing and Importing Image Files

All image files used in a book must be imported into a FrameMaker document from the `print` directory for a book to build successfully.

This procedure explains how to import images into FrameMaker files from `print` and how to generate and populate the `online` directory:

1. Import your image files as described in “ Figure Tags” in Appendix A. See Table 4-1 for filename extensions.

   Open each FrameMaker file that should contain imported images. The method that you use to import the image files depends on the current importing settings in the document files:

   - If your FrameMaker files do not specify `print` as the location of imported image files, the FrameMaker application warns that it can't import the files. To continue, specify the `print` directory as the new location of your image files.

   - If your FrameMaker files specify `online` as the location of the imported image files, the FrameMaker application does not issue a warning; it opens the files, importing images from the `online` directory. In this case, you must re-import all of the image files, specifying the `print` directory as the image file location.

2. If you've already copied the `Makefile` template to your local working directory, skip to step 3. If you haven't already done this, do it now:

       % cp /usr/share/Insight/templates/make/Makefile_sgidocbk Makefile

   (for books to be built using the SGIDOCBK DTD)

   or

       % cp /usr/share/Insight/templates/make/Makefile_sgmldoc Makefile

   (for books to be built using the SGIDOC DTD)

   | Note: The functionality of the two DTDs is essentially the same; the online appearance is different, however, especially for character tags. Before converting all your bookbuilding to the new SGIDOCBK DTD, you'll want to perform a sample bookbuild and view it in a web browser to ensure its online appearance more closely matches your company's style guide than the appearance created by SGIDOC.

   | Note: If you need to build books for the SJIS Japanese locale or any Chinese or Korean languages and locales, you must use the SGIDOCBK DTD.

   The `Makefile` file specifies information about your book to the build tools. It contains variables that you must set and instructions for how to set them. See “Editing the Makefile” in Chapter 5 for additional information.

3. Change write permissions on your copy of the `Makefile` file.

       % chmod 664 Makefile

4. Edit the `Makefile` template.

       % vi Makefile

   (You can use a different text editor, such as `emacs` or `nedit`, if you prefer. If you use FrameMaker to edit this file, be sure you save as text when you're done editing.) At this point you can also set the other variables, such as TITLE and BOOK_FILES, if you wish.

5. Execute the `make _online` command:

       % make _online

   The `make _online` command creates an `online` directory and generates online versions of the graphic formats as needed.

## Things to Remember About Figures

For your book to build properly (without errors) you must follow all the rules in this list:

- Import all images by reference from the `print` directory. When you build your book, the online tools automatically grab the corresponding images from the `online` directory for online display.

- Import each image into an anchored frame. For figures that appear within normal page boundaries, the frame must be anchored to an empty paragraph (blank line) that is tagged with the Fig paragraph tag.

- In order for a figure title to appear in the “List of Figures”, the Fig paragraph tag must be followed by FigTitle paragraph tag.

For all image formats except black/white RGB, color palette information remains unchanged during image file processing. This means that a black and white original produces a black and white figure, and a color original produces a color figure.

For the black/white RGB format, color palette information is reduced to black and white during processing. This means that both black and white and color originals produce black and white figures.

Prev | Table of Contents | Next
Chapter 3. Using FrameMaker Files and Template Features |  | Chapter 5. Building Online Books