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: Tak Nikozshura
Country: Zimbabwe
Language: English (Spanish)
Genre: Life
Published (Last): 5 November 2006
Pages: 213
PDF File Size: 20.52 Mb
ePub File Size: 5.79 Mb
ISBN: 736-3-83083-463-8
Downloads: 49436
Price: Free* [*Free Regsitration Required]
Uploader: Yokinos

DocBook mediaobject – Complete documentation and samples

If you do not use the role attribute to select from among several imageobject elements, then mediaobjdct stylesheets will try to make a choice based on file format. But the first thing you must do is decide which elements will hold your graphics. The automatic selection behavior is controlled by the use.

The mediaobject element contains two graphical elements. Then you pass the selected role value in a command line parameter docook preferred.

If its imagedata element contains a complete SVG graphic and the parameter use. 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.

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

A mediaobject element is mediaonject container for one or more imageobject elements, each of which has an imagedata element. If you are using XEP, then set the parameter preferred.

For cross referencing purposes, put the id attribute on the mediaobject container, unless you are putting that inside another container such as figure. If that is not desirable, then add the changes to the figure. It can contain several imageobject elements kediaobject different specifications. If all of these tests fail on the first imageobjectit repeats them on subsequent objects until it finds an acceptable one. Because imageobject can also contain an objectinfo element.


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. It looks at the first imageobject inside the mediaobject. The same is true for informal. If two objects are acceptable, only the first can ever be selected with this method.

The original graphic element is simple, but not flexible enough to handle multiple output formats. 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. You could also put sizing attributes there.

The most frequent problems are matching graphics file formats to document output format, and sizing graphics. If it does not have a format attribute, it extracts the filename extension dicbook the fileref attribute. You might set the role values for two different vector graphics to fo-fop and fo-xep.

You can also use figure and informalfigure to add space above and below your graphic in print output. Each of these main graphic elements is supplemented with a version to be used inline, named inlinegraphic and inlinemediaobjectrespectively. You might be wondering why the imagedata element needs an imageobject container?

DocBook has two main graphic elements. If you need to use more than one graphics file format, then you must use the mediaobject element instead of the graphic element. Remember that the role attribute goes on the imageobject element, not the imagedata. These attributes let you indicate that the figure can float to the top, left, or right. The start-indent property is controlled by the attribute-set named pgwide.


Element mediaobject

If that value is on the list of extensions for that output, then it accepts that object and does not consider any others. 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 doocbook different formats of the same illustration, with the idea that only one of mediaogject at a time will be used by the stylesheet. You can turn that behavior off if you set the parameter to zero. Each imagedata element indicates its file name and format. This selection method is often sufficient, but is somewhat less precise than selecting by role. The following attribute sets provide the spacing in the stylesheet, which you can adjust in your customization layer:.

If it is nonzero, then mefiaobject role attribute is considered during the selection process. Although informalfigure does not take a title, they both provide additional attributes for handling your graphics:.

You can also wrap your mediaobject element inside a figure or informalfigure element. Other stylesheet customizations such as Website or your own will use the value for the stock stylesheet it is based upon.