After an extended hiatus, during which time I have been using the kludge of fractions within TeX , I am back to trying to get what I want with groff. The last adjustments took care of most of my problems. In mode 1, the blanks, etc. are printed and followed by whatever punctuation is present. However in modes 2 and 3, I am unable to get the punctuation to print. Any suggestions would be greatly appreciated.
.... .if \\n[m]=1 .char _ \v'.2m'\h'.1m'\D'l .8m 0'\h'.1m'\v'-.2m' .if \\n[m]=2 .char _ \v'.2m'\D'l 1m 0'\v'-.2m' .if \\n[m]=3 .char _ \v'.2m'\D'l 1m 0'\v'-.2m' ....... \h'\\n[w]u'\v'1m'\\*[n]\v'-1m'\h'\\n[w]u'\\$2\x'1m'\x'-1m' This now prints the blank-number centered below the blank: it moves the necessary horizontal distance (calculated as register "w" above) and moves 1 em below the baseline, prints the number, moves 1 em up again and horizontally the same distance as before, which should leave us at the end of the blank (if we haven't miscalculated). Then it outputs any supplied punctuation (\$2) (if there is none, this simply resolves to nothing) and tells groff that the line contains overlarge items (the number below the blank (\x'1m'), and a bit of extra space above (\x'-1m') to give the student room to fill in the word). (You can see the effect of these when you create exercises spanning multiple lines.) Now the word is finished, and groff can start linebreaking if necessary. ...... then we print the blank and the number as before, \Z'\\*[W]'\c \h'\\n[w]u'\v'1m'\\*[n]\v'-1m'\h'\\n[w]u'\\$2\x'1m'\x'-1m' -- View this message in context: http://old.nabble.com/Using-variables-from-register-within-fractions-or-equations-tp33299025p35285428.html Sent from the Groff - General mailing list archive at Nabble.com.