groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Choosing a portability target


From: Meg McRoberts
Subject: Re: [Groff] Choosing a portability target
Date: Thu, 11 Jan 2007 01:41:09 -0800 (PST)

> The problem is Berkeley Unix vs. AT&T Unix.  AT&T put admin commands
> in section 1M and file formats in section 4.  Berkeley put them in
> 8 and 5.  Linux apparently followed the Berkeley convention.  HP made
> the change from Berkeley to the AT&T arrangement at HP-UX 5.0 in 1985,
> and it appears that Solaris (and I assume AIX) also follows that
> convention.  I have no clue why the Linux crowd took the Berkeley
> route.  Maybe it's a "California thing"?

I assume that it's because BSD licensing, etc was not commercial like
Unix so there was kind of a natural affinity.  But it does annoy me
no end!  ;-)  I think sections 1, 2, and 3 match and everything after
that is scrambled.  Okay, section 6 is sacred, too, but has never been
part of my personal world...

Anyhow, my point was that the section number incompatibility prevents
us from creating one source for both Linux and Unix so compatibility of
the internal coding may not be the biggest problem...

> > As for the larger discussions, most of what I'm writing does not need any
> > fancy formatting.  I would love to know the basic set of codings I can use
> > that are pretty likely to work on any system.  I might some day decide to
> > use something that isn't so portable but I wouldn't accidentally do that.
> > 
> > meg
> 
> In all of my manpage work, I used .TH, .SH, .SS, .TP, .IP, .RS, .RE,
> .B, .BR, .RB, .IR, .RI, .BI, .IB, and a set I created for "computer
> font" (Courier): .CI, .IC, .RC, .CR (.BC and .CB were never needed
> because the C family was used in syntax and Bold was never used in
> that context).  I don't recall using any others.  I sometimes used
> \c at the end of a line when I ran out of space (I tried to keep
> lines under about 70 characters in source text) and needed to have
> no whitespace between words/arguments.  .ne, .br, and an occasional
> .bp (maybe) were about all of the low-level requests I ever used.
> I used .PP instead of .P for paragraphs.  I may have occasionally
> used .ce, but it was very rare, if ever.

I also use .HP, and I always liked the \f1, \f2, \f3, etc.  Also \s
and .SM.  Does \0 count in this context?  I use that, too.  And I
use .sp, including -.5.  But the argument that losing the arguments
to .sp only hurts output aesthetics, not content convinces me.  I do
like to use .tr ~ when I do tables that have some blank cells.

> I also included tables and equations (.TS, .TE, and the equation
> begin/end labels (.EQ and .EE ? -- don't recall what they were),
> but never had any real problems.  To split tables across pages, I
> tried to arrange the tables so they worked correctly on troff and
> man(1)/nroff formatting by using .if n and .if t requests to get
> correct paging breaks.

You do much more sophisticated coding that I do in this context.
I've been burned by that "too many text blocks" so many times that
I tend to break tables up into smaller tables just in general...

> I wrote a shell script that used vi and ran sed inside of vi
> non-interactively (vi $file <vi_commands_file and inside of that
> file I used a line: 1G followed by !Gsed -f sedfile to run the
> entire file through sed with sedfile containing the sed commands).
> Worked like a charm and got rid of all of the \fR, \fB, \fI, etc.
> junk and changed it all to macro calls (.BR, .IR, etc.).  I could
> overhaul 1000 files in 5 minutes on a 30 Mhz processor.  We didn't
> have 2-GHz machines back in the 1980s!
> 
> And people wonder why I don't like Windows.  :-)  Sheesh!

I certainly don't wonder!  Just another indication that you are
sophisticated and urbane ;-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]