s|]*>|
| /]*>/ { :loop N /<\/tr\b[^>]*>/! b loop } s|\[ ]*>[^<]*]*> ]|| s|]*>.*]*>.*\[\(.*\)]*>].*]*>.*]*>\(.*\)]*>.*]*>|
[\2]
\
\ \\anchor \2\3
| s|\[
\([^<]*\)]|\\ref \2 "[\2]"|g s/[ab]2002/2002/g s|\(\\anchor [^ ]*\)+|\1etal| s|\(\\ref [^ ]*\)+|\1etal| /<\/table/ i\
/<\/table/,$ d