Doc: render π more nicely in PDF output.

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
This commit is contained in:
Tom Lane 2020-04-27 11:00:28 -04:00
parent d51f704fd8
commit 5ac2475548
3 changed files with 7 additions and 2 deletions

View 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>

View 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>

View File

@ -101,6 +101,11 @@
<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">