groff
[Top][All Lists]
Advanced

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

Re: [Groff] conditional logic based on device?


From: Michael(tm) Smith
Subject: Re: [Groff] conditional logic based on device?
Date: Thu, 21 Feb 2008 14:08:16 +0900
User-agent: Mutt/1.5.14r5351+poontang (2008-01-29 21:06:38+09:00)

Werner LEMBERG <address@hidden>, 2008-02-20 18:53 +0100:

> > >  >     .if n         \" for nroff processing input
> > > 
> > >  >     .if t         \" for troff/groff processing input
> > 
> > I read the groff info node about conditionals, but just didn't know
> > how to specify a condition that would only affect console output.
> 
> Hmm.  groff.texinfo has an index entry for `nroff mode' which points
> to section named `Troff and Nroff Mode', and which explains the
> differences.  Anyway, I'll add links.

OK, I did now read the following in the that node:

  "Originally, `nroff' and `troff' were two separate programs, the
  former for TTY output, the latter for everything else. [...] it
  is sometimes necessary to make a distinction between TTY and
  non-TTY devices: `gtroff' provides two built-in conditions `n'
  and `t' for the `if', `ie', and `while' requests to decide
  whether `gtroff' shall behave like `nroff' or like `troff'."

So that makes it very clear. The problem is that I didn't know
enough about the distinction to know what to search for in the
index. I wouldn't have thought to search for "nroff mode", because
before Clarke pointed out the nroff/troff distinction, I didn't
know about it (yeah, I know this reveals I have some basic
ignorance about groff fundamentals).

What I had been searching for in the index was "TTY". So maybe
what would help would be an index entry like "TTY, conditional
output for" (or something).

  --Mike

-- 
Michael(tm) Smith
http://people.w3.org/mike/
http://sideshowbarker.net/

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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