From 5daacbdbccb65234ac4fae3c249e46d564cc4b21 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sun, 9 Aug 2020 10:20:38 +0200 Subject: [PATCH] man-pages.7: Add some notes on generating optimal glyphs Getting nice renderings of ^ ` and ~ requires special steps in the page source. Signed-off-by: Michael Kerrisk --- man7/man-pages.7 | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/man7/man-pages.7 b/man7/man-pages.7 index d0eabebe6..2c61ebdf4 100644 --- a/man7/man-pages.7 +++ b/man7/man-pages.7 @@ -902,7 +902,8 @@ Some examples: .PP Finally, note that "re-create" and "recreate" are two different verbs, and the former is probably what you want. -.SS Real minus character +.\" +.SS Generating optimal glyphs Where a real minus character is required (e.g., for numbers such as \-1, for man page cross references such as .BR utf\-8 (7), @@ -913,9 +914,9 @@ use the following form in the man page source: \e\- .PP This guideline applies also to code examples. -.SS Character constants -To produce single quotes that render well in both ASCII and UTF-8, -use the following form for character constants in the man page source: +.PP +To produce unslanted single quotes that render well in ASCII, UTF-8, and PDF, +use "\e(aq" ("apostrophe quote"); for example .PP \e(aqC\e(aq .PP @@ -923,6 +924,17 @@ where .I C is the quoted character. This guideline applies also to character constants used in code examples. +.PP +Where a proper caret (\(ha) that renders well in both a terminal and PDF +is required, use "\\(ha". +This is especially necessary in code samples, +to get a nicely rendered caret when rendering to PDF. +.PP +Using a naked "\(ti" character results in a poor rendering in PDF. +Instead use "\\(ti". +This is especially necessary in code samples, +to get a nicely rendered tilde when rendering to PDF. +.\" .SS Example programs and shell sessions Manual pages may include example programs demonstrating how to use a system call or library function.