This repository holds the assignments and projects of the Internet Engineering course. Teaching assistants author assignments here; students receive the built PDFs. Please read this document before your first assignment.
- TeX Live with XeLaTeX and
latexmk.scheme-fullis the least painful option; with a smaller scheme you need at leastxepersian,mintedandfvextra(tlmgr install xepersian minted fvextra). - Pygments (
pip install Pygments) —mintedshells out topygmentize, so builds fail without it.
If you would rather not install a TeX distribution, use the same image CI uses:
docker run --rm -v "$PWD":/work -w /work texlive/texlive:latest makeThe fonts live in fonts/ and are picked up automatically; do not install them
system-wide.
make # every assignment
make list # what is in the repository
make clean # remove build artefactsEach assignment is written to build/<assignment-name>.pdf. latexmk runs from
src/, which is why assignments refer to the class as ../assignment and the
class refers to the fonts as ../fonts/. Keep those paths as they are.
To build a single assignment while you iterate:
make build/http.pdfCI runs make on every pull request in the TeX Live container, and publishes
the PDFs of main to the latest release.
-
Create
src/<assignment-name>/main.tex. Use kebab-case, and name the directory after the topic, not the semester — for examplebackend-http-monitor, notproject-2-fall-1405. -
Start from this template:
\documentclass{../is-assignment} \عنوان{یک عنوان خوب} \ترم{پاییز ۱۴۰۵} \begin{document} \عنوانساز \فهرستمطالب \قسمت{مقدمه} ... \پایانساز \end{document}
-
Build locally with
make, check the PDF, and open a pull request. TheMakefilediscoverssrc/*/main.texon its own — there is no build manifest to keep in sync.
| Macro | Required | Meaning |
|---|---|---|
\عنوان{} |
yes | Assignment title, printed after «تمرین» on the cover |
\ترم{} |
yes in practice | Academic term, e.g. پاییز ۱۴۰۵ |
\مهلت{} |
recommended | Submission deadline, printed on the cover |
\تحویل{} |
no | Where the work is handed in; defaults to the course GitHub repository |
\درس{} |
no | Course name; defaults to «مبانی امنیت اطلاعات» |
\ترم is optional only in the sense that the class guesses the current term
from the build date and emits a warning. Always set it explicitly — otherwise
the cover page changes meaning depending on when someone rebuilds the PDF.
The class loads XePersian with localise, so
the usual sectioning commands have Persian names:
| Macro | Purpose |
|---|---|
\قسمت{} / \زیرقسمت{} |
section / subsection |
\شروع{شمارش} … \فقره … \پایان{شمارش} |
numbered list |
\شروع{فقرات} … \فقره … \پایان{فقرات} |
bulleted list |
\متنلاتین{} |
inline Latin text (use it for every English word) |
\متنسیاه{} |
bold emphasis |
\تارنما{url}{text} |
hyperlink |
\پانویس{} |
footnote |
\شرح{} / \برچسب{} / \رجوع{} |
caption / label / reference |
\نمره{۲} |
the marks a part is worth, as a badge |
\شروع{نکته} … \پایان{نکته} |
a note callout |
\شروع{راهنمایی} … \پایان{راهنمایی} |
a hint callout |
\شروع{امتیازی} … \پایان{امتیازی} |
a bonus callout |
Code listings are minted inside a latin environment:
\begin{listing}
\شرح{نمونهای از یک تابع}
\برچسب{قطعهکد: نمونهای از یک تابع}
\begin{latin}
\begin{minted}[bgcolor=Black]{go}
func main() {}
\end{minted}
\end{latin}
\end{listing}Close every assignment with \قوانین, right before \پایانساز. It prints the
course-wide rules — where to hand in, the late policy, what counts as your own
work, what is allowed with AI tools, and what grading looks at — from one place,
so they cannot drift apart between assignments. The wording lives in
is-assignment.cls; change it there and every assignment follows.
- Branch off
main; do not push tomaindirectly. - One assignment per pull request, so it can be reviewed and reverted on its own.
- CI must be green. A build failure on a pull request means the PDF cannot be produced — it is never "just a warning".
- The course instructor reviews and merges.
- Write commit messages in the Conventional Commits
style already used in the history, e.g.
feat: add websocket assignment.
Half of this subject is offensive technique, and a handout is not the place to be vague about scope. An assignment that asks a student to attack must say, in the assignment itself:
- that the target is their own machine or an application they wrote,
- that doing the same to a system they do not own is a violation, and what the consequence is,
- what to hand in that shows the weakness without publishing a working exploit against someone else's service.
web-hardening shows the shape: a نکته callout, before the first task.
This repository is public. Do not commit:
- solutions, answer keys, or grading rubrics,
- student submissions, names, or grades,
- exam material that has not been handed out yet.
Keep those in the private course repository.