diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/dialogl/dialog.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/dialogl/dialog.sty | 347 |
1 files changed, 347 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/dialogl/dialog.sty b/Master/texmf-dist/tex/latex/dialogl/dialog.sty new file mode 100644 index 00000000000..f3eabee0c65 --- /dev/null +++ b/Master/texmf-dist/tex/latex/dialogl/dialog.sty @@ -0,0 +1,347 @@ +%% +%% This is file `dialog.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% dialog.dtx (with options: `2e') + +%%% ==================================================================== +%%% @LaTeX-style-file{ +%%% filename = "dialog.sty", +%%% version = "0.9y", +%%% date = "1994/11/08", +%%% time = "13:31:30 EST", +%%% checksum = "20801 1436 7278 54732", +%%% author = "Michael Downes", +%%% email = "mjd@math.ams.org (Internet)", +%%% codetable = "ISO/ASCII", +%%% keywords = "TeX, dialog", +%%% supported = "yes", +%%% abstract = "This file provides functions for writing +%%% messages and menus on screen, and reading user responses. It +%%% can be used with LaTeX as a documentstyle option, or in +%%% other forms of TeX by a standard \input statement.", +%%% docstring = "The checksum field above contains a CRC-16 +%%% checksum as the first value, followed by the equivalent of +%%% the standard UNIX wc (word count) utility output of lines, +%%% words, and characters. This is produced by Robert Solovay's +%%% checksum utility.", +%%% } +%%% ==================================================================== +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{dialog}[1994/11/08 v0.9y] +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\RequirePackage{grabhedr} +%% The line break is significant here: +\localcatcodes{\@{11}\ {10}\ +{5}\~{13}\"{12}\#{6}\^{7}\`{12}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begingroup +\def\do{12 \catcode`} +\catcode`\~\do\!\do\@\do\#\do\$\do\^\do\& +\do\*\do\(\do\)\do\-\do\_\do\=\do\[\do\] +\do\;\do\:\do\'\do\"\do\<\do\>\do\,\do\. +\do\/\do\?\do\|12\relax +\escapechar -1 +\edef\\{\string\\} +\edef\{{\string\{}\edef\}{\string\}} +\catcode`\ =12\catcode`\%=12 +\xdef\otherchars +{ !"#$%&'()*+,-./:;<=>?[\\]^_`\{|\}~} +\endgroup % ^ ^ ^ +\begingroup +\endlinechar = -1 +\def\do{12 \catcode`} +\catcode`\^^@\do\^^A\do\^^B\do\^^C +\do\^^D\do\^^E\do\^^F\do\^^G\do\^^H\do\^^I +\do\^^J\do\^^K\do\^^L\do\^^M\do\^^N\do\^^O +\do\^^P\do\^^Q\do\^^R\do\^^S\do\^^T\do\^^U +\do\^^V\do\^^W\do\^^X\do\^^Y\do\^^Z\do\^^[ +\do\^^\\do\^^]\do\^^^\do\^^_\do\^^? 12\relax +\gdef\controlchars{^^@^^A^^B^^C^^D^^E^^F^^G + ^^H^^I^^J^^K^^L^^M^^N^^O^^P^^Q^^R^^S^^T + ^^U^^V^^W^^X^^Y^^Z^^[^^\^^]^^^^^_^^?} +\endgroup +\begingroup +\def\do{12 \catcode`} +\catcode`\^^80\do\^^81\do\^^82\do\^^83\do\^^84 +\do\^^85\do\^^86\do\^^87\do\^^88\do\^^89\do\^^8a +\do\^^8b\do\^^8c\do\^^8d\do\^^8e\do\^^8f +\do\^^90\do\^^91\do\^^92\do\^^93\do\^^94\do\^^95 +\do\^^96\do\^^97\do\^^98\do\^^99\do\^^9a\do\^^9b +\do\^^9c\do\^^9d\do\^^9e\do\^^9f +\do\^^a0\do\^^a1\do\^^a2\do\^^a3\do\^^a4\do\^^a5 +\do\^^a6\do\^^a7\do\^^a8\do\^^a9\do\^^aa\do\^^ab +\do\^^ac\do\^^ad\do\^^ae\do\^^af +\do\^^b0\do\^^b1\do\^^b2\do\^^b3\do\^^b4\do\^^b5 +\do\^^b6\do\^^b7\do\^^b8\do\^^b9\do\^^ba\do\^^bb +\do\^^bc\do\^^bd\do\^^be\do\^^bf +\do\^^c0\do\^^c1\do\^^c2\do\^^c3\do\^^c4\do\^^c5 +\do\^^c6\do\^^c7\do\^^c8\do\^^c9\do\^^ca\do\^^cb +\do\^^cc\do\^^cd\do\^^ce\do\^^cf +\do\^^d0\do\^^d1\do\^^d2\do\^^d3\do\^^d4\do\^^d5 +\do\^^d6\do\^^d7\do\^^d8\do\^^d9\do\^^da\do\^^db +\do\^^dc\do\^^dd\do\^^de\do\^^df +\do\^^e0\do\^^e1\do\^^e2\do\^^e3\do\^^e4\do\^^e5 +\do\^^e6\do\^^e7\do\^^e8\do\^^e9\do\^^ea\do\^^eb +\do\^^ec\do\^^ed\do\^^ee\do\^^ef +\do\^^f0\do\^^f1\do\^^f2\do\^^f3\do\^^f4\do\^^f5 +\do\^^f6\do\^^f7\do\^^f8\do\^^f9\do\^^fa\do\^^fb +\do\^^fc\do\^^fd\do\^^fe\do\^^ff 12\relax +\gdef\highchars{% +^^80^^81^^82^^83^^84^^85^^86^^87^^88% +^^89^^8a^^8b^^8c^^8d^^8e^^8f% +^^90^^91^^92^^93^^94^^95^^96^^97^^98% +^^99^^9a^^9b^^9c^^9d^^9e^^9f% +^^a0^^a1^^a2^^a3^^a4^^a5^^a6^^a7^^a8% +^^a9^^aa^^ab^^ac^^ad^^ae^^af% +^^b0^^b1^^b2^^b3^^b4^^b5^^b6^^b7^^b8% +^^b9^^ba^^bb^^bc^^bd^^be^^bf% +^^c0^^c1^^c2^^c3^^c4^^c5^^c6^^c7^^c8% +^^c9^^ca^^cb^^cc^^cd^^ce^^cf% +^^d0^^d1^^d2^^d3^^d4^^d5^^d6^^d7^^d8% +^^d9^^da^^db^^dc^^dd^^de^^df% +^^e0^^e1^^e2^^e3^^e4^^e5^^e6^^e7^^e8% +^^e9^^ea^^eb^^ec^^ed^^ee^^ef% +^^f0^^f1^^f2^^f3^^f4^^f5^^f6^^f7^^f8% +^^f9^^fa^^fb^^fc^^fd^^fe^^ff} +\endgroup +\def\actively#1#2{\catcode`#2\active + \begingroup \lccode`\~=`#2\relax + \lowercase{\endgroup#1~}} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\mesjsetup{\begingroup \count@=12 + \def\do##1{\catcode`##1\count@ \do}% + \xp@\do\otherchars{a11 \@gobbletwo}% + \xp@\do\controlchars{a11 \@gobbletwo}% + \xp@\do\highchars{a11 \@gobbletwo}% + \actively\edef\^^I{ \space\space\space + \space\space\space\space}% + \endlinechar=`\^^M\actively\let\^^M=\relax + \catcode`\{=1 \catcode`\}=2 } +\def\sendmesj{\newlinechar`\^^J% + \actively\def\^^M{^^J}% + \immediate\write\sixt@@n{\mesjtext}\endgroup} +\def\mesj{\mesjsetup \afterassignment\sendmesj + \def\mesjtext} +\def\sendprompt{% + \newlinechar`\!\relax \actively\def\^^M{!}% + \message{\mesjtext}\endgroup} +\def\promptmesj{\mesjsetup + \afterassignment\sendprompt \def\mesjtext} +\def\storemesj#1{\mesjsetup + \catcode`\#=6 % to allow arguments if needed + \afterassignment\endgroup + \long\gdef#1} +\def\fmesj#1#2#{\mesjsetup + \catcode`\#=6 % restore to normal + \toks@{\long\gdef#1#2}% + \def\@tempa{% + \edef\@tempa{% + \the\toks@{% + \begingroup\def\nx@\mesjtext{\the\toks2 }% + \nx@\sendmesj}% + }% + \@tempa + \endgroup % Turn off the \mesjsetup catcodes + }% + \afterassignment\@tempa + \toks2=} +\def\xmesjsetup{\mesjsetup + \iffalse{\fi + \catcode`\\=0 \catcode`\%=14 + \begingroup \lccode`\0=`\\\lccode`\1=`\{% + \lccode`\2=`\}\lccode`\3=`\%% + \lowercase{\endgroup \def\\{0}\def\{{1}% + \def\}{2}\def\%{3}}% + \iffalse}\fi + \edef\&{\string &}% + \actively\let\&=\noexpand + \actively\let\^^M=\relax + \def\.{}% + \def\ { }\edef~{\string ~}% + \begingroup \lccode`\~=`\^^M% + \lowercase{\endgroup \def\^^M{~}}% + \let\^^J\^^M \def\par{\^^M\^^M}% +} +\def\xmesj{\xmesjsetup \afterassignment\sendmesj + \edef\mesjtext} +\def\promptxmesj{\xmesjsetup + \afterassignment\sendprompt \edef\mesjtext} +\def\storexmesj#1#2#{\xmesjsetup + \catcode`\#=6 % to allow arguments if needed + \edef\#{\string##}% + \afterassignment\endgroup + \long\xdef#1#2} +\def\fxmesj#1#2#{\xmesjsetup + \catcode`\#=6 % restore to normal + \edef\#{\string##}% + \toks@{\long\xdef#1#2}% + \def\@tempa{% + \edef\@tempa{% + \the\toks@{\begingroup + \def\nx@\nx@\nx@\mesjtext{\the\toks\tw@}% + \nx@\nx@\nx@\sendmesj}}% + \@tempa % execute the constructed xdef + \endgroup % restore normal catcodes + }% + \afterassignment\@tempa + \toks\tw@=} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\readline#1#2{% + \begingroup \count@ 12 % + \def\do##1{\catcode`##1\count@ \do}% + \xp@\do\otherchars{a11 \@gobbletwo}% + \xp@\do\controlchars{a11 \@gobbletwo}% + \xp@\do\highchars{a11 \@gobbletwo}% + \catcode`\ =10 \catcode`\^^I=10 % + \catcode`\^^M=9 % ignore + \endlinechar`\^^M + \read\m@ne to#2% + \edef#2{\def\nx@#2{#2}}% + \xp@\endgroup #2% + \ifx\@empty#2\def#2{#1}\fi +} +\def\xreadline#1#2{% + \begingroup + \xp@\let\csname bye\endcsname\relax + \xp@\let\csname newif\endcsname\relax + \xp@\let\csname newcount\endcsname\relax + \xp@\let\csname newdimen\endcsname\relax + \xp@\let\csname newskip\endcsname\relax + \xp@\let\csname newmuskip\endcsname\relax + \xp@\let\csname newtoks\endcsname\relax + \xp@\let\csname newbox\endcsname\relax + \xp@\let\csname newinsert\endcsname\relax + \xp@\let\csname +\endcsname\relax + \actively\let\^^L\relax + \catcode`\^^M=9 % ignore + \endlinechar`\^^M% reset to normal + \read\m@ne to#2% + \toks@\xp@{#2}% + \edef\@tempa{\def\nx@#2{\the\toks@}}% + \xp@\endgroup \@tempa + \ifx\@empty#2\def#2{#1}\fi +} +\def\readchar#1#2{% + \readline{#1}#2% + \edef#2{\xp@\@car#2#1{}\@nil}% +} +\def\readChar#1#2{% + \readline{#1}#2% + \changecase\uppercase#2% + \edef#2{\xp@\@car #2#1{}\@nil}% +} +\def\changecase#1#2{\@casetoks\xp@{#2}% + \edef#2{#1{\def\nx@#2{\the\@casetoks}}}#2} +\newtoks\@casetoks +\def\checkinteger#1#2{\let\scansign@\@empty + \def\scanresult@{#2}% + \xp@\scanint#1x\endscan} +\def\scanint#1{% + \ifodd 0#11 % + \def\@tempa{\afterassignment\endscan + \scanresult@=\scansign@#1}% + \else + \if -#1\relax + \edef\scansign@{% + \ifx\@empty\scansign@ -\fi}% + \def\@tempa{\scanint}% + \else + \if +#1\relax + \def\@tempa{\scanint}% + \else % not a valid number + \def\@tempa{% + \scanresult@=-\maxdimen\endscan}% + \fi\fi\fi + \@tempa +} +\def\endscan#1\endscan{} +\newcount\dimenfirstpart +\newtoks\dimentoks +\def\scandimen#1{% + \ifodd 0#11 + \def\@tempa{\def\@tempa{\scandimenb}% + \afterassignment\@tempa + \dimenfirstpart#1}% + \else + \if \if,#1.\else#1\fi.% + \def\@tempa{\scandimenc}% + \else + \if -#1% then flipflop the sign + \edef\scansign@{% + \ifx\@empty\scansign@ -\fi}% + \def\@tempa{\scandimen}% + \else + \if +#1% then ignore it + \def\@tempa{\scandimen}% + \else % not a valid dimen + \def\@tempa{% + \scanresult@=-\maxdimen\endscan}% + \fi\fi\fi\fi + \@tempa +} +\def\scandimenb#1{% + \if \if,#1.\else#1\fi.% + \def\@tempa{\scandimenc}% + \else + \def\@tempa{\scanunitsa#1}% + \fi + \@tempa +} +\def\scandimenc#1{% + \ifodd 0#11 \dimentoks\xp@{% + \the\dimentoks#1}% + \def\@tempa{\scandimenc}% + \else + \def\@tempa{\scanunitsa#1}% + \fi + \@tempa +} +\def\scanunitsa#1\endscan{% + \def\@tempa##1true##2##3\@tempa{##2}% + \lowercase{% + \xp@\ifx\xp@\end + \@tempa#1true\end\@tempa + }% + \let\dimentrue@\@empty + \def\@tempa{\scanunitsb#1\endscan}% + \else + \def\dimentrue@{true}% + \def\@tempa##1true##2\@tempa{% + \def\@tempa{##1}% + \ifx\@tempa\@empty + \def\@tempa{\scanunitsb##2\endscan}% + \else + \def\@tempa{\scanunitsb xx\endscan}% + \fi}% + \@tempa#1\@tempa + \fi + \@tempa +} +\def\scanunitsb#1#2{% + \def\@tempa##1#1#2##2##3\@nil{##2}% + \def\@tempb##1{T\@tempa + pcTptTcmTccTemTexTinTmmTddTspT##1F\@nil}% + \lowercase{% + \if\@tempb{#1#2}% + }% + \scanresult@=\scansign@ + \number\dimenfirstpart.\the\dimentoks + \dimentrue@#1#2\relax + \else + \scanresult@=-\maxdimen + \fi + \endscan +} +\def\checkdimen#1#2{% + \let\scansign@\@empty \def\scanresult@{#2}% + \let\dimentrue@\@empty + \dimenfirstpart\z@ \dimentoks{}% + \xp@\scandimen#1xx\endscan +} +\restorecatcodes +\endinput +%% +%% End of file `dialog.sty'. |