format lessons for auto pdf generation