summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/struktex/struktxp.sty
blob: f3f89049f1315b5dc17bc9537f2b7742c2481e8e (plain)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
%%
%% This is file `struktxp.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% struktex.dtx  (with options: `struktxp')
%% 
%% Copyright (C) 1989-2006 by Jobst Hoffmann.  All rights reserved.
%% 
%% IMPORTANT COPYRIGHT NOTICE:
%% 
%% No other permissions to copy or distribute this file in any form
%% are granted and in particular NO PERMISSION to modify its contents.
%% 
%% You are NOT ALLOWED to change this file.
%% 
%% Please address error reports and any problems in case of UNCHANGED versions
%% to
%%         j.hoffmann@fh-aachen.de
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\def\filedate{2006/01/20}
\def\fileversion{v8.2a}
\ProvidesPackage{struktxp}
   [\filedate\space\fileversion\space Keywords for Nassi Shneidermann Charts (Jobst Hoffmann)]
%%
\@ifundefined{pVariable}{}{\endinput}
\newcommand{\pExpFont@nss}{\small\sffamily}
\newcommand{\pKeyFont@nss}{\small\sffamily\bfseries}
\newcommand{\pCommentFont@nss}{\small\sffamily\slshape}
\newcommand{\pFonts}[3]%
{%
    \def\argi@nss{#1} \def\argii@nss{#2} \def\argiii@nss{#3}
    \ifx\argi@nss\empty\else%
        \renewcommand{\pExpFont@nss}{#1}%
    \fi%
    \ifx\argii@nss\empty\else%
        \renewcommand{\pKeyFont@nss}{#2}%
    \fi%
    \ifx\argiii@nss\empty\else%
        \renewcommand{\pCommentFont@nss}{#3}%
    \fi%
}
\newcommand{\pExpression}%
{%
    \bgroup%
        \catcode`\_=12 \catcode`\^=12 \catcode`\&=12 %
        \pUseExpFont@nss%
}
\let\pExp=\pExpression
\newcommand{\pVariable}%
{%
    \bgroup%
        \catcode`\_=13 \let\_\textunderscore
        \catcode`\#=12 \catcode`\^=12 \catcode`\&=12 %
        \pVariabl@%
}
\let\pVar=\pVariable
\let\pKeyword=\pVariable
\let\pKey=\pVariable
\newcommand{\pVariabl@}[1]
{%
    \def\arg{#1}%
    \ifx\pLanguage@nss\Cee@nss%
        \CheckForKeyword@nss{auto,break,case,char,const,continue,default,do,double,%
      else,enum,extern,float,for,goto,if,int,long,register,return,%
      short,signed,sizeof,static,struct,switch,typedef,union,unsigned,%
      void,volatile,while}%
    \else\ifx\pLanguage@nss\Java@nss%
        \CheckForKeyword@nss{abstract,boolean,break,byte,case,catch,char,class,const,%
      continue,default,do,double,else,extends,final,finally,float,for,%
      goto,if,implements,import,instanceof,int,interface,long,native,%
      new,null,package,private,protected,public,return,short,static,%
      super,switch,synchronized,this,throw,throws,transient,try,void,%
      volatile,while,true,false}%
    \else\ifx\pLanguage@nss\Pascal@nss%
        \CheckForKeyword@nss{alfa,and,array,begin,boolean,byte,case,char,const,div,do,%
      downto,else,end,false,file,for,function,get,goto,if,in,integer,%
      label,maxint,mod,new,not,of,or,pack,packed,page,program,put,%
      procedure,read,readln,real,record,repeat,reset,rewrite,set,text,%
      then,to,true,type,unpack,until,var,while,with,write,writeln}%
    \else\ifx\pLanguage@nss\Python@nss%
        \CheckForKeyword@nss{and,assert,break,class,continue,def,del,elif,else,%
      except,exec,finally,for,from,global,if,import,in,is,lambda,not,or,%
      pass,print,raise,return,try,while,yield}%
    \else\ifx\pLanguage@nss\LaTeX@nss%
        \CheckForKeyword@nss{center,description,enumerate,figure,itemize,
      list,quote,tabbing,tabular,table,}%
    \else%
        \CheckForKeyword@nss{}%
    \fi\fi\fi\fi\fi%
    \egroup%
}
\newcommand{\pLanguage}[1]{\gdef\pLanguage@nss{#1}}
\def\Cee@nss{C}
\def\Java@nss{Java}
\def\Pascal@nss{Pascal}
\def\LaTeX@nss{LaTeX}
\def\Python@nss{Python}
\def\OSII@nss{OS/2}
\def\CheckForKeyword@nss#1%
{%
    \let\exec\pExpFont@nss%
    \def\endList{!}%
    \def\yyI##1,%
    {%
        \def\token{##1}%
        \ifx\token\endList%
            \ifmmode\else\let\mbox=\relax\fi%
            \mbox{\exec\selectfont\arg}%
        \else%
            \ifx\token\arg%
                \let\exec\pKeyFont@nss%
            \fi%
            \expandafter\yyI%
        \fi%
    }%
    \yyI#1,!,%
}
\def\pComment%
{%
    \bgroup%
        \pCommentFont@nss%
        \let\next=%
}
{
    \catcode`\#=6%
    \gdef\pUseKeyFont@nss#1%
    {%
        \ifmmode\else\let\mbox=\relax\fi%
        \mbox{\pKeyFont@nss{#1}}\egroup%
    }
    \gdef\pUseExpFont@nss#1%
    {%
        \ifmmode\else\let\mbox=\relax\fi%
        \mbox{\pExpFont@nss{#1}}\egroup%
    }
}
\newcommand{\pTrue@nss}{\texttt{WAHR}}
\newcommand{\pFalse@nss}{\texttt{FALSCH}}
\newcommand{\pTrue}{\pTrue@nss}
\newcommand{\pFalse}{\pFalse@nss}
\newcommand{\pBoolValue}[2]%
{%
    \renewcommand{\pTrue@nss}{#1}%
    \renewcommand{\pFalse@nss}{#2}%
}
\let\sBoolValue=\pBoolValue
\let\sVar=\pVariable
\let\sKey=\pKeyword
\let\sTrue=\pTrue
\let\sFalse=\pFalse
\endinput
%%
%% End of file `struktxp.sty'.