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