>From the symbolic unit of the department... Hello Tom, 26.04.2020 22:13, Tom Lane wrote: > In the department of nitpickery ... > > "π" renders poorly in our PDF docs: as shown in the attached > screenshot, it doesn't line up on the baseline. I realized that > this is the same problem I'd run into recently with right-arrow, > and it can be solved in the same way, namely we have to specify > use of the symbol font explicitly. So attached is a proposed > patch to fix it. > > Use of a new processing-instruction might not be the most elegant > way to do this ... anyone have a better suggestion? I would use the phrase tag, which is intended for such uses: [1] [2]. The "phrase" sounds too generic, but it doesn't require yet another processing instruction e.g. for ∑ or a similar entity.
[1] http://www.sagehill.net/docbookxsl/CustomInlines.html [2] https://tdg.docbook.org/tdg/4.5/phrase.html Best regards, Alexander
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index b0afaebf728..16a4a679d1c 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1365,7 +1365,7 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue> <function>pi</function> ( ) <returnvalue>double precision</returnvalue> <?br?> - Approximate value of π + Approximate value of <phrase role="symbol">π</phrase> <?br?> <literal>pi()</literal> <returnvalue>3.141592653589793</returnvalue> diff --git a/doc/src/sgml/ref/pgbench.sgml b/doc/src/sgml/ref/pgbench.sgml index 58a2aa3bf20..8c5bf18f79c 100644 --- a/doc/src/sgml/ref/pgbench.sgml +++ b/doc/src/sgml/ref/pgbench.sgml @@ -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">π</phrase></entry> <entry><literal>pi()</literal></entry> <entry><literal>3.14159265358979323846</literal></entry> </row> diff --git a/doc/src/sgml/stylesheet-fo.xsl b/doc/src/sgml/stylesheet-fo.xsl index 6797e06a77c..3d3ab02ae9a 100644 --- a/doc/src/sgml/stylesheet-fo.xsl +++ b/doc/src/sgml/stylesheet-fo.xsl @@ -132,4 +132,8 @@ </fo:bookmark> </xsl:template> +<xsl:template match="phrase[@role='symbol']"> + <fo:inline font-family="{$symbol.font.family}"><xsl:value-of select="." /></fo:inline> +</xsl:template> + </xsl:stylesheet>