. ${_EXEC}/pages/cards.sh
tex_clean() { #in dire need for improvement
- echo "$*" |tr -d '{&}\\'
+ printf %s "$*" |tr -d '{&}\\'
}
for n in NOTE NOTE{0..10}; do if [ -n "$values[$n]" ]; then
[ -n "$note" ] && note="$note\\newline $values[$n]" || note="$values[$n]"
fi; done
- printf '%s & %s & %s & %s\n' "$fullname" "$values[BDAY]" "$tel" "$note" \
+ printf '%s & %s & %s & %s\n' \
+ "$(tex_clean $fullname)" "$(tex_clean $values[BDAY])" "$(tex_clean $tel)" "$(tex_clean $note)" \
+
| sed -r ':X;N;$!bX; s;\n;\\newline ;g'
fi
}
\hline
\endhead
'"$(
-list_attendance "$course" |sort -k 2 | debug |sed -r 's:^[0-9a-z\.]+ (.+) \(\*[0-9]{4}\)$:\1:;s:$: \& \& \& \& \& \& \& \& \& \& \\\\[3ex] \\hline:'
+tex_clean "$(list_attendance "$course")" |sort -k 2 | debug |sed -r 's:^[0-9a-z\.]+ (.+) \(\*[0-9]{4}\)$:\1:;s:$: \& \& \& \& \& \& \& \& \& \& \\\\[3ex] \\hline:'
)"'
\end{longtable}