Doc: render π more nicely in PDF output.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 27 Apr 2020 15:00:28 +0000 (11:00 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 27 Apr 2020 15:00:28 +0000 (11:00 -0400)
We need to select symbol font explicitly, or it comes out misaligned.

Alexander Lakhin, Tom Lane

Discussion: https://postgr.es/m/10598.1587928415@sss.pgh.pa.us

doc/src/sgml/func.sgml
doc/src/sgml/ref/pgbench.sgml
doc/src/sgml/stylesheet-fo.xsl

index b0afaebf728939a9bf5891bbb61e5dcd3d7e4c5f..692f78aa5194f028ff8c3bc3f4da58ac795f350e 100644 (file)
@@ -1365,7 +1365,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
         <function>pi</function> (  )
         <returnvalue>double precision</returnvalue>
        <?br?>
-        Approximate value of &pi;
+        Approximate value of <phrase role="symbol_font">&pi;</phrase>
        <?br?>
         <literal>pi()</literal>
         <returnvalue>3.141592653589793</returnvalue>
index 58a2aa3bf200af91511d69a3e2f83278504fe8ee..c9a9f0e0e5f6c96155c00cba38b89212636a3041 100644 (file)
@@ -1528,7 +1528,7 @@ SELECT 4 AS four \; SELECT 5 AS five \aset
       <row>
        <entry><literal><function>pi()</function></literal></entry>
        <entry>double</entry>
-       <entry>value of the constant PI</entry>
+       <entry>value of the constant <phrase role="symbol_font">&pi;</phrase></entry>
        <entry><literal>pi()</literal></entry>
        <entry><literal>3.14159265358979323846</literal></entry>
       </row>
index 6797e06a77c09d589c09ad2e5cfc582e153c3f41..2f2517d8ce605576bc038d983e06e3f2101d1ded 100644 (file)
   <fo:block/>
 </xsl:template>
 
+<!-- FOP needs us to be explicit about use of symbol font in some cases -->
+<xsl:template match="phrase[@role='symbol_font']">
+  <fo:inline font-family="{$symbol.font.family}"><xsl:value-of select="."/></fo:inline>
+</xsl:template>
+
 <!-- bug fix from <https://sourceforge.net/p/docbook/bugs/1360/#831b> -->
 
 <xsl:template match="varlistentry/term" mode="xref-to">