ms2me.awk, translates troff file, ms to me

Flame Bait joshua at athertn.Atherton.COM
Fri Aug 18 11:26:48 AEST 1989


#
# MS2ME.AWK  (version 1.0)
# By Joshua Levy                     joshua at atherton.com  home:(415)968-3718
#                       {decwrl|sun|hpda}!athertn!joshua  work:(408)734-9822 
#
# Converts ms documents to me documents.
# Sleeze hack solution, quick to write, but only does 80% of the job.
#
# usage:  awk -f ms2me.awk <input.ms >output.me
#
# You must go over the output of this program, and translate some of the
# macros by hand.  Most of these macros are on the first page (ie. TL,
# AE, AB, etc).  If you make any improvements to this program please send
# them back to me.  Thanks.
#
$1==".PP" 	{ $1 = ".pp" ; }
$1==".IP" 	{ $1 = ".ip" ; }
$1==".LP"	{ $1 = ".lp" ; }
$1==".KS" 	{ $1 = ".(b" ; }
$1==".KE" 	{ $1 = ".)b" ; }
$1==".FS" 	{ $1 = ".(f" ; }
$1==".FE" 	{ $1 = ".)f" ; }
$1==".RS" 	{ $1 = ".in +5" ; }
$1==".RE" 	{ $1 = ".in -5" ; }
$1==".DS" 	{ $1 = ".(d" ; }
$1==".DE" 	{ $1 = ".)d" ; }
$1==".XP"	{ $1 = ".xp" ; }
$1==".AI"	{ $1 = ".sp 1" }
$1==".NH"	{ level = $2 ; getline title ; 
		  printf ".sh %d \"%s\"\n", level, $0 ; next ;  }
$1==".TL"	{ print ".sz +2" ; $1 = ".ft B" ; }
$1==".AU"	{ print ".ft R" ; $1 = ".sz -2" ; }
		{ print $0 ; }



More information about the Alt.sources mailing list