I use this repo as the base for homework sheets and class material that need Persian text, math notation, and a ready PDF layout.
Template/HW.texis the main file.Template/questionskeeps each question in its own file.Template/answerskeeps answer hints separate from the main file.Template/commons/course.styholds the course commands and page style.Template/fontskeeps the Persian fonts used by the template.Template/HW.pdfis the current built PDF.
From the repo root:
cd Template
latexmk -pdfxe -interaction=nonstopmode -halt-on-error HW.texIf latexmk is not installed, run XeLaTeX from inside Template:
xelatex -interaction=nonstopmode -halt-on-error HW.texRun XeLaTeX again if references or page numbers look stale.
Add new questions in Template/questions, then include them from Template/HW.tex. Keep generated build files out of new commits unless the PDF itself needs to be updated.
Template/README.mdexplains the template folder.docs/template-map.mdmaps the source folders.docs/build-flow.mdshows the build command I use most.docs/new-homework-flow.mdexplains how I start a new sheet.scripts/build-template.ps1builds the sample PDF from the repo root.scripts/check-template.ps1checks the template source before a build.