XML.com: XML From the Inside Out
oreilly.comSafari Bookshelf.Conferences.

advertisement

Getting Productive with XMLMind
Pages: 1, 2, 3, 4, 5, 6, 7, 8

Figures and Screenshots

Figures are similar to tables. There are a few guidelines for figures and images when working with the DocBook format. Not all output media are equal, so do keep that in mind. The guidelines presented here are aimed primarily at building downloadable PDF files, so the size and file formats you encounter may vary.

We've found the best (read most consistent and easiest to both create and publish) image format to be PNG, full color. While your publishing medium may need other formats, consider PNG for all your screenshots. O'Reilly authors should definitely use PNG for all graphics.

NOTE: For O'Reilly authors: Image files themselves should be in a figs folder which is kept in the same directory as your book.xml file. This will be required down the road by the PDF processing software.

There's a button on the main tool bar that makes it easy to insert a figure. It's the button with the three geometric shapes and the tool tip reads Add Image.

figure

For formal figures and screen shots (those that are numbered or are meant to be cross-referenced), type in a good caption for the figure, but don't include any numbering scheme; that should be handled in your stylesheet during output processing. As for the difference between figures and screenshots, we never got direct advice on this. We use the figure choice for figures we build in Illustrator or OmniGraffle, figure(screenshot) for actual screen shots that we want to be able to cross-reference, and screenshot for informal drop-in images that do not have cross-references or captions. These both produce a spot for a graphic file and a caption, but it seems likely the stylesheet author would appreciate having the ability to differentiate between the two cases during output processing.

All screen shot variations come with a separate info line (the empty light blue line in the screen shot below). You can fill in details of the screen shot there if you like, but we've never found a good, explainable use for that line. We certainly add captions to figures, but for the screenshot info line, we usually just select it in the element path and delete it. Once you have added your info or removed it altogether, double-click on the multicolored image to start the file selection process.

figure

You should now see a dialog devoted to filling in the fileref attribute (you'd normally do this in a more manual way via the Attributes tool on the right). You can type in the (relative) path to your file, but the easiest way to fill in that value is to click on the little open folder icon (highlighted below) and select your image using a normal file selection dialog.

figure

If you simply click once on the Unknown format icon, you can still supply a fileref by using the Attributes tool as usual. A similar file chooser dialog is available at any point from this tool as well, assuming you've properly chosen the figure's imagedata element and are editing its fileref attribute, as shown below.

figure

As with tables, you can also create formal figures if you need a caption or the ability to cross-reference. Be sure to set the figure's top-level id attribute, as discussed in Tables previously. Figure 3 shows a formal image with a caption just for reference.

A sample Rails deployment environment

Figure 3. A sample Rails deployment environment

The two other attributes and values to set for your figures are:

  • scalefit: 1
  • width: 5in (or whatever size is dictated by your publishing format; this example is for an O'Reilly Shortcut)

Pages: 1, 2, 3, 4, 5, 6, 7, 8

Next Pagearrow