rendered paste body(
cat <<EOF
<subpictures>
<stream>
<spu force="yes" start="$START"$END
highlight="$WORK_DIR/Highlight.png"
select="$WORK_DIR/Select.png"
$(if $TEXTMENU && [[ $SC_TITLE_ALIGN = "east" ]]; then
echo '>'
for ((i=0; i<=NUM_FILES; i++)); do
xdim=${TT_DIM[i]%%x*}
ydim=${TT_DIM[i]##*x}
X0=${SHOWCASE_TITLES_X_ARRAY[i]}
X1=$((X0 + xdim))
Y0=${SHOWCASE_TITLES_Y_ARRAY[i]}
Y1=$((Y0 + ydim))
echo -n "<button name=\"$((i+1))\" "
echo -e "x0=\"$X0\" y0=\"$Y0\" x1=\"$X1\" y1=\"$Y1\" />"
done
else
echo -e "autooutline=\"infer\""
echo -e "outlinewidth=\"$OUTLINEWIDTH\""
echo -e "autoorder=\"$AUTOORDER\">"
fi)
</spu>
</stream>
</subpictures>
EOF
) > "$SPUMUX_XML"
### example output from Anne's configuration with Gaze font ####
<subpictures>
<stream>
<spu force="yes" start="00:00:00.0"
highlight="/tmp/todisc-work9/Highlight.png"
select="/tmp/todisc-work9/Select.png"
>
<button name="1" x0="50" y0="100" x1="225" y1="125" />
<button name="2" x0="50" y0="139" x1="193" y1="165" />
<button name="3" x0="50" y0="179" x1="225" y1="205" />
<button name="4" x0="50" y0="219" x1="163" y1="244" />
<button name="5" x0="50" y0="258" x1="195" y1="278" />
<button name="6" x0="50" y0="292" x1="177" y1="318" />
<button name="7" x0="50" y0="332" x1="178" y1="358" />
<button name="8" x0="50" y0="372" x1="295" y1="398" />
<button name="9" x0="509" y0="100" x1="670" y1="125" />
<button name="10" x0="507" y0="139" x1="670" y1="165" />
<button name="11" x0="593" y0="179" x1="670" y1="204" />
<button name="12" x0="422" y0="218" x1="670" y1="244" />
<button name="13" x0="496" y0="258" x1="670" y1="284" />
<button name="14" x0="421" y0="298" x1="670" y1="324" />
<button name="15" x0="491" y0="338" x1="670" y1="364" />
<button name="16" x0="494" y0="378" x1="670" y1="403" />
<button name="17" x0="444" y0="417" x1="670" y1="443" />
</spu>
</stream>
</subpictures>