The translation is temporarily closed for contributions due to maintenance, please come back later.


(itstool) path: sect2/para (itstool) path: question/para
Context English Spanish State
When images are stored in a subdirectory of the main document directory, the subdirectory name must be included in their paths in the <filename>Makefile</filename> and the <tag>imagedata</tag> element.
In a subdirectory of <filename>doc/share/images</filename> named after the document. For example, images for the Handbook are stored in <filename>doc/share/images/books/handbook</filename>. Images that work for multiple translations are stored in this upper level of the documentation file tree. Generally, these are images that can be used unchanged in non-English translations of the document.
Image Markup
Images are included as part of a <tag>mediaobject</tag>. The <tag>mediaobject</tag> can contain other, more specific objects. We are concerned with two, the <tag>imageobject</tag> and the <tag>textobject</tag>.
Include one <tag>imageobject</tag>, and two <tag>textobject</tag> elements. The <tag>imageobject</tag> will point to the name of the image file without the extension. The <tag>textobject</tag> elements contain information that will be presented to the user as well as, or instead of, the image itself.
Text elements are shown to the reader in several situations. When the document is viewed in <acronym>HTML</acronym>, text elements are shown while the image is loading, or if the mouse pointer is hovered over the image, or if a text-only browser is being used. In formats like plain text where graphics are not possible, the text elements are shown instead of the graphical ones.
This example shows how to include an image called <filename>fig1.png</filename> in a document. The image is a rectangle with an A inside it:
<tag class="starttag">mediaobject</tag>
<tag class="starttag">imageobject</tag>
<tag class="emptytag">imagedata fileref="fig1"</tag> <co xml:id="co-image-ext"/>
<tag class="endtag">imageobject</tag>

<tag class="starttag">textobject</tag>
<tag class="starttag">literallayout class="monospaced"</tag>+---------------+ <co xml:id="co-image-literal"/>
| A |
+---------------+<tag class="endtag">literallayout</tag>
<tag class="endtag">textobject</tag>

<tag class="starttag">textobject</tag>
<tag class="starttag">phrase</tag>A picture<tag class="endtag">phrase</tag> <co xml:id="co-image-phrase"/>
<tag class="endtag">textobject</tag>
<tag class="endtag">mediaobject</tag>
Include an <tag>imagedata</tag> element inside the <tag>imageobject</tag> element. The <literal>fileref</literal> attribute should contain the filename of the image to include, without the extension. The stylesheets will work out which extension should be added to the filename automatically.
The first <tag>textobject</tag> contains a <tag>literallayout</tag> element, where the <literal>class</literal> attribute is set to <literal>monospaced</literal>. This is an opportunity to demonstrate <acronym>ASCII</acronym> art skills. This content will be used if the document is converted to plain text.
Notice how the first and last lines of the content of the <tag>literallayout</tag> element butt up next to the element's tags. This ensures no extraneous white space is included.
The second <tag>textobject</tag> contains a single <tag>phrase</tag> element. The contents of this phrase will become the <literal>alt</literal> attribute for the image when this document is converted to <acronym>HTML</acronym>.
Image <filename>Makefile</filename> Entries
Images must be listed in the <filename>Makefile</filename> in the <varname>IMAGES</varname> variable. This variable must contain the names of all the <emphasis>source</emphasis> images. For example, if there are three figures, <filename>fig1.eps</filename>, <filename>fig2.png</filename>, <filename>fig3.png</filename>, then the <filename>Makefile</filename> should have lines like this in it.

IMAGES= fig1.eps fig2.png fig3.png

IMAGES= fig1.eps
IMAGES+= fig2.png
IMAGES+= fig3.png
Again, the <filename>Makefile</filename> will work out the complete list of images it needs to build the source document, you only need to list the image files <emphasis>you</emphasis> provided.
Images and Chapters in Subdirectories
Be careful when separating documentation into smaller files in different directories (see <xref linkend="xml-primer-include-using-gen-entities"/>).
Suppose there is a book with three chapters, and the chapters are stored in their own directories, called <filename>chapter1/chapter.xml</filename>, <filename>chapter2/chapter.xml</filename>, and <filename>chapter3/chapter.xml</filename>. If each chapter has images associated with it, place those images in each chapter's subdirectory (<filename>chapter1/</filename>, <filename>chapter2/</filename>, and <filename>chapter3/</filename>).
However, doing this requires including the directory names in the <varname>IMAGES</varname> variable in the <filename>Makefile</filename>, <emphasis>and</emphasis> including the directory name in the <tag>imagedata</tag> element in the document.
For example, if the book has <filename>chapter1/fig1.png</filename>, then <filename>chapter1/chapter.xml</filename> should contain:
<tag class="starttag">mediaobject</tag>
<tag class="starttag">imageobject</tag>
<tag class="emptytag">imagedata fileref="chapter1/fig1"</tag> <co xml:id="co-image-dir"/>
<tag class="endtag">imageobject</tag>

<tag class="endtag">mediaobject</tag>
The directory name must be included in the <literal>fileref</literal> attribute.
The <filename>Makefile</filename> must contain:

IMAGES= chapter1/fig1.png
Links are also in-line elements. To show a <acronym>URI</acronym> without creating a link, see <xref linkend="docbook-markup-uri"/>.
<literal>xml:id</literal> Attributes
Most DocBook elements accept an <literal>xml:id</literal> attribute to give that part of the document a unique name. The <literal>xml:id</literal> can be used as a target for a crossreference or link.
Any portion of the document that will be a link target must have an <literal>xml:id</literal> attribute. Assigning an <literal>xml:id</literal> to all chapters and sections, even if there are no current plans to link to them, is a good idea. These <literal>xml:id</literal>s can be used as unique reference points by anyone referring to the <acronym>HTML</acronym> version of the document.
Component Translation Difference to current string
This translation Not translated FreeBSD Doc (Archived)/books_fdp-primer
The following strings have the same context and source.
Translated FreeBSD Doc (Archived)/articles_contributing o
Not translated FreeBSD Doc (Archived)/books_handbook
Translated FreeBSD Doc (Archived)/books_porters-handbook o
Translated FreeBSD Doc (Archived)/books_developers-handbook o
Translated FreeBSD Doc (Archived)/articles_new-users o
Not translated FreeBSD Doc (Archived)/books_arch-handbook


No matching activity found.

Browse all component changes


English Spanish
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect2/para (itstool) path: question/para
Source string location
book.translate.xml:6508 book.translate.xml:7098
String age
2 months ago
Source string age
a year ago
Translation file
books/es/fdp-primer.po, string 1064