groff
[Top][All Lists]
Advanced

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

Re: [Groff] XML and groff as frontend


From: Clarke Echols
Subject: Re: [Groff] XML and groff as frontend
Date: Sat, 22 Oct 2005 14:56:35 -0600

How about using vi/vim non-interactively inside a shell script
(redirect keyboard input to vi/vim from a file), then in the
vi/vim commands file, use the editor's ability to pipe the
buffer through an external command (utility) such as sed or awk?

I used vi and sed that way to overhaul the internal fomatting
inside of hundreds of files in HP manpages in 1989, so that they
all (consistently) used man macros instead of inline coding
(\fB, \fI, etc) so that I could control fonts and layout much
better.  [AT&T ditroff that we were using always switched to
Times Roman when \fR was used instead of something the New
Century Schoolbook that I preferred and specified in the
man macros using ".fp n" requests.  By using font-position
assignments, then using \f1, \f2, \f3, \f4 in macros instead
of \fR, \fI, and \fB, I could change font families for a book
in mere minutes with zero errors.  I used font position 4 for
Courier.]

It's amazing what you can do with vi in a shell script!

Can Emacs do that?

Sorry, but I qualify as a bona fide vi bigot. :-)

Clarke

Larry Kollar wrote:
> 
<snip>
> I use structured FrameMaker at work to write documentation, and one
> of the easier ways I've found to get text into it is to paste it into
> Vim then
> pipe lines through scripts that wrap blocks of text in tags (lists,
> sections,
> and so forth). I then import that into Frame. It works very well,
> although
> the technique is probably specific to the writer and the work involved.




reply via email to

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