Ensure the chapters are correctly ordered in the generated latex file
Refactor pdf template