wildbill@ucbvax.UUCP (William J. Laubenheimer) (06/18/84)
I have been having a problem with the .ip (indented paragraph) macro. What I would like to do in a list where I have a bunch of hanging tags such as "First:", "Second:", etc., in order to get the proper indentation on the indented paragraphs, is to have {n,t}roff calculate the proper indentation using the width operator \w. It seems that the proper invocation (assuming "Second:" was the longest tag) would be: .ip First: \w'Second: ' but when I try this, the result is a funny string attached to the end of the preceding text item, such as in the following example: <random text>291.@p 150u in this case. This looks like it's coming from the body of the .ip macro, which calls the internal -me macro .@p just after it identifies the existence of a hanging tag and sets up a number register containing the indentation for tags if it is given. I have tried a few variations: an extra backslash before the width operator, a unit designation after the second argument, enclosing the first argument in quotes; all result in the same obnoxious string. Does anybody out there have a solution, or am I (horrors!) going to have to make a special case out of the thing? ____ Bill Laubenheimer ___ / \ ___ UC-Berkeley Computer Science / \ | o o | / \ ucbvax!wildbill ------+++----------()----------+++------ ...Killjoy was here!
bb@wjh12.UUCP (byer) (06/20/84)
@ *** From: wildbill@ucbvax.UUCP ** ** to have {n,t}roff calculate the proper indentation using the ** width operator \w, [i]t seems that the proper invocation ** (assuming "Second:" was the longest tag) would be: ** ** .ip First: \w'Second: ' ** > [ reply from chris @umcp-cs ] > \w is almost always only useful if you write \w'stuff'u. The final `u' > means that the number should be taken as a value in internal units (which > vary between nroff and troff and---I believe---between devices in ditroff). To clarify further: Instead of .ip First: \w'Second: 'u I'd recommend .ip First: "\w'Second:\ 'u" The double quotes delimit the second argument to `.ip'. Otherwise, you've got 3 args and some grief ahead. The u following the width construction (\w...) serves as a <unit> scale factor, preventing subsequent interpolations from thinking that the arg requires further scaling. The backslash \ after the colon : serves to keep the width of the following space from being expanded during justification which can really drive you batty; `Why won't it work, chucko?' Who's Next? (Pure and Easy) Brent Byer (decvax!genrad!wjh12!bb)
chris@umcp-cs.UUCP (06/26/84)
* From: wildbill@ucbvax.UUCP to have {n,t}roff calculate the proper indentation using the width operator \w, [i]t seems that the proper invocation (assuming "Second:" was the longest tag) would be: .ip First: \w'Second: ' \w is almost always only useful if you write \w'stuff'u. The final `u' means that the number should be taken as a value in internal units (which vary between nroff and troff and---I believe---between devices in ditroff). (Things like this are why I use TeX.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci (301) 454-7690 UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@maryland