Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!cit-vax!elroy!smeagol!jplgodo!jplcwp!deutsch From: deutsch@jplcwp.UUCP Newsgroups: comp.unix.questions,comp.unix.wizards,comp.unix.xenix Subject: NROFF/TROFF Diversions Message-ID: <187@jplcwp.UUCP> Date: Fri, 17-Apr-87 21:11:58 EST Article-I.D.: jplcwp.187 Posted: Fri Apr 17 21:11:58 1987 Date-Received: Sat, 18-Apr-87 19:02:23 EST Organization: Jet Propulsion Labs, Pasadena, CA Lines: 179 Keywords: NROFF/TROFF DVERSIONS Xref: utgpu comp.unix.questions:1743 comp.unix.wizards:1790 comp.unix.xenix:222 I have an urgent yet probably a minor problem to resolve. It deals with diversions under nroff/troff. The register "dn" as I know gives the number of lines since last diversion, however in my case it comes up with a number of 320 for nroff and 400 for troff, instead of 9 as the following example shows. Follows the input text: -------------------input text------------------------ .sp 4 .nf .ll 30 .po 3 .de TM .ti +19 Copyright Courseware Technologies Inc., 1986 .. .de MP .wh -26 PM .. .de PM .sp 1 .. .de SE .sp 10 .. .de ED \l'2.0i' .. .de MP .wh -26 PM .. .de PM .sp 1 .. .de EP .wh -2 PE .. .nr SP 0 .nr S1 0 .nr S2 0 .de KS .br .ev 1 .nr dn 0 .nf .di XX .. .de KE .br .di .nr SP 18-\\n(dn .nr S1 \\n(SP/2 .nr S2 (\\n(SP-\\n(S1) .if \\n(dn>=\\(.t .bp #.sp \\n(SP #.sp \\n(S1 .XX #.sp \\n(S2 #.sp \\n(dn .ev .. .de PE .tl : Copyright Courseware Technologies Inc. 1987, Page 1 - %: .bp .. .EP .MP System Administrator 2-0 .TS box expand; c a. TOPICS TO LEARN _ .KS 1 - The Hierarchical File System 2 - UNIX File Types 3 - File Ownership 4 - File Protection and How To Change it .KE .TE System Administrator 2-1.1 .TS box expand; c a. HIERARCHICAL FILE SYSTEM _ \(bx The UNIX file system is a uniform set of directories and files arranged in a tree-like, hierarchical structure. \(bx The files are grouped into directories and the directories organized into a hierarchy. \(bx The top of the hierarchy is a special directory called root , with a pathname of / . \(*x A pathname is the complete name of a directory or a file. \(*x A pathname traces the path through the file system to the desired file. .TE ------------------------------- follows the output ------------------- System Administrator 2-0 8 _________________________________________________ TOPICS TO LEARN 8 _________________________________________________ #.sp -302 #.sp -151 1 - The Hierarchical File System 2 - UNIX File Types 3 - File Ownership 4 - File Protection and How To Change it #.sp -151 #.sp 320 8 _________________________________________________ -------------------------------------------------------- What should I do go get the right number for the register "dn", or how would I center "vertically" (not with .ce) text on a page of a limited length, e.g. On a page of .pl 40, a text of 25 lines, i.e. what macros should I use to get 7/8 blanks in front of the text and 7/8 lines after. Your time and help are greatly appreciated. Thanks in advance. Michael Deutsch