tesseract: use resources instead of subformulae