The following is an example of a mediaobject set up for both HTML and FO outputs. The DocBook stylesheets can automatically select the right graphic if the. In DocBook V, three types of external objects are defined: VideoObjects, AudioObjects, and ImageObjects. Additional textual descriptions may be provided. version, [], xsd:anySimpleType, Specifies the DocBook version of the element and its descendants, from group utes ยท xml:lang, [].

Author: Nejas Terr
Country: Switzerland
Language: English (Spanish)
Genre: Science
Published (Last): 13 December 2014
Pages: 38
PDF File Size: 3.6 Mb
ePub File Size: 11.87 Mb
ISBN: 889-7-36228-906-4
Downloads: 17746
Price: Free* [*Free Regsitration Required]
Uploader: Doukazahn

With figureyou can supply a title, and your figures will be numbered and listed in the optional front-of-the-book List of Figures.

Stylesheet’s selection process

The same is true for informal. The stylesheet odcbook then choose the appropriate object for a given output. If its imagedata element contains a complete SVG graphic and the parameter use.

If you need to use more than one graphics file format, then you must use the mediaobject element instead of the graphic element. If that value is on the list of extensions for that output, then it accepts that object and does not consider any others.

Element mediaobject

The original graphic element is simple, but not flexible enough to handle multiple output formats. If you are processing with the FOP processor, then set meduaobject parameter preferred. If you use example or informalexamplethen you can use the example.

You might set the role values for two different vector graphics to fo-fop and fo-xep. The automatic selection behavior is controlled by the use. For example, if you have a choice of XSL-FO processors, then you could designate a graphic format optimized for each one. Remember that the role attribute goes on the imageobject element, not the imagedata. DocBook has two main graphic elements. This selection method is often sufficient, but is somewhat less precise than selecting by role.


A mediaobject element is a container for one or more imageobject elements, each of which has an imagedata element. The preferred element for graphics is mediaobject. If that is not desirable, then add the changes to the figure. If two objects are acceptable, only the first can ever be selected with this method.

If your print content is styled so that headings are at the left margin and body text is indented, then setting this attribute to 1 lets you indicate that the figure is wide and should be positioned starting at the left margin.

You can turn that behavior off if you set the parameter to zero. The following attribute sets provide the spacing in the stylesheet, which you can adjust in your customization layer:. Although informalfigure does not take a title, they both provide additional attributes for handling your graphics:. It looks at the first imageobject inside the mediaobject. That element can be used to track information about the image, such as the software that created it, the current revision, the author, etc.

The DocBook stylesheets can automatically select the right graphic if the imageobject elements have a role attribute of either html or fo. Usually, the various images in a mediaobject are different formats of the same illustration, with the idea that only one of them at a time will be used by the stylesheet.

If so, then it accepts that object and does not consider any others. Graphics are a frequent cause of problems in DocBook documents.

You could also put sizing attributes there. You could use profiling to select from among several graphic elements, but mediaobject is designed to do it without the need for the profiling step. Then you pass the selected role value in a command line parameter named preferred.


Chapter Graphics

If it is nonzero, then the role attribute is considered during the selection process. It can contain several imageobject elements with different specifications.

For mediaobiect referencing purposes, put the id attribute on the mediaobject container, unless you are putting that inside another container such as figure. You can also use figure and informalfigure to add space above and below your graphic in print docboom. You can also wrap your mediaobject element inside a figure or informalfigure element. When you process this example with the html stylesheet, you get the PNG graphic, and when you process it with the FO stylesheet, you get the PDF graphic.

Mmediaobject all of these tests fail on the first imageobjectit repeats them on subsequent objects until it finds an acceptable one.

If the fileref does not have an extension, it checks the graphic. Because imageobject can also contain an objectinfo element. If you want finer control, then you have the option to use any role values you want. If you do not use the role attribute to select from among several imageobject elements, mediaobjecg the stylesheets will try to make a choice based on file format.

If its imagedata element does not contain an SVG graphic, but has a format attribute, it checks to see if its value is on the format list for that output.