-
Notifications
You must be signed in to change notification settings - Fork 1
/
Config.m
executable file
·77 lines (65 loc) · 2.17 KB
/
Config.m
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
(* Mathematica package *)
(* this setting determines how long (at most) the FORM lines will be *)
FormLink`$FormPageWidth = 153;
FormLink`$FormOutputCellStyle = "Program";
(*
do not do this: screws up the predictive interface in Mathematica 9.0.0 ...
SetOptions[ToString, PageWidth -> 153 ];
*)
If[ Head[$FrontEnd] === System`FrontEndObject,
SetOptions[$FrontEndSession, EvaluationCompletionAction -> {"ScrollToOutput"}];
SetOptions[$FrontEndSession, MessageOptions -> {"InsufficientVersionWarning" -> False}];
];
(* another V9 thing: *)
Off[StringMatchQ::strse];
(* for running without a FrontEnd : *)
Off[FrontEndObject::notavail];
FormLink`$M2Form = {
"BernoulliB[" -> "bernoulli_(",
"Binomial[" -> "binom_(",
"Cos[" -> "cos_(",
"Factorial[" -> "fac_(",
"GCD[" -> "gcd_(",
(*
"KroneckerDelta" -> "delta_",
*)
"Log[" -> "ln_(",
"Max[" -> "max_(",
"Min[" -> "min_(",
"Mod[" -> "mod_(",
"Pi" -> "pi_",
"PolyLog[2," -> "li2_(",
(*
"PolyLog[3," -> "lin_(3,",
*)
"Sqrt[" -> "sqrt_(",
"Sign[" -> "sign_(",
"Sin[" -> "sin_(",
"Sum["-> "sum_(",
"Tan[" -> "tan_(",
(* this is strictly speaking, ..., dangerous, but for now probably enough *)
"I" -> "i_"
};
FormLink`$Form2M = Join[
{"bernoulli_" -> "BernoulliB", "binom_" -> "Binomial",
"cos_" -> "Cos", "fac_" -> "Factorial", "gcd_" -> "GCD",
"ln_" -> "Log", "max_" -> "Max", "min_" -> "Min", "mod_" -> "Mod",
"pi_" -> "Pi", "li2_" -> "PolyLog2,", "sqrt_" -> "Sqrt",
"sign_" -> "Sign", "sin_" -> "Sin", "sum_" -> "Sum", "tan_" -> "Tan",
"i_" -> "I"},
{
"e_" -> "I*$LeviCivitaSign*Eps", (*By Feng*)
"d_" -> "Pair",
(*
"d_" -> "KroneckerDelta",
*)
(*"i_" -> "I",*)
"\\" -> "","gi_"->"DiracGamma",(*"*"->"." , *)" "->"",
"_"->""
(* for brackets : *)
, "[" -> "Hold[Identity]["
}
];
(* this is of course only correct in the context of FORM,i.e., . is always scalar product multiplication and not general noncommuative multiplication*)
FormLink`$DotPowerFix = {a_ . b_^c_ :> (a.b)^c, (a_^b_).c_ :> (a.c)^b } ;
FormLink`$TForm = False;