TeX is appropriate for implementing many bioinformatics algorithms because these can be programmed with short codes, calculated with limited range of numbers, and produce visual results. As a case study, I present Gotoh, a LaTeX package which implements the Gotoh algorithm, a popular biological sequence alignment algorithm. This package is available from https://github.com/wtsnjp/Gotoh.