summaryrefslogtreecommitdiffhomepage
path: root/scripts/gen-pres
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gen-pres')
-rwxr-xr-xscripts/gen-pres21
1 files changed, 19 insertions, 2 deletions
diff --git a/scripts/gen-pres b/scripts/gen-pres
index a1e7cb1..fbe1b5d 100755
--- a/scripts/gen-pres
+++ b/scripts/gen-pres
@@ -3,15 +3,32 @@
gawk '
@include "scripts/getcls.awk"
+function getsup(i, s)
+{
+ switch (i) {
+ case 1:
+ s = "D"
+ break
+ case 2:
+ s = "P"
+ break
+ case 3:
+ s = "S"
+ break
+ }
+
+ return "@sup{-" s "}"
+}
+
BEGIN {
FS = "\t"
}
{
- printf "trX { td .missing colspan=\"1\" {-%s}", $1
+ printf "trX { td .missing colspan=\"2\" {-%s}", $3
split($2, a, / /)
for (i = 1; i <= length(a); i++)
- printf "td .%s colspan=\"2\" {-%s}", getcls(a[i]), $3
+ printf "td .%s colspan=\"1\" {-%s%s}", getcls(a[i]), $1, getsup(i)
print "}"
}