Way back in 1979, Donald Knuth, tried to give the feeling that π is irrational using the idea of infinite sequence of smaller and smaller font sizes like what I have tried to do here using HTML and CSS. How do I do the same using LaTeX?
Now to the very difficult part, how do I some how create the feeling using typesetting that π is transcendental (not a solution of any finite polynomial having integer coefficients).
.pi sub { vertical-align: baseline; font-size: 96%; }
π = 3.14159265358979323846264338327950288419716939937510
Best Answer
EDITED to allow repeat invocations without having to reset parameters, using the syntax
\diminish[scale-down-ratio]{string}
The value of
\defaultstartht
sets the strut height of the first letter (default is set to\baselineskip
), and the scale-down ratio defaults to 0.98, but may be supplied as an optional parameter.Beware that arithmetic underflows are possible, if things get teeny enough.
See addendum for pseudo 3-D effect:
ADDENDUM
Based on Yori's desire to see something more "3-D", I have EDITED to incorporate Bruno's
\slantbox
at Shear transform a "box". Combining that with a\raisebox
allows the effect which some may find more 3-D. The additional user parameters to control it are\slantvalue
which is Bruno's model parameter and\zshft
, which is an added vertical shift per letter.While the curvy tail gives a certain stylistic fading, it might be preferable to follow the rules of perspective and have the numbers vanish along a linear path to the vanishing point. What this means is that rather than an additional
\zshft
added for each letter, the\zshft
should also get smaller with each letter, so that the total shift (dZ) on the nth letter (after the 1st) should bedZ = dz + k dz + k^2 dz + ... + k^(n-1) dz
where dz is the specified
\zshft
, and k is the scale-down parameter given by\dimfrac
. Simple manipulation reveals that the shift for the nth letter (after the 1st) is:dZ = dz (1 - k^n)/(1-k)
This can be calculated in LaTeX, but requires the much more computationally intensive
fp
package. So, at the expense of compilation time, we can achieve the following:Oops!! Spill in aisle 1! (coding left to the student)