$v:unit-scale

$v:unit-scale — List of known measurement units and their sizes.

Variable:
{http://docbook.org/ns/docbook/variables}unit-scale
Defined in:
modules/units.xsl
Used in:
modules/units.xsl
Used by:

Synopsis

   |<xsl:variable name="v:unit-scale"
   |               as="map(*)">
   |   <xsl:map>
   |      <xsl:map-entry key="'px'" select="1.0"/>
   |      <xsl:map-entry key="'in'" select="$pixels-per-inch"/>
   |      <xsl:map-entry key="'m'" select="$pixels-per-inch div 2.54 * 100.0"/>
   |      <xsl:map-entry key="'cm'" select="$pixels-per-inch div 2.54"/>
   |      <xsl:map-entry key="'mm'" select="$pixels-per-inch div 25.4"/>
   |      <xsl:map-entry key="'pt'" select="$pixels-per-inch div 72.0"/>
   |      <xsl:map-entry key="'pc'" select="$pixels-per-inch div 6.0"/>
   |      <xsl:map-entry key="'em'" select="$pixels-per-inch div 6.0"/>
   |      <xsl:map-entry key="'barleycorn'" select="$pixels-per-inch div 3.0"/>
   |   </xsl:map>
   |</xsl:variable>

Description

The $v:unit-scale map contains a set of measurement units and their absolute length in terms of pixels (as computed with $pixels-per-inch).

Recognized units at the time of this writing are shown in Figure 1, “Recognized units of measure”.

UnitSize
px1.0
in$pixels-per-inch
m$pixels-per-inch div 2.54 * 100.0
cm$pixels-per-inch div 2.54
mm$pixels-per-inch div 25.4
pt$pixels-per-inch div 72.0
pc$pixels-per-inch div 6.0
em$pixels-per-inch div 6.0
barleycorn$pixels-per-inch div 3.0
Figure 1Recognized units of measure

See also Section 5.2, “Lengths and units”.