[comp.text.tex] TeX Cutesies

ajayshah@alhena.usc.edu (Ajay Shah) (04/10/91)

A TeX Cutesy is a fragment of TeX which is relatively general: it
can be used in writing many a document.  A beautifully crafted
{\tt manual.sty} is not a TeX Cutesy because it helps you
write better manuals, it is not a generally reusable fragment of
code.

Here is one I picked off comp.text.tex long ago:
-------------------Cut Here-------------------------------------------
\def\bigfirstletter#1#2{{\noindent
    \setbox0\hbox{\Huge #1}\setbox1\hbox{#2}\setbox2\hbox{(}%
    \count0=\ht0\advance\count0 by\dp0\count1\baselineskip
    \advance\count0 by-\ht1\advance\count0 by\ht2
    \dimen1=.5ex\advance\count0 by\dimen1\divide\count0 by\count1
    \advance\count0 by1\dimen0\wd0
    \advance\dimen0 by.25em\dimen1=\ht0\advance\dimen1 by-\ht1
    \global\hangindent\dimen0\global\hangafter-\count0
    \hskip-\dimen0\setbox0\hbox to\dimen0{\raise-\dimen1\box0\hss}%
    \dp0=0in\ht0=0in\box0}#2}
----------------------------------------------------------------------

Now if you \input this guy, then you get to say

\bigfirstletter String

and the S will come out in Huge.

Do you have cutesies like this?

-- 
_______________________________________________________________________________
Ajay Shah, (213)734-3930, ajayshah@usc.edu
                             The more things change, the more they stay insane.
_______________________________________________________________________________