Date: Tue, 4 Jun 1996 18:32:20 -0400 (EDT) From: Chuck Robey <chuckr@Glue.umd.edu> To: John Fieber <jfieber@indiana.edu> Cc: Sean Kelly <kelly@fsl.noaa.gov>, grog@lemis.de, doc@freebsd.org Subject: Re: How do I write this SGML stuff? Message-ID: <Pine.OSF.3.91.960604175325.26610C-100000@ginger.eng.umd.edu> In-Reply-To: <Pine.NEB.3.93.960604153720.422P-100000@Fieber-John.campusview.indiana.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 4 Jun 1996, John Fieber wrote: > On Tue, 4 Jun 1996, Sean Kelly wrote: > > > Third was the DTD itself. > > Gee, and didn't you just about puke? ;-) > > In pondering what to do about it, I had visions of a totally new > system and ditching the linuxdoc dtd. Unfortunately with the > time I've been able to devote to it I don't see that happening > very soon so I'm now plotting out a de-crufting project. I'll > give a fair warning that <p> tags will NOT be implied by a blank > line after the de-crufting. The way it is now is a headache > downstream in the processing. And while I've got some troff > experts on the line, how do I tell troff that I want the first > character of a line to be a period, not a troff command? For > example a line comes out of the sgml parser like this: > > .login is the file you put all your csh goodies in > > but need to do something so that . is a printing character > instead of an error. I'm in the opposite corner, I can handle troff, but not sgml (lord knows I've tried). There's several answers to starting a line with .login. You could do \.login, to escape the dot. You could alternatively use the .tr command to translate some character (I'll use #, you'll get the idea) to make things simpler: .tr #. Then if #login shows up in the text, .login will print, even at the beginning of a line. You could do a macro that first defined # as ., then reset it .tr #. \" don't use # in the following string! #login (no other pounds in this line!) .tr ## However, that translation from # to . will stay in effect until troff breaks the line (at the end of the line). One last method uses the define strings command. groff has an extension (non-standard in troff) that lets me use long names here. you usually print one character defined string using \*X (where X indicates string name) of \*(XX (where XX indicates string name, 2 char). Groff allows for \*[anyLongNameILike] so do this: .ds LeadingDot \&. \" \& is zero width char, foil the logic! \*[LeadingDot]login That'll do it too. Of course, just prepending \& to any dot makes it unintelligible to troff, and that's compatible with standard troff (who'd use that?) > ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@eng.umd.edu | communications topic, C programming, and Unix. 9120 Edmonston Ct #302 | Greenbelt, MD 20770 | I run Journey2 and n3lxx, both FreeBSD (301) 220-2114 | version 2.2 current -- and great FUN! ----------------------------+-----------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.OSF.3.91.960604175325.26610C-100000>