From a6fe02f46a93c8cfaad1a4cb3c5e166a7aea3a4b Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 25 Aug 2023 21:35:47 -0700 Subject: Man writer: improvements to code and code blocks. The aim here (see #9020) is to produce more standard and more portable man pages. To that end: - We revert the fanciness introduced in #7506, which employs a custom font name V and a macro that makes this act like boldface in a terminal and monospace in other formats. Unfortunately, this code uses a mechanism that is not portable (and does not work in mandoc). - Instead of using V for inline code, we simply use CR. Note that `\f[CR]` is emitted instead of plain `\f[C]`, because there is no C font in man. (This produces warnings in recent versions of groff.) - For code blocks, we now use the `.EX` and `.EE` macros, together with `.IP` for spacing and indentation. This gives more standard code that can be better interpreted e.g. by mandoc. --- test/command/3568.md | 4 ++-- test/command/5620.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'test/command') diff --git a/test/command/3568.md b/test/command/3568.md index a6817f4c6..ffc1daada 100644 --- a/test/command/3568.md +++ b/test/command/3568.md @@ -10,7 +10,7 @@ normal `code` normal. normal \f[I]italic \f[BI]bold in the middle\f[I] only italic\f[R] normal. .PP -normal \f[B]bold \f[VB]code\f[B] more bold\f[R] normal. +normal \f[B]bold \f[CB]code\f[B] more bold\f[R] normal. .PP -normal \f[V]code\f[R] normal. +normal \f[CR]code\f[R] normal. ``` diff --git a/test/command/5620.md b/test/command/5620.md index cb2635bf0..371a64864 100644 --- a/test/command/5620.md +++ b/test/command/5620.md @@ -4,6 +4,6 @@ : Write output to *OUTFILE* instead of `stdout`(3) ^D .TP -\f[V]-o\f[R], \f[V]--output=\f[R]\f[I]OUTFILE\f[R] -Write output to \f[I]OUTFILE\f[R] instead of \f[V]stdout\f[R](3) +\f[CR]-o\f[R], \f[CR]--output=\f[R]\f[I]OUTFILE\f[R] +Write output to \f[I]OUTFILE\f[R] instead of \f[CR]stdout\f[R](3) ``` -- cgit v1.2.3