|
From: | Clarke Echols |
Subject: | Re: [Groff] conditional logic based on device? |
Date: | Mon, 18 Feb 2008 23:59:41 -0700 |
User-agent: | Thunderbird 2.0.0.9 (Windows/20071031) |
If you are using tty output to a user display, the man command normally uses nroff (at least that's the way it was when I was responsible for man pages at HP). You can use the requests: > .if n \" for nroff processing input and > .if t \" for troff/groff processing input Of course the code has to be enclosed within \{ and \} pairs for each .if condition. I'm not certain whether this is what you're looking for or not... Historically speaking, nroff has been the exclusive processor for displayed man pages. troff was used only for typesetting printed paper pages. Clarke Michael(tm) Smith wrote:
Is there a way I can mark up a certain chunk of groff code/markup so that it's used only for a particular device but not for others? The context of my question is this: For man-page output from the DocBook XSL Stylesheets, I have them outputting some hacky instances of \h escapes with negative values, in order to deal with some horizontal spacing problems in console output. (I'll admit there may be better ways of dealing with these particular spacing problems, but that's how I'm dealing with them now...) Because those instances screw up the formatting in PS output, what I'd like to do if possible is to wrap those \h escapes in conditionals so that they have effect only in console output, but not when generating PS output. So I'm wondering if there's a way I can do that. --Mike
[Prev in Thread] | Current Thread | [Next in Thread] |