home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / MacPerl 5.0.3 / MacPerl Source ƒ / MacPerl5 / pod / pod2man < prev    next >
Encoding:
Text File  |  1994-12-26  |  14.0 KB  |  626 lines  |  [TEXT/MPS ]

  1. #!/usr/bin/perl
  2.  
  3. $/ = "";
  4. $cutting = 1;
  5.  
  6. $CFont = 'CW';
  7. if ($ARGV[0] =~ s/-fc(.*)//) {
  8.     shift;
  9.     $CFont = $1 || shift;
  10. }
  11.  
  12. if (length($CFont) == 2) {
  13.     $CFont_embed = "\\f($CFont";
  14. elsif (length($CFont) == 1) {
  15.     $CFont_embed = "\\f$CFont";
  16. else {
  17.     die "Roff font should be 1 or 2 chars, not `$CFont_embed'";
  18.  
  19. $name = @ARGV ? $ARGV[0] : "something";
  20. $name =~ s/\..*//;
  21.  
  22. print <<"END";
  23. .rn '' }`
  24. ''' \$RCSfile\$\$Revision\$\$Date\$
  25. ''' 
  26. ''' \$Log\$
  27. ''' 
  28. .de Sh
  29. .br
  30. .if t .Sp
  31. .ne 5
  32. .PP
  33. \\fB\\\\\$1\\fR
  34. .PP
  35. ..
  36. .de Sp
  37. .if t .sp .5v
  38. .if n .sp
  39. ..
  40. .de Ip
  41. .br
  42. .ie \\\\n(.\$>=3 .ne \\\\\$3
  43. .el .ne 3
  44. .IP "\\\\\$1" \\\\\$2
  45. ..
  46. .de Vb
  47. .ft $CFont
  48. .nf
  49. .ne \\\\\$1
  50. ..
  51. .de Ve
  52. .ft R
  53.  
  54. .fi
  55. ..
  56. '''
  57. '''
  58. '''     Set up \\*(-- to give an unbreakable dash;
  59. '''     string Tr holds user defined translation string.
  60. '''     Bell System Logo is used as a dummy character.
  61. '''
  62. .tr \\(*W-|\\(bv\\*(Tr
  63. .ie n \\{\\
  64. .ds -- \\(*W-
  65. .if (\\n(.H=4u)&(1m=24u) .ds -- \\(*W\\h'-12u'\\(*W\\h'-12u'-\\" diablo 10 pitch
  66. .if (\\n(.H=4u)&(1m=20u) .ds -- \\(*W\\h'-12u'\\(*W\\h'-8u'-\\" diablo 12 pitch
  67. .ds L" ""
  68. .ds R" ""
  69. .ds L' '
  70. .ds R' '
  71. 'br\\}
  72. .el\\{\\
  73. .ds -- \\(em\\|
  74. .tr \\*(Tr
  75. .ds L" ``
  76. .ds R" ''
  77. .ds L' `
  78. .ds R' '
  79. .if t .ds PI \\(*p
  80. .if n .ds PI PI
  81. 'br\\}
  82. .TH \U$name\E 1 "\\*(RP"
  83. .UC
  84. END
  85.  
  86. print <<'END';
  87. .if n .hy 0 
  88. .if n .na
  89. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  90. .de CQ          \" put $1 in typewriter font
  91. END
  92. print ".ft $CFont\n";
  93. print <<'END';
  94. 'if n "\c
  95. 'if t \\\\&\\\\$1\c
  96. 'if n \\\\&\\\\$1\c
  97. 'if n \&"
  98. \\\\&\\\\$2 \\\\$3 \\\\$4 \\\\$5 \\\\$6 \\\\$7
  99. '.ft R
  100. ..
  101. .\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
  102. .    \" AM - accent mark definitions
  103. .bd S B 3
  104. .    \" fudge factors for nroff and troff
  105. .if n \{\
  106. .    ds #H 0
  107. .    ds #V .8m
  108. .    ds #F .3m
  109. .    ds #[ \f1
  110. .    ds #] \fP
  111. .\}
  112. .if t \{\
  113. .    ds #H ((1u-(\\\\\\\\n(.fu%2u))*.13m)
  114. .    ds #V .6m
  115. .    ds #F 0
  116. .    ds #[ \&
  117. .    ds #] \&
  118. .\}
  119. .    \" simple accents for nroff and troff
  120. .if n \{\
  121. .    ds ' \&
  122. .    ds ` \&
  123. .    ds ^ \&
  124. .    ds , \&
  125. .    ds ~ ~
  126. .    ds ? ?
  127. .    ds ! !
  128. .    ds / 
  129. .    ds q 
  130. .\}
  131. .if t \{\
  132. .    ds ' \\\\k:\h'-(\\\\n(.wu*8/10-\*(#H)'\'\h"|\\\\n:u"
  133. .    ds ` \\\\k:\h'-(\\\\n(.wu*8/10-\*(#H)'\`\h'|\\\\n:u'
  134. .    ds ^ \\\\k:\h'-(\\\\n(.wu*10/11-\*(#H)'^\h'|\\\\n:u'
  135. .    ds , \\\\k:\h'-(\\\\n(.wu*8/10)',\h'|\\\\n:u'
  136. .    ds ~ \\\\k:\h'-(\\\\n(.wu-\*(#H-.1m)'~\h'|\\\\n:u'
  137. .    ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
  138. .    ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
  139. .    ds / \\\\k:\h'-(\\\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\\\n:u'
  140. .    ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
  141. .\}
  142. .    \" troff and (daisy-wheel) nroff accents
  143. .ds : \\\\k:\h'-(\\\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\\\n:u'\v'\*(#V'
  144. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  145. .ds v \\\\k:\h'-(\\\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\\\n:u'\*(#]
  146. .ds _ \\\\k:\h'-(\\\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\\\n:u'
  147. .ds . \\\\k:\h'-(\\\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\\\n:u'
  148. .ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
  149. .ds o \\\\k:\h'-(\\\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\\\n:u'\*(#]
  150. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  151. .ds D- D\\\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\\\n:u'
  152. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  153. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  154. .ds ae a\h'-(\w'a'u*4/10)'e
  155. .ds Ae A\h'-(\w'A'u*4/10)'E
  156. .ds oe o\h'-(\w'o'u*4/10)'e
  157. .ds Oe O\h'-(\w'O'u*4/10)'E
  158. .    \" corrections for vroff
  159. .if v .ds ~ \\\\k:\h'-(\\\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\\\n:u'
  160. .if v .ds ^ \\\\k:\h'-(\\\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\\\n:u'
  161. .    \" for low resolution devices (crt and lpr)
  162. .if \n(.H>23 .if \n(.V>19 \
  163. \{\
  164. .    ds : e
  165. .    ds 8 ss
  166. .    ds v \h'-1'\o'\(aa\(ga'
  167. .    ds _ \h'-1'^
  168. .    ds . \h'-1'.
  169. .    ds 3 3
  170. .    ds o a
  171. .    ds d- d\h'-1'\(ga
  172. .    ds D- D\h'-1'\(hy
  173. .    ds th \o'bp'
  174. .    ds Th \o'LP'
  175. .    ds ae ae
  176. .    ds Ae AE
  177. .    ds oe oe
  178. .    ds Oe OE
  179. .\}
  180. .rm #[ #] #H #V #F C
  181. END
  182.  
  183. $indent = 0;
  184.  
  185. while (<>) {
  186.     if ($cutting) {
  187.     next unless /^=/;
  188.     $cutting = 0;
  189.     }
  190.     chomp;
  191.  
  192.     # Translate verbatim paragraph
  193.  
  194.     if (/^\s/) {
  195.     @lines = split(/\n/);
  196.     for (@lines) {
  197.         1 while s
  198.         {^( [^\t]* ) \t ( \t* ) }
  199.         { $1 . ' ' x (8 - (length($1)%8) + 8 * (length($2))) }ex;
  200.         s/\\/\\e/g;
  201.         s/\A/\\&/s;
  202.     }
  203.     $lines = @lines;
  204.     makespace() unless $verbatim++;
  205.     print ".Vb $lines\n";
  206.     print join("\n", @lines), "\n";
  207.     print ".Ve\n";
  208.     $needspace = 0;
  209.     next;
  210.     }
  211.  
  212.     $verbatim = 0;
  213.  
  214.     # check for things that'll hosed our noremap scheme; affects $_
  215.     init_noremap();
  216.  
  217.     if (!/^=item/) {
  218.  
  219.     # trofficate backslashes; must do it before what happens below
  220.     s/\\/noremap('\\e')/ge;
  221.  
  222.     # first hide the escapes in case we need to 
  223.     # intuit something and get it wrong due to fmting
  224.  
  225.     s/([A-Z]<[^<>]*>)/noremap($1)/ge;
  226.  
  227.     # func() is a reference to a perl function
  228.     s{
  229.         \b
  230.         (
  231.         [:\w]+ \(\)
  232.         )
  233.     } {I<$1>}gx;
  234.  
  235.     # func(n) is a reference to a man page
  236.     s{
  237.         (\w+)
  238.         (
  239.         \(
  240.             [^\s,\051]+
  241.         \)
  242.         )
  243.     } {I<$1>\\|$2}gx;
  244.  
  245.     # convert simple variable references
  246.     s/([\$\@%][\w:]+)/C<$1>/g;
  247.  
  248.     if (m{ (
  249.             [\-\w]+
  250.             \(
  251.             [^\051]*?
  252.             [\@\$,]
  253.             [^\051]*?
  254.             \)
  255.         )
  256.         }x && $` !~ /([LCI]<[^<>]*|-)$/ && !/^=\w/) 
  257.     {
  258.         warn "``$1'' should be a [LCI]<$1> ref";
  259.     } 
  260.  
  261.     while (/(-[a-zA-Z])\b/g && $` !~ /[\w\-]$/) {
  262.         warn "``$1'' should be [CB]<$1> ref";
  263.     } 
  264.  
  265.     # put it back so we get the <> processed again;
  266.     clear_noremap(0); # 0 means leave the E's
  267.  
  268.     } else {
  269.     # trofficate backslashes
  270.     s/\\/noremap('\\e')/ge;
  271.  
  272.     } 
  273.  
  274.     # need to hide E<> first; they're processed in clear_noremap
  275.     s/(E<[^<>]+>)/noremap($1)/ge;
  276.  
  277.  
  278.     $maxnest = 10;
  279.     while ($maxnest-- && /[A-Z]</) {
  280.  
  281.     # can't do C font here
  282.     s/([BI])<([^<>]*)>/font($1) . $2 . font('R')/eg;
  283.  
  284.     # files and filelike refs in italics
  285.     s/F<([^<>]*)>/I<$1>/g;
  286.  
  287.     # no break -- usually we want C<> for this
  288.     s/S<([^<>]*)>/nobreak($1)/eg;
  289.  
  290.     # LREF: a manpage(3f) 
  291.     s:L<([a-zA-Z][^\s\/]+)(\([^\)]+\))?>:the I<$1>$2 manpage:g;
  292.  
  293.     # LREF: an =item on another manpage
  294.     s{
  295.         L<
  296.         ([^/]+)
  297.         /
  298.         (
  299.             [:\w]+
  300.             (\(\))?
  301.         )
  302.         >
  303.     } {the C<$2> entry in the I<$1> manpage}gx;
  304.  
  305.     # LREF: an =item on this manpage
  306.     s{
  307.        ((?:
  308.         L<
  309.         /
  310.         (
  311.             [:\w]+
  312.             (\(\))?
  313.         )
  314.         >
  315.         (,?\s+(and\s+)?)?
  316.       )+)
  317.     } { internal_lrefs($1) }gex;
  318.  
  319.     # LREF: a =head2 (head1?), maybe on a manpage, maybe right here
  320.     # the "func" can disambiguate
  321.     s{
  322.         L<
  323.         (?:
  324.             ([a-zA-Z]\S+?) / 
  325.         )?
  326.         "?(.*?)"?
  327.         >
  328.     }{
  329.         do {
  330.         $1     # if no $1, assume it means on this page.
  331.             ?  "the section on I<$2> in the I<$1> manpage"
  332.             :  "the section on I<$2>"
  333.         } 
  334.     }gex;
  335.  
  336.     s/Z<>/\\&/g;
  337.  
  338.     # comes last because not subject to reprocessing
  339.     s/C<([^<>]*)>/noremap("${CFont_embed}${1}\\fR")/eg;
  340.     }
  341.  
  342.     if (s/^=//) {
  343.     $needspace = 0;        # Assume this.
  344.  
  345.     s/\n/ /g;
  346.  
  347.     ($Cmd, $_) = split(' ', $_, 2);
  348.  
  349.     if (defined $_) {
  350.         &escapes;
  351.         s/"/""/g;
  352.     }
  353.  
  354.     clear_noremap(1);
  355.  
  356.     if ($Cmd eq 'cut') {
  357.         $cutting = 1;
  358.     }
  359.     elsif ($Cmd eq 'head1') {
  360.         print qq{.SH "$_"\n}
  361.     }
  362.     elsif ($Cmd eq 'head2') {
  363.         print qq{.Sh "$_"\n}
  364.     }
  365.     elsif ($Cmd eq 'over') {
  366.         push(@indent,$indent);
  367.         $indent = $_ + 0;
  368.     }
  369.     elsif ($Cmd eq 'back') {
  370.         $indent = pop(@indent);
  371.         warn "Unmatched =back\n" unless defined $indent;
  372.         $needspace = 1;
  373.     }
  374.     elsif ($Cmd eq 'item') {
  375.         s/^\*( |$)/\\(bu$1/g;
  376.         print STDOUT qq{.Ip "$_" $indent\n};
  377.     }
  378.     else {
  379.         warn "Unrecognized directive: $Cmd\n";
  380.     }
  381.     }
  382.     else {
  383.     if ($needspace) {
  384.         &makespace;
  385.     }
  386.     &escapes;
  387.     clear_noremap(1);
  388.     print $_, "\n";
  389.     $needspace = 1;
  390.     }
  391. }
  392.  
  393. print <<"END";
  394.  
  395. .rn }` ''
  396. END
  397.  
  398. #########################################################################
  399.  
  400. sub nobreak {
  401.     my $string = shift;
  402.     $string =~ s/ /\\ /g;
  403.     $string;
  404. }
  405.  
  406. sub escapes {
  407.  
  408.     # translate the minus in foo-bar into foo\-bar for roff
  409.     s/([^0-9a-z-])-([^-])/$1\\-$2/g;
  410.  
  411.     # make -- into the string version \*(-- (defined above)
  412.     s/\b--\b/\\*(--/g;
  413.     s/"--([^"])/"\\*(--$1/g;  # should be a better way
  414.     s/([^"])--"/$1\\*(--"/g;
  415.  
  416.     # fix up quotes; this is somewhat tricky
  417.     if (!/""/) {
  418.     s/(^|\s)(['"])/noremap("$1\\*(L$2")/ge;
  419.     s/(['"])($|[\-\s,;\\!?.])/noremap("\\*(R$1$2")/ge;
  420.     }
  421.  
  422.     #s/(?!")(?:.)--(?!")(?:.)/\\*(--/g;
  423.     #s/(?:(?!")(?:.)--(?:"))|(?:(?:")--(?!")(?:.))/\\*(--/g;
  424.     
  425.  
  426.     # make sure that func() keeps a bit a space tween the parens
  427.     ### s/\b\(\)/\\|()/g;
  428.     ### s/\b\(\)/(\\|)/g;
  429.  
  430.     # make C++ into \*C+, which is a squinched version (defined above)
  431.     s/\bC\+\+/\\*(C+/g;
  432.  
  433.     # make double underbars have a little tiny space between them
  434.     s/__/_\\|_/g;
  435.  
  436.     # PI goes to \*(-- (defined above)
  437.     s/\bPI\b/noremap('\\*(PI')/ge;
  438.  
  439.     # make all caps a teeny bit smaller, but don't muck with embedded code literals
  440.     my $hidCFont = font('C');
  441.     if ($Cmd !~ /^head1/) { # SH already makes smaller
  442.     # /g isn't enough; 1 while or we'll be off
  443.  
  444. #    1 while s{
  445. #        (?!$hidCFont)(..|^.|^)
  446. #        \b
  447. #        (
  448. #        [A-Z][\/A-Z+:\-\d_$.]+
  449. #        )
  450. #        (s?)         
  451. #        \b
  452. #    } {$1\\s-1$2\\s0}gmox;
  453.  
  454.     1 while s{
  455.         (?!$hidCFont)(..|^.|^)
  456.         (
  457.         \b[A-Z]{2,}[\/A-Z+:\-\d_\$]*\b
  458.         )
  459.     } { 
  460.         $1 . noremap( '\\s-1' .  $2 . '\\s0' )
  461.     }egmox;
  462.  
  463.     }
  464. }
  465.  
  466. # make troff just be normal, but make small nroff get quoted
  467. # decided to just put the quotes in the text; sigh;
  468. sub ccvt {
  469.      local($_,$prev) = @_;
  470.      if ( /^\W+$/ && !/^\$./ ) {
  471.      ($prev && "\n") . noremap(qq{.CQ $_ \n\\&});
  472.      # what about $" ?
  473.      } else {
  474.      noremap(qq{${CFont_embed}$_\\fR});
  475.      } 
  476.     noremap(qq{.CQ "$_" \n\\&});
  477.  
  478. sub makespace {
  479.     if ($indent) {
  480.     print ".Sp\n";
  481.     }
  482.     else {
  483.     print ".PP\n";
  484.     }
  485. }
  486.  
  487. sub font {
  488.     local($font) = shift;
  489.     return '\\f' . noremap($font);
  490.  
  491. sub noremap {
  492.     local($thing_to_hide) = shift;
  493.     $thing_to_hide =~ tr/\000-\177/\200-\377/;
  494.     return $thing_to_hide;
  495.  
  496. sub init_noremap {
  497.     if ( /[\200-\377]/ ) {
  498.     warn "hit bit char in input stream";
  499.     } 
  500.  
  501. sub clear_noremap {
  502.     my $ready_to_print = $_[0];
  503.  
  504.     tr/\200-\377/\000-\177/;
  505.  
  506.     # trofficate backslashes
  507.     # s/(?!\\e)(?:..|^.|^)\\/\\e/g;
  508.  
  509.     # now for the E<>s, which have been hidden until now
  510.     # otherwise the interative \w<> processing would have
  511.     # been hosed by the E<gt>
  512.     s {
  513.         E<    
  514.         ( [A-Za-z]+ )    
  515.         >    
  516.     } { 
  517.      do {    
  518.          exists $HTML_Escapes{$1}
  519.         ? do { $HTML_Escapes{$1} }
  520.         : do {
  521.             warn "Unknown escape: $& in $_";
  522.             "E<$1>";
  523.         } 
  524.      } 
  525.     }egx if $ready_to_print;
  526.  
  527. sub internal_lrefs {
  528.     local($_) = shift;
  529.  
  530.     s{L</([^>]+)>}{$1}g;
  531.     my(@items) = split( /(?:,?\s+(?:and\s+)?)/ );
  532.     my $retstr = "the ";
  533.     my $i;
  534.     for ($i = 0; $i <= $#items; $i++) {
  535.     $retstr .= "C<$items[$i]>";
  536.     $retstr .= ", " if @items > 2 && $i != $#items;
  537.     $retstr .= " and " if $i+2 == @items;
  538.     } 
  539.  
  540.     $retstr .= " entr" . ( @items > 1  ? "ies" : "y" )
  541.         .  " elsewhere in this document";
  542.  
  543.     return $retstr;
  544.  
  545.  
  546. BEGIN {
  547. %HTML_Escapes = (
  548.     'amp'    =>    '&',    #   ampersand
  549.     'lt'    =>    '<',    #   left chevron, less-than
  550.     'gt'    =>    '>',    #   right chevron, greater-than
  551.     'quot'    =>    '"',    #   double quote
  552.  
  553.     "Aacute"    =>    "A\\*'",    #   capital A, acute accent
  554.     "aacute"    =>    "a\\*'",    #   small a, acute accent
  555.     "Acirc"    =>    "A\\*^",    #   capital A, circumflex accent
  556.     "acirc"    =>    "a\\*^",    #   small a, circumflex accent
  557.     "AElig"    =>    '\*(AE',    #   capital AE diphthong (ligature)
  558.     "aelig"    =>    '\*(ae',    #   small ae diphthong (ligature)
  559.     "Agrave"    =>    "A\\*`",    #   capital A, grave accent
  560.     "agrave"    =>    "A\\*`",    #   small a, grave accent
  561.     "Aring"    =>    'A\\*o',    #   capital A, ring
  562.     "aring"    =>    'a\\*o',    #   small a, ring
  563.     "Atilde"    =>    'A\\*~',    #   capital A, tilde
  564.     "atilde"    =>    'a\\*~',    #   small a, tilde
  565.     "Auml"    =>    'A\\*:',    #   capital A, dieresis or umlaut mark
  566.     "auml"    =>    'a\\*:',    #   small a, dieresis or umlaut mark
  567.     "Ccedil"    =>    'C\\*,',    #   capital C, cedilla
  568.     "ccedil"    =>    'c\\*,',    #   small c, cedilla
  569.     "Eacute"    =>    "E\\*'",    #   capital E, acute accent
  570.     "eacute"    =>    "e\\*'",    #   small e, acute accent
  571.     "Ecirc"    =>    "E\\*^",    #   capital E, circumflex accent
  572.     "ecirc"    =>    "e\\*^",    #   small e, circumflex accent
  573.     "Egrave"    =>    "E\\*`",    #   capital E, grave accent
  574.     "egrave"    =>    "e\\*`",    #   small e, grave accent
  575.     "ETH"    =>    '\\*(D-',    #   capital Eth, Icelandic
  576.     "eth"    =>    '\\*(d-',    #   small eth, Icelandic
  577.     "Euml"    =>    "E\\*:",    #   capital E, dieresis or umlaut mark
  578.     "euml"    =>    "e\\*:",    #   small e, dieresis or umlaut mark
  579.     "Iacute"    =>    "I\\*'",    #   capital I, acute accent
  580.     "iacute"    =>    "i\\*'",    #   small i, acute accent
  581.     "Icirc"    =>    "I\\*^",    #   capital I, circumflex accent
  582.     "icirc"    =>    "i\\*^",    #   small i, circumflex accent
  583.     "Igrave"    =>    "I\\*`",    #   capital I, grave accent
  584.     "igrave"    =>    "i\\*`",    #   small i, grave accent
  585.     "Iuml"    =>    "I\\*:",    #   capital I, dieresis or umlaut mark
  586.     "iuml"    =>    "i\\*:",    #   small i, dieresis or umlaut mark
  587.     "Ntilde"    =>    'N\*~',        #   capital N, tilde
  588.     "ntilde"    =>    'n\*~',        #   small n, tilde
  589.     "Oacute"    =>    "O\\*'",    #   capital O, acute accent
  590.     "oacute"    =>    "o\\*'",    #   small o, acute accent
  591.     "Ocirc"    =>    "O\\*^",    #   capital O, circumflex accent
  592.     "ocirc"    =>    "o\\*^",    #   small o, circumflex accent
  593.     "Ograve"    =>    "O\\*`",    #   capital O, grave accent
  594.     "ograve"    =>    "o\\*`",    #   small o, grave accent
  595.     "Oslash"    =>    "O\\*/",    #   capital O, slash
  596.     "oslash"    =>    "o\\*/",    #   small o, slash
  597.     "Otilde"    =>    "O\\*~",    #   capital O, tilde
  598.     "otilde"    =>    "o\\*~",    #   small o, tilde
  599.     "Ouml"    =>    "O\\*:",    #   capital O, dieresis or umlaut mark
  600.     "ouml"    =>    "o\\*:",    #   small o, dieresis or umlaut mark
  601.     "szlig"    =>    '\*8',        #   small sharp s, German (sz ligature)
  602.     "THORN"    =>    '\\*(Th',    #   capital THORN, Icelandic
  603.     "thorn"    =>    '\\*(th',,    #   small thorn, Icelandic
  604.     "Uacute"    =>    "U\\*'",    #   capital U, acute accent
  605.     "uacute"    =>    "u\\*'",    #   small u, acute accent
  606.     "Ucirc"    =>    "U\\*^",    #   capital U, circumflex accent
  607.     "ucirc"    =>    "u\\*^",    #   small u, circumflex accent
  608.     "Ugrave"    =>    "U\\*`",    #   capital U, grave accent
  609.     "ugrave"    =>    "u\\*`",    #   small u, grave accent
  610.     "Uuml"    =>    "U\\*:",    #   capital U, dieresis or umlaut mark
  611.     "uuml"    =>    "u\\*:",    #   small u, dieresis or umlaut mark
  612.     "Yacute"    =>    "Y\\*'",    #   capital Y, acute accent
  613.     "yacute"    =>    "y\\*'",    #   small y, acute accent
  614.     "yuml"    =>    "y\\*:",    #   small y, dieresis or umlaut mark
  615. );
  616. }
  617.