Fix up latex docs build.
Add kbest algorithm.