[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Using variables from register within fractions or equations

From: maouinin
Subject: Re: [Groff] Using variables from register within fractions or equations
Date: Fri, 12 Apr 2013 00:04:21 -0700 (PDT)

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'


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,


View this message in context:
Sent from the Groff - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]