real language

Bookmarking Digg Diigo DZone Earthlink Google
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language TeX/LaTeX

Author:Craig J. Copi
Score: (2.95 in 119 votes)
%% TeX/LaTeX version of 99 bottles of Beer
%% Craig J Copi -
   \the\beercurr\ bottles of beer on the wall,\par 
   \the\beercurr\ bottles of beer,\par 
   take one down, pass it around,\par 
   \advance\beercurr by -1 
   \the\beercurr\ bottle\ifnum1<\beercurr{s}\fi\ of beer on the wall.\par 
   \vskip 2ex\relax
   1 bottle of beer on the wall,\par 1 bottle of beer,\par 
   take one down, pass it around,\par no bottles of beer on the wall.\par 
   \vskip .5ex
   Time to buy some more beer\ldots. \let\next=\relax


Download Source | Write Comment

Alternative Versions


>>  Volker Kuhlmann said on 05/16/05 02:21:49

Volker Kuhlmann This works in neither TeX nor LaTeX. LaTeX just spits a "missing \begin{document}" and calls it quits. TeX doesn't create the last page of output because the whole document is missing termination with \bye.

Does anyone ever test the programs posted here?

>>  Stefan Scheler said on 05/16/05 19:44:36

Stefan Scheler Well, this is material from Tim's first version of the site. This code is ~10 years old. So I assume it worked with a previous version of tex. Try this one instead.

And dude, of course we don't have to time to check all this old stuff. We do this in our free time.

>>  Kiyoshi Akima said on 04/25/06 03:51:29

Kiyoshi Akima It works fine in TeX if you change the \ldots toward the bottom to \dots

>>  Johannes said on 02/02/10 14:08:51

Johannes The assumption that it will work with an earlier version of TeX is most probably wrong. TeX is a *very* stable language, virtually unchanged since 1978 a.f.a.i.k.

BTW, anything free comes with no guarantee.

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!




Security Code: