summaryrefslogtreecommitdiff
path: root/systems/tex-extensions/clasen/math/cramp.ch
blob: 57231a383f12f3f4d92c265630a0cfc0f8457f4f (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
@x
begin case c div 2 of
0: print_esc("displaystyle"); {|display_style=0|}
1: print_esc("textstyle"); {|text_style=2|}
2: print_esc("scriptstyle"); {|script_style=4|}
3: print_esc("scriptscriptstyle"); {|script_script_style=6|}
othercases print("Unknown style!")
@y
begin case c of
display_style:               print_esc("displaystyle");
display_style+cramped:       print_esc("crampeddisplaystyle");
text_style:                  print_esc("textstyle"); 
text_style+cramped:          print_esc("crampedtextstyle");
script_style:                print_esc("scriptstyle"); 
script_style+cramped:        print_esc("crampedscriptstyle");
script_script_style:         print_esc("scriptscriptstyle"); 
script_script_style+cramped: print_esc("crampedscriptscriptstyle");
othercases                   print("Unknown style!")
@z
@x
primitive("displaystyle",math_style,display_style);
@!@:display_style_}{\.{\\displaystyle} primitive@>
primitive("textstyle",math_style,text_style);
@!@:text_style_}{\.{\\textstyle} primitive@>
primitive("scriptstyle",math_style,script_style);
@!@:script_style_}{\.{\\scriptstyle} primitive@>
primitive("scriptscriptstyle",math_style,script_script_style);
@!@:script_script_style_}{\.{\\scriptscriptstyle} primitive@>
@y
primitive("displaystyle",math_style,display_style);
@!@:display_style_}{\.{\\displaystyle} primitive@>
primitive("crampeddisplaystyle",math_style,display_style+cramped);
@!@:cramped_display_style_}{\.{\\crampeddisplaystyle} primitive@>
primitive("textstyle",math_style,text_style);
@!@:text_style_}{\.{\\textstyle} primitive@>
primitive("crampedtextstyle",math_style,text_style+cramped);
@!@:cramped_text_style_}{\.{\\crampedtextstyle} primitive@>
primitive("scriptstyle",math_style,script_style);
@!@:script_style_}{\.{\\scriptstyle} primitive@>
primitive("crampedscriptstyle",math_style,script_style+cramped);
@!@:cramped_script_style_}{\.{\\crampedscriptstyle} primitive@>
primitive("scriptscriptstyle",math_style,script_script_style);
@!@:script_script_style_}{\.{\\scriptscriptstyle} primitive@>
primitive("crampedscriptscriptstyle",math_style,script_script_style+cramped);
@!@:cramped_script_script_style_}{\.{\\crampedscriptscriptstyle} primitive@>
@z