File: type-run.tex

package info (click to toggle)
tetex-base 3.0.dfsg.3-5etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 239,592 kB
  • ctags: 10,610
  • sloc: xml: 103,461; perl: 9,398; ruby: 2,850; python: 1,551; php: 1,067; sh: 981; lisp: 494; makefile: 371; awk: 88
file content (52 lines) | stat: -rw-r--r-- 1,742 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
%D \module
%D   [       file=type-run,
%D        version=2001.04.20,
%D          title=\CONTEXT\ Typescript Macros,
%D       subtitle=Runtime Macros,
%D         author=Hans Hagen,
%D           date=\currentdate,
%D      copyright={PRAGMA / Hans Hagen \& Ton Otten}]
%C
%C This module is part of the \CONTEXT\ macro||package and is
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.

\unprotect

\gdef\typetypescript
  {\dotripleempty\dotypetypescript}

\gdef\dotypetypescript[#1][#2][#3]%
  {\bgroup
   \def\dochecktypescript##1##2% script use
     {\doifelsenothing{##1##2}
        {\donetrue}
        {\ExpandBothAfter\doifcommonelse{##1}{##2}\donetrue\donefalse}}
   \edef\typescriptone  {\truetypescript{#1}}%
   \edef\typescripttwo  {\truetypescript{#2}}%
   \edef\typescriptthree{\truetypescript{#3}}%
   \def\starttypescript
     {\bgroup
      \obeylines % else we loose the first line due to lookahead
      \dotripleempty\dostarttypescript}
   \def\dostarttypescript[##1][##2][##3]%
     {\long\def\next####1\stoptypescript{\egroup}
      \dochecktypescript{##1}\typescriptone  \ifdone
      \dochecktypescript{##2}\typescripttwo  \ifdone
      \dochecktypescript{##3}\typescriptthree\ifdone
        \def\next%
          {\def\stoptypescript%
             {\egroup\type{\stoptypescript}}
           % what follows now is quite ugly
           \skipfirstverbatimlinefalse
           \processdisplayverbatim{\stoptypescript}%
           \type{\starttypescript}
           \doifsomething{##1}{\type{[##1]}}
           \doifsomething{##2}{\type{[##2]}}
           \doifsomething{##3}{\type{[##3]}}}
      \fi\fi\fi
      \next}
  \processcommacommand[\typescriptfiles]\dodousetypescript
  \egroup}

\protect \endinput