nominal.image.width.xml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <refentry xmlns="http://docbook.org/ns/docbook"
  2. xmlns:xlink="http://www.w3.org/1999/xlink"
  3. xmlns:xi="http://www.w3.org/2001/XInclude"
  4. xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
  5. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  6. version="5.0" xml:id="nominal.image.width">
  7. <refmeta>
  8. <refentrytitle>nominal.image.width</refentrytitle>
  9. <refmiscinfo class="other" otherclass="datatype">length</refmiscinfo>
  10. </refmeta>
  11. <refnamediv>
  12. <refname>nominal.image.width</refname>
  13. <refpurpose>The nominal image width</refpurpose>
  14. </refnamediv>
  15. <refsynopsisdiv>
  16. <src:fragment xml:id="nominal.image.width.frag">
  17. <xsl:param name="nominal.image.width" select="6 * $pixels.per.inch"/>
  18. </src:fragment>
  19. </refsynopsisdiv>
  20. <refsection><info><title>Description</title></info>
  21. <para>Graphic widths expressed as a percentage are problematic. In the
  22. following discussion, we speak of width and contentwidth, but
  23. the same issues apply to depth and contentdepth.</para>
  24. <para>A width of 50% means "half of the available space for the image."
  25. That's fine. But note that in HTML, this is a dynamic property and
  26. the image size will vary if the browser window is resized.</para>
  27. <para>A contentwidth of 50% means "half of the actual image width".
  28. But what does that mean if the stylesheets cannot assess the image's
  29. actual size? Treating this as a width of 50% is one possibility, but
  30. it produces behavior (dynamic scaling) that seems entirely out of
  31. character with the meaning.</para>
  32. <para>Instead, the stylesheets define a
  33. <parameter>nominal.image.width</parameter> and convert percentages to
  34. actual values based on that nominal size.</para>
  35. </refsection>
  36. </refentry>