On Tue, Feb 26, 2008 at 02:01:57PM +0900, Michael(tm) Smith wrote: > Subject: Re: [Groff] nroff vs. troff conditional using escapes? > > So I think what would actually best for me to try to do is have > my app always generated the \c before and after the string, and to > preserve any whitespace that follows the string...
I convert a lot of xml to groff using python with various parsers (sometimes built-in python parsers, sometimes external like nsgmls, which is extremely fast). I find that I can solve most inline spacing problems with the solutions you and Clarke have discussed, i.e., any time the parser outputs a text line my script prepends \& and appends \c. Also, it seems to me that if a \c starts a line, it gives the same effect as being appended to the previous text line, but I rarely need to deal with this. Using such a python script as a preprocessor for groff is very fast and allows you to do various kinds of string manipulations at very little speed cost. For that reason, I've never bothered to go the XLST route. -- Steve -- Steve Izma Computing Systems Administrator 519-884-0710 ext. 6125 Wilfrid Laurier University Press FAX: 519-725-1399 Waterloo, Ont., Canada N2L 3C5 [EMAIL PROTECTED]