> I know I'm coming in late, but there are two things I'd do > differently: set a default and use relative spacing (v) > instead of machine units (u). > > .de blank_aux > . if !rblankreg .nr blankreg 0.4v > . sp \\n[blankreg]u > .. > .blm blank_aux > > Replace the 0.4v above with whatever you want the default > value to be and it will work with the entire range of devices > and text sizes.
Unfortunately this implementation has the disadvantage that the blank line spacing is fixed with the baseline spacing in effect when the macro is first called. For example, if you first call it in the title which, say, has a font size of 24pt and a baseline spacing of 26pt, and then switch to body text with font size 10pt and baseline spacing 12pt, the blank line spacing will not be 0.4v of that of the body text. The solution Miklos gave does not have this problem, but it works correctly only when "blank" is called without units, always with the interpretation that the number represents "V"s. The default centimeter scale is somewhat misleading. It's there only to introduce a scaling factor to store a non-integer in an integer register. The scaling factor is divided out again in "blank_aux". (Although he should have simply said "1c" instead of "28340", to be independent of the unit scale of the output device.) (By the way, the correct number for devps appears to be "28346".) Perhaps the best solution would be to simply defer computation of the spacing until it is actually needed. This is possible by storing the desired spacing in a string instead of a register, which allows the units to be preserved: .de blank .ds blankreg \\$1 .. .de blank_aux .sp \\*[blankreg] .. .blm blank_aux
