#! /usr/bin/gawk -f # Last edited on 1999-05-24 06:59:48 by stolfi # Reads a ".his" file from stdin; writes to stdout a TeX caption that # can be \input by the \drawing macro. /^score *= */{ gsub(/^score *[=] *[{] */, "", $0); gsub(/ *[}] *cost.*$/, "", $0); gsub(/[,]/, " ", $0); split("", score); for(i=1; i<=NF; i+=2) { score[$(i+1)] = $(i); } printf "\\drparms{%s}{%s}{%s}{%s}%%\n", score["asc"], score["xng"], score["bnd"], score["len"]; }