2021-04-13 04:26:19 +03:00
|
|
|
#!/usr/bin/awk -f
|
|
|
|
|
2021-04-13 04:31:29 +03:00
|
|
|
BEGIN { FS="[() ]" }
|
2021-04-13 04:26:19 +03:00
|
|
|
|
|
|
|
/small_angle constant real default radians/ {
|
|
|
|
if(d) {
|
|
|
|
exit 1
|
|
|
|
} else {
|
2021-04-13 04:31:29 +03:00
|
|
|
d = sprintf("\\newcommand{\\smallAngle}{\\frac{\\pi}{%d}}\n",180/$8);
|
2021-04-13 04:26:19 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
END{
|
2021-04-13 04:31:29 +03:00
|
|
|
if(d) {
|
|
|
|
print d > "vars.inc.tex"
|
|
|
|
} else {
|
2021-04-13 04:26:19 +03:00
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
}
|