• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#/bin/sh
2
3cat > hyphtest.tex << EOT
4\\documentclass{article}
5\\usepackage[thai]{babel}
6\\usepackage[utf8x]{inputenc}
7
8\\begin{document}
9EOT
10
11sed -e 's/-//g; s/.*/\\showhyphens{&}/' thai.dic >> hyphtest.tex
12
13cat >> hyphtest.tex << EOT
14\\end{document}
15EOT
16
17pdflatex hyphtest.tex \
18  | iconv -f tis-620 -t utf-8 | grep '^\[\]' | cut -d' ' -f3 > hyphres.dic
19
20diff -u thai.dic hyphres.dic > hyph.diff
21
22ERRS=`grep '^+[^+]' hyph.diff | wc -l | cut -d' ' -f1`
23if test ${ERRS} -ne 0; then
24  echo "${ERRS} words are not correctly hyphenated. Check hyph.diff for the list."
25  exit 1
26fi
27
28exit 0
29
30