diff options
author | Karl Berry <karl@freefriends.org> | 2013-01-25 23:16:00 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-01-25 23:16:00 +0000 |
commit | 220642dbc88e804b285b1d77b7785de73213236b (patch) | |
tree | 13fcfc4321774d63f2dc2dea4f623e4ce23ee3b1 /Master/texmf-dist/doc/latex/dialogl/fontmenu.tex | |
parent | 6e7e69cd3889f06015e1d00cd9ef3a7e582f238a (diff) |
dialogl 1.99a reinstated as lppl (24jan13)
git-svn-id: svn://tug.org/texlive/trunk@28946 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/dialogl/fontmenu.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/dialogl/fontmenu.tex | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/dialogl/fontmenu.tex b/Master/texmf-dist/doc/latex/dialogl/fontmenu.tex new file mode 100644 index 00000000000..8812fab1fa1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/dialogl/fontmenu.tex @@ -0,0 +1,72 @@ +% Copyright 1994 Michael John Downes +% Copyright 2013 TeX Users Group +% This file is part of the dialogl package, released under the LPPL; +% see dialogl.ins for details. + +\def\ComputerModern{\gdef\fontbase{Times}\gobble} +\def\Garamond{\gdef\fontbase{Computer Modern}\gobble} +\def\Helvetica{\gdef\fontbase{Garamond}\gobble} +\def\Malibu{\gdef\fontbase{Helvetica}\gobble} +\def\Times{\gdef\fontbase{Malibu}\gobble} + +\def\gobble#1\endgobble{} + +% Make sure we have a reasonable \newlinechar +\newlinechar=`\^^J \catcode\newlinechar=12 + +\begingroup +\catcode`\<=1 \catcode`\ =2\relax +\gdef\menustart{\errmessage<% +....................................... }% +\endlinechar\newlinechar\catcode`\ =12\relax +\gdef\menutext{ + ....................................... + ....................................... + + Select the font base you wish to use: + + [1] Computer Modern [4] Malibu + [2] Garamond [5] Times + [3] Helvetica + + (Default: Times)}% +\endgroup% percent here to avoid extra \newlinechar + +\begingroup +\immediate\write16{\menutext} +% If the user accidentally types 33 instead of 3 they will get past +% all the legitimate menu choices. So to keep that from causing +% trouble, we throw in a bunch of ~ characters below to perform +% error recovery. The standard maximum number of tokens that TeX +% will delete at one time is 99. +\catcode`\~=\active % just to make sure +\def~{\newlinechar`\^^J% restore normal value + \message{% +Whoops! Well, you got Times as your font base, I think}% + \gobble} +% Minimize unwanted error context (note: setting +% this to -1 doesn't suppress any more information) +\errorcontextlines 0 +\newlinechar=`\! % to hide the automatic ! from \errmessage +\gdef\fontbase{Times} +% Inside the next group we make the space character +% active so that we can use it to call \menustart, +% and then we use \expandafter so that the first +% space on the next line gets that catcode before +% the \endgroup makes it revert to normal. All this +% so that the user does not see `\menustart' on +% screen, only a space. +\begingroup +\catcode`\ =\active\let =\menustart\expandafter\endgroup% + % Enter a number (1...5) and press Return TWICE +\ComputerModern% Press Return to continue +\Garamond% Press Return to continue +\Helvetica% Press Return to continue +\Malibu% Press Return to continue +\Times% Press Return to continue +\gobble% +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~% +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~% +\endgobble\endgroup% +\show\fontbase +\end |