]> git.evergreen-ils.org Git - working/Evergreen.git/blob - style_guide/image.xml
Add participants in about this document.
[working/Evergreen.git] / style_guide / image.xml
1 <?xml version="1.0" encoding="utf-8"?>\r
2 <chapter xml:id="style-image" xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="EN"\r
3     xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink">\r
4 \r
5     <info>\r
6         <title>Image Formatting</title>\r
7     </info>\r
8 \r
9     <itemizedlist>\r
10         <listitem>\r
11             <para>.png is the preferred image format, though .jpg from legacy conversions are\r
12                 acceptable</para>\r
13         </listitem>\r
14         <listitem>\r
15             <para>Images are stored in <emphasis>media</emphasis> directories for each <markup\r
16                     linkend="part">part</markup>.</para>\r
17         </listitem>\r
18         <listitem>\r
19             <para>Images up to 900px wide can be displayed without resizing. Images larger than\r
20                 900px are scaled down with the <emphasis>scalefit="1"</emphasis> attribute as shown\r
21                 below.</para>\r
22         </listitem>\r
23         <listitem>\r
24             <para>When scaling DocBook uses both the size (pixels) and resolution (dpi or pixels/in)\r
25                 of image files. Source images should be at 96dpi, a default chosen to match legacy\r
26                 images. 96dpi seems to be standard in FullShot; if using Gimp change the default for\r
27                 new images from 72 pixels/in to 96 pixels/in under <menuchoice>\r
28                     <guimenu>File</guimenu>\r
29                     <guisubmenu>Preferences</guisubmenu>\r
30                     <guimenuitem>Default Image</guimenuitem>\r
31                 </menuchoice></para>\r
32         </listitem>\r
33     </itemizedlist>\r
34 \r
35     <simplesect>\r
36         <title>Images 900px wide or less</title>\r
37         <para>If the source image is 900px wide or less use the following code</para>\r
38         <programlisting><![CDATA[ \r
39     <mediaobject>\r
40         <alt>OPTIONAL DESCRIPTION OF IMAGE</alt>\r
41         <imageobject>\r
42             <imagedata scalefit="0" fileref="media/FILENAME.png"/>\r
43         </imageobject>\r
44     </mediaobject>]]>\r
45     </programlisting>\r
46 \r
47         <para>In HTML output, the image will display at actual size; in PDF it will be scaled down\r
48             to 75% (scale percentage set in\r
49             <emphasis>~/stylesheets/sitka_fo_graphics.xsl</emphasis>). </para>\r
50     </simplesect>\r
51 \r
52 \r
53     <simplesect>\r
54         <title>Images wider than 900px</title>\r
55         <para>If the source image is wider than 900px use the following code</para>\r
56         <programlisting><![CDATA[ \r
57     <mediaobject>\r
58         <alt>OPTIONAL DESCRIPTION OF IMAGE</alt>\r
59         <imageobject>\r
60             <imagedata width="100%" scalefit="1" fileref="media/FILENAME.png"/>\r
61         </imageobject>\r
62     </mediaobject>]]>\r
63         </programlisting>\r
64 \r
65         <para>In HTML the image will scale down to 900px width\r
66                 (<emphasis>default.image.width</emphasis> setting in\r
67                 <emphasis>~/stylesheets/sitka_xhtml.xsl</emphasis>). In PDF it will scale down to\r
68             page width. </para>\r
69 \r
70         <tip>\r
71             <para>Wrap the <emphasis>mediaobject</emphasis> tag in a <emphasis>para</emphasis> to\r
72                 add a small space between the image and preceding content.</para>\r
73         </tip>\r
74     </simplesect>\r
75 \r
76     <simplesect>\r
77         <title>Keeping image and text together</title>\r
78         <para>Content wrapped in any formal or informal object (eg <emphasis>informalfigure,\r
79                 formalfigure, informalexample, formalexample</emphasis>) is kept together on the\r
80             same page in pdf output. Use <emphasis>informalfigure</emphasis> to keep an image with\r
81             associated text, as in this example of a <emphasis>step</emphasis>:.</para>\r
82         <programlisting><![CDATA[ \r
83     <step>   \r
84        <informalfigure>\r
85           <para>STEP TEXT HERE</para>\r
86           <para>\r
87              <mediaobject>\r
88                 <alt>OPTIONAL DESCRIPTION OF IMAGE</alt>\r
89                 <imageobject>\r
90                    <imagedata width="100%" scalefit="1" fileref="media/FILENAME.png"/>\r
91                 </imageobject>\r
92              </mediaobject>\r
93           </para>\r
94        </informalfigure>\r
95     </step>]]>\r
96         </programlisting>\r
97 \r
98         \r
99 \r
100     </simplesect>\r
101 \r
102 \r
103 \r
104 </chapter>\r