[comp.text] British pound sign in troff?

pooh@oddjob.UChicago.EDU (Pooh) (02/17/89)

I am looking for a quick and dirty way to construct a British
pound sign (as in the currency) in troff.  I have access only
to the -ms macros and they don't list one in their special
characters.

Thanks!

Pooh
       pooh@oddjob.uchicago.edu

hecht@hsi.UUCP (Alice Hecht) (02/23/89)

In article <15201@oddjob.UChicago.EDU>, pooh@oddjob.UChicago.EDU (Pooh) writes:
> 
> I am looking for a quick and dirty way to construct a British
> pound sign (as in the currency) in troff.  I have access only
> to the -ms macros and they don't list one in their special
> characters.
> 
> Thanks!
> 
> Pooh
>        pooh@oddjob.uchicago.edu

To include the British pound sign using the -ms macro, just type
            \(po  or \(ps
 The \(po is defined as the pound sign as well as the \(ps.
Don't ask me why there are two ways to do the same thing but there they
are.

Alice

-- 
Alice Hecht                                       ...!uunet!hsi!hecht
Health Systems International                      hecht@hsi.uu.net

wnp@killer.DALLAS.TX.US (Wolf Paul) (02/24/89)

In article <1087@hsi.UUCP> hecht@hsi.UUCP (Alice Hecht) writes:
>In article <15201@oddjob.UChicago.EDU>, pooh@oddjob.UChicago.EDU (Pooh) writes:
>> I am looking for a quick and dirty way to construct a British
>> pound sign (as in the currency) in troff.  I have access only
>> to the -ms macros and they don't list one in their special
>> characters.
>To include the British pound sign using the -ms macro, just type
>            \(po  or \(ps
> The \(po is defined as the pound sign as well as the \(ps.
>Don't ask me why there are two ways to do the same thing but there they
>are.

I am afraid that is not necessarily going to work on Pooh's machine.

\(po and \(ps are SPECIAL CHARACTERS. If available, they are defined in
/usr/lib/font/devXXX/DESC, and must be present in the physical character set of
the output device. As such, they have NOTHING to do with the macros you
use -- if your device supports a character, and it is defined in DESC,
you can use it, regardless of the macros you use. If your device does
not support a character, or it is not listed in the DESC file, then you
can't use it, even if you use the same macros as someone else at a different
installation who can use that character.

It is true that some of the macro packages (i.e. me and ms) provide
STRING DEFINITIONS for some accented characters and special symbols;
they have names like \*(xx (note the asterisk) and are constructed by
overstriking other, existing characters. Thus, a German Umlaut-A can be
constructed by printing an A, moving up and left, printing a period, moving
right a bit, printing another period, and then moving back down where you
started. A pound sign can be simulated in this manner, by printing an L,
and superimposing a dash, or minus, on it.

A good way to find out what special characters are supported on your 
output device, is to look at the DESC file in the /usr/lib/font/devXXX
(where XXX is some abbreviation for your output device, which also 
forms the argument to the troff -T option), and construct a file which
prints all of the special characters named there in, say, 12pt. Roman.
Then run it through troff, and voila, you have a reference chart for
your character set.

Here is the beginnings of such a test file:
(don't use a macro package for this test file)


.sp |.5i	\" needed for HP LJ
.po .5i
.ll 25P
.vs 14p
.nf
.ta 2P 4P 6P 8P 10P 12P 14P 16P 18P 20P
...\" Everything below this line is separated by SINGLE TABS
.ps 12
  \(bu  \(sq  \(dg  \(dd  \(ct  \(lq  \(rq  \(LF  \(RF  \(uk
.ps 10
  bu  sq  dg  dd  ct  lq  rg  LF  RF  uk
.sp .5v
...
etc
...

The 12pt line prints the actual characters, 2 picas apart;
the 10pt line prints the character names underneath. Then
we leave some space, and repeat the whole shebang. Of course
you need to substitute the names from your DESC file for
\(bu, \(sq, etc.
-- 
Wolf N. Paul * 3387 Sam Rayburn Run * Carrollton TX 75007 * (214) 306-9101
UUCP:   killer!wnp                    ESL: 62832882
DOMAIN: wnp@killer.dallas.tx.us       TLX: 910-380-0585 EES PLANO UD

guy@auspex.UUCP (Guy Harris) (02/25/89)

>\(po and \(ps are SPECIAL CHARACTERS. If available, they are defined in
>/usr/lib/font/devXXX/DESC,

Assuming you have a sufficiently modern version of "troff" (i.e., the
"device-independent" one); if you don't have that, said characters are,
quite likely, unavailable.