> > Isn't it possible in the UTF-8 device to create a (pseudo-) > > font with ASCII encoding? > > I don't understand. Please rephrase.
Try the following example with devutf8. It's supposed to give pretty formatting in Postscript and cut-and-paste-able shell commands in UTF-8. The example displays quotes in different circumstances (including bold and "italic" quotes) and also shows that there's no need to specially mark up code fragments *except* to use a suitably defined macro (which is a good idea anyway). In other words, we can use ascii 0x60 and 0x27 for both "normal" quotes *and* shell command examples in the [nt]roff source (which I think is the best solution and most convenient, and allows us to tweak the macro to get optimum output on every device without modifying the input file). Regarding the "ASCII-encoding font" in devutf8, what I'm trying to say is that my "C" macro for utf8 in the example is needlessly complicated, and we could use its default definition instead if we had a suitable "C" font, like this: make a copy named "C" of the file "B" in devutf8, and edit it such that the characters ` and ' have encoding 0x0060 and 0x0027 instead of 0x2018 and 0x2019. Remove the entire ".if '\*[.T]'utf8'" block in the example and verify that the example still gives the desired result.
.\" .\" ---------------------------------------------------------------- .de FT .if '\\n(.$'2' \\f\\$1\\$2\\fP .if '\\n(.$'3' \\f\\$1\\$2\\fP\\$3 .if '\\n(.$'4' \\$2\\f\\$1\\$3\\fP\\$4 .. .de C .FT C \\$@ .. .de B .FT B \\$@ .. .de I .FT I \\$@ .. .\" ---------------------------------------------------------------- .if '\*[.T]'ps' \{\ .fp 1 R Times-Roman .fp 2 I Times-Italic .fp 3 B Times-Bold .fp 4 C Courier-Bold .\} .if '\*[.T]'utf8' \{\ .fp 5 C B .de C .if '\\n(.$'3' \&\\$1\c .tr `\N'096''\N'039' .if '\\n(.$'1' \\fC\\$1\\fP .if '\\n(.$'2' \\fC\\$1\\fP\c .if '\\n(.$'3' \\fC\\$2\\fP\c .tr ``'' .if '\\n(.$'2' \&\\$2 .if '\\n(.$'3' \&\\$3 .. .\} .\" ---------------------------------------------------------------- .sp 2c .pl 10v .\" ---------------------------------------------------------------- .B ` `bold' ' and .I ` `italic' ' text with quotes and a sample command line: .C ` "echo 'I am '`whoami`." '. .\" ----------------------------------------------------------------