On Sun, 14 Apr 2002, Hans Hagen wrote:
> At 05:48 PM 4/11/2002 +1000, Daniel Pittman wrote:
>>I have tried to find some predefined code in ConTeXt to do the
>>equivalent of the 'nicefrace' package for LaTeX. This, basically,
> 
> hm, dunno packages that well -) 

I figured it might help if my description totally sucked. That way
people would know what I was aiming for and could check the original if
they cared that deeply about my little problems. ;)

> does this mean that one macro has a whole package?

Um, yeah, pretty much. It claims to take do a good job in math mode
also, though I don't know what values of "good" it uses in this context.

One of my main reasons for enjoying ConTeXt, not LaTeX, work so far has
been that, in ConTeXt, there are not twenty or thirty things like this
to do single macro jobs.

Ideas tend to either be solid, complete and in the distribution or
sufficiently simple to implement with the ConTeXt support code that it's
nice to write them.

[...]

>>I can do this myself using raise, lower and kern operations, but it
>>would be nicer and (presumably) much more reliable if written by
>>someone who knew more about TeX character layout than I do.
> 
> well, let me show you a couple of tricks then, see below:

Thanks for taking the time to share your knowledge. It's really very
nice of you. :)

[...]

> \def\textfrac#1#2%
>    {\dontleavehmode
>     \hbox
>       {\setbox0\hbox{/}%
>        \setbox2\hbox{\txx57}%
>        \raise\ht0\hbox{\lower\ht2\hbox{\txx#1}}%
>        \hbox to \zeropoint{\hss/\hss}%
>        \lower\dp0\hbox{\raise\dp2\hbox{\txx#2}}}}
> 
> test \textfrac{1}{2} test \textfrac{123}{456} test
> 
> Now, if you really want to see something nice, say \showmakeup before
> the calls to this macro -)

Very impressive, compared to the others -- it seems a much cleaner
layout, in the glue.

> What do others think? Which one is the nicest for default (i opt for
> the (as usual best) third one, so that one goes into core-mis.tex and
> will end up in the documentation void -)

The last looks the best for single digit figures, by far. It seems about
equivalent to the second last for the longer sequences, anyway.

Thanks,
        Daniel

-- 
An expert is a person who has made all the mistakes which can be made
in a very narrow field.
        -- Niels Bohr

Reply via email to