Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site erix.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!mcvax!enea!erix!toni From: toni@erix.UUCP (Toni Roth) Newsgroups: net.unix Subject: Bugs in troff? Message-ID: <904@erix.UUCP> Date: Thu, 18-Jul-85 15:02:10 EDT Article-I.D.: erix.904 Posted: Thu Jul 18 15:02:10 1985 Date-Received: Sat, 20-Jul-85 10:02:20 EDT Organization: L M Ericsson, Stockholm, Sweden Lines: 63 I recently started to use troff in order to write a macro package. As troff is new to me, I'm not sure it's really bugs that I've found, or if I use troff incorrect. However, I tried to write a macro that would print a header on each new page. The problem is : If it's the first page, I want to write something on a certain line on a certain distance from the edge. After that I always want to write something else further to the right, on the same line. So I had to split the in-line-commands in smaller parts, which made one piece each. I tried several variations, but none seemed to work. When I tried to find out why, I discovered that troff does not ignore comments and handles \c, \\c and \ at end of lines strangely. After a lot of trial-and error, this worked correctly: .de hd . . . \v'|1c'\ \h'|11.4c'\ \\*(ko \h'|18c.7c'\\n% .br or \v'|1c'\c \h'|11.4c'\ \\*(ko \h'|18c.7c'\\n% .br The things that didn't work was: \v'|1c'\ \h'|11.4c'\c \\*(ty\ \h'|18c.7c'\\n% .br \v'|1c'\ \h'|11.4c'\\c \\*(ty\ \h'|18c.7c'\\n% .br \v'|1c'\c\"comment \h'|11.4c'\ \\*(ty\ \h'|18c.7c'\\n% .br Which made breaks before the string ty was printed. There were many other strange things, but I can't list them all. My questions are: How do I split the in-line-commands (what do I put on the end of the macro lines) if I want to continue on the same line? How do I use \, \c and \\c ? How do I put comments on the end of in-line-command - lines?