Changeset 3348


Ignore:
Timestamp:
May 16, 2007, 2:36:19 PM (14 years ago)
Author:
Nicklas Nordborg
Message:

Updated documentation about how to add screenshots

Location:
trunk/doc/src/docbook
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/src/docbook/developerdoc/write_docbook_doc.xml

    r3306 r3348  
    897897              <imageobject>
    898898                <imagedata
    899                   contentwidth="7cm"
    900                   width="7cm"
     899                  scalefit="1"
     900                  width="100%"
    901901                  fileref="figures/menuchoice.png" format="PNG"
    902902                />
     
    932932        Images and figures are normally implemented like the following example. The
    933933        image-file must be located in
    934         <filename class="directory">doc/src/docbook/figures</filename>
    935         ,otherwise the image won't be visible in the generated output files.
     934        <filename class="directory">doc/src/docbook/figures</filename>,
     935        otherwise the image won't be visible in the generated output files.
    936936      </para>
    937937      <warning>
    938938        <para>
    939           Images in the pdf-output are, unlike images in html-output, not scaled and can
    940           therefore be out of proportion in the document. Avoid this by e.g. setting the
    941           attributes
    942           <sgmltag class="attribute">contentwidth</sgmltag>
    943           and
    944           <sgmltag class="attribute">width</sgmltag>
    945           in
    946           <sgmltag>imagedata</sgmltag>
    947           to appropriate values.
     939          When using images in docbook you will always have problems with scaling.
     940          Since we are generating output for both HTML and PDF it is even worse.
     941          What we have found to work is this:
     942         
     943          <itemizedlist>
     944          <listitem>
     945            <para>
     946            Scaling in HTML has been disabled. The images will always be the
     947            same size as they actually are. Please, don't make the screenshots
     948            too wide!
     949            </para>
     950          </listitem>
     951         
     952          <listitem>
     953            <para>
     954            For small images, less than the width of the PDF page,
     955            do not specify scaling factors or widths. We have configured PDF to
     956            use 96dpi instead of 72dpi, so the images will appear almost
     957            exactly as they do in the HTML version.
     958            </para>
     959          </listitem>
     960         
     961          <listitem>
     962            <para>
     963            Images that are wider than the PDF page will be clipped. To
     964            prevent this you must add the following attributes to the
     965            <sgmltag class="starttag">imagedata</sgmltag> tag:
     966            <code>scalefit="1" width="100%"</code>
     967            </para>
     968          </listitem>
     969         
     970          <listitem>
     971            <para>
     972            If you still need to scale the image differently in the PDF use
     973            the <sgmltag>width</sgmltag> and <sgmltag>depth</sgmltag>
     974            attributes.
     975            </para>
     976          </listitem>
     977          </itemizedlist>
    948978        </para>
    949979      </warning>
     
    951981        <title>Screen-shot in the documentation</title>
    952982        <para>
    953           <xref linkend="write_docbook_doc.figures.menuchoice" />
     983          <xref linkend="webclient.figures.homepage" />
    954984          is implemented with the following code
    955985        </para>
    956986        <programlisting>
    957987&lt;figure id="write_docbook_doc.figures.menuchoice"&gt;
    958   &lt;title&gt;Menu choice&lt;/title&gt;
    959   &lt;screenshot&gt;
    960     &lt;mediaobject&gt;
    961       &lt;imageobject&gt;
    962         &lt;imagedata
    963           contentwidth="7cm"
    964           width="7cm"
    965           fileref="figures/menuchoice.png" format="PNG"
    966         /&gt;
    967       &lt;/imageobject&gt;
    968     &lt;/mediaobject&gt;
    969   &lt;/screenshot&gt;
     988  &lt;title&gt;The home page&lt;/title&gt;
     989  &lt;screenshot&gt;
     990    &lt;mediaobject&gt;
     991      &lt;imageobject&gt;
     992        &lt;imagedata
     993          scalefit="1"
     994          width="100%"
     995          fileref="figures/homapage.png" format="PNG"
     996        /&gt;
     997      &lt;/imageobject&gt;
     998    &lt;/mediaobject&gt;
     999  &lt;/screenshot&gt;
    9701000&lt;/figure&gt;
    9711001        </programlisting>
  • trunk/doc/src/docbook/userdoc/webclient.xml

    r3346 r3348  
    107107          <mediaobject>
    108108            <imageobject><imagedata fileref="figures/homepage.png" format="PNG"
    109               scalefit="1" width="100%" contentdepth="100%"/></imageobject>
     109              scalefit="1" width="100%"/></imageobject>
    110110          </mediaobject>
    111111        </screenshot>
     
    204204            <inlinemediaobject>
    205205            <imageobject><imagedata fileref="figures/refresh.gif" format="GIF" align="left"
    206               scalefit="1" width="100%" contentwidth="100%"/></imageobject>
     206              /></imageobject>
    207207            </inlinemediaobject>
    208208            Refresh page
     
    10121012            <imageobject>
    10131013              <imagedata fileref="figures/set_permissions.png" format="PNG"
    1014                 scalefit="1" width="100%" contentdepth="100%" />
     1014                scalefit="1" width="100%" />
    10151015            </imageobject>
    10161016          </mediaobject>
     
    11931193          <mediaobject>
    11941194            <imageobject><imagedata fileref="figures/listpage.png" format="PNG"
    1195               scalefit="1" width="100%" contentdepth="100%" /></imageobject>
     1195              scalefit="1" width="100%" /></imageobject>
    11961196          </mediaobject>
    11971197        </screenshot>
     
    13691369          <mediaobject>
    13701370            <imageobject>
    1371               <imagedata contentwidth="10cm" width="10cm"  fileref="figures/configure_columns.png" format="PNG"/>
     1371              <imagedata fileref="figures/configure_columns.png" format="PNG"/>
    13721372            </imageobject>
    13731373          </mediaobject>
     
    15711571            <screenshot>
    15721572              <mediaobject>
    1573                 <imageobject><imagedata contentwidth="10cm" width="10cm" fileref="figures/save_preset.png" format="PNG" /></imageobject>
     1573                <imageobject><imagedata fileref="figures/save_preset.png" format="PNG" /></imageobject>
    15741574              </mediaobject>
    15751575            </screenshot>
     
    16411641            <screenshot>
    16421642              <mediaobject>
    1643                 <imageobject><imagedata contentwidth="7cm" width="7cm" fileref="figures/manage_presets.png" format="PNG" /></imageobject>
     1643                <imageobject><imagedata fileref="figures/manage_presets.png" format="PNG" /></imageobject>
    16441644              </mediaobject>
    16451645            </screenshot>
Note: See TracChangeset for help on using the changeset viewer.