Imported from pkasila/java-materials (
AGENTS.md). Install upstream withnpx skills add pkasila/java-materials. Copyright stays with the author.
AGENTS.md
Guidance for AI agents working in java-materials — a repo of Java course lecture slides (LaTeX Beamer → PDF) published to GitHub Pages.
Repository purpose
| Audience | Primary doc | Goal |
|---|---|---|
| Students | README.md |
Find and download lecture PDFs |
| Maintainers | this file, lectures/README.md |
Add/edit slides and publish |
Live site: https://pkasila.github.io/java-materials/
Do not turn README.md into a developer manual — keep it student-focused. Put maintainer details here or in nested READMEs.
Layout
latex/tex/latex/ # Beamer .sty theme (TDS layout)
beamer/ # beamerthemeAcademic + inner/outer/color
academicbeamer/ # \usepackage{academicbeamer}
lectures/
_template/ # Copy-paste scaffold (build: false, skipped by CI)
[NN]-[name]/ # One deck per folder
main.tex # Driver only — no theme code here
meta.yaml # Site index metadata (Russian copy for students)
slides/ # Numbered \input{} fragments
assets/ # Optional images
scripts/ # build-presentation.sh, build-all.sh, generate-site.py
_site/ # Generated site (gitignored)
Conventions
- Line endings: Unix LF only (see
.gitattributes). - Slide content lives in
lectures/*/slides/*.tex, not in theme files. - Theme/style lives only in
latex/tex/latex/**/*.sty. - Folder names:
lectures/02-collections/— numeric prefix controls site sort order. - Skip CI: folders named
_…ormeta.yamlwithbuild: false. - Hide from index:
hidden: trueinmeta.yaml(PDF still builds ifbuild: true). - Generated artifacts: never commit
main.pdf, LaTeX aux files, or_site/. - Licensing: path-based dual license —
lectures/and studentREADME.mdare CC BY 4.0;latex/,scripts/,Makefile, and CI are MIT. SeeLICENSE.
Basic workflows
1. Add a new lecture
cp -R lectures/_template lectures/02-collections
- Edit
lectures/02-collections/meta.yaml— setbuild: true, Russiantitle,subtitle,description,date. - Edit
main.tex— title, author,\setshorttitle{...}, remove unused\input{slides/...}lines. - Replace or delete example slides in
slides/(seelectures/_template/slides/README.mdfor patterns). - Build and verify:
make lecture DIR=lectures/02-collections
- Update the lecture table in
README.md(student-facing) with title, link, and short description.
2. Edit an existing lecture
- Change files under
lectures/[NN]-name/slides/. - Update
meta.yamlif title, date, or site description changed. - Run
make lecture DIR=lectures/[NN]-name. - Fix LaTeX errors from
main.log— common issues: unclosed braces,\verbinside fragile contexts, missing$in math.
3. Build all lectures and regenerate the site
make # or: make site
make clean # remove aux files, PDFs, _site/
Pipeline:
scripts/build-all.sh— discovers publishable decks, runspdflatextwice each, copies PDFs to_site/pdfs/, generates thumbnails viapdftoppm.scripts/generate-site.py— writes Russian_site/index.htmlfrommeta.yaml+ built PDFs.
Requires TeX Live (Cyrillic: texlive-lang-cyrillic for Russian decks) and poppler-utils locally; CI installs these on Ubuntu.
4. Change theme or shared macros
Edit files under latex/tex/latex/:
| Change | File |
|---|---|
| Colours | beamer/beamercolorthemeAcademic.sty |
| Header/footer/margins | beamer/beamerouterthemeAcademic.sty |
Blocks, lists, \lead, \photoframe |
beamer/beamerinnerthemeAcademic.sty |
| Package deps | beamer/beamerthemeAcademic.sty |
| Language/fonts | academicbeamer/academicbeamer.sty |
After theme changes, rebuild all publishable lectures:
make clean && make
Do not embed theme code in lecture main.tex or slide files.
5. Change the public index page
Edit scripts/generate-site.py:
SITEdict — Russian UI strings (page title, tagline, “Скачать PDF”, etc.).- Card layout/CSS in
render_index().
Site copy comes from each lecture’s meta.yaml (title, subtitle, description, date).
Regenerate: make site (or python3 scripts/generate-site.py after PDFs exist in _site/pdfs/).
6. Publish to GitHub Pages
Push to main. Workflow .github/workflows/presentations.yml:
- Pull request: build only, upload artifact.
- Push to
main: build + deploy_site/to GitHub Pages.
Triggers on changes under lectures/, latex/, scripts/, workflow, Makefile, latexmkrc.
One-time repo setting: Settings → Pages → Source: GitHub Actions.
LaTeX driver template
\documentclass[aspectratio=169,11pt,t]{beamer}
\usepackage[russian]{academicbeamer} % or [english]
\setshorttitle{Java \textbar\ Лекция 2}
\graphicspath{{assets/}}
\title{...}
\subtitle{...}
\author{...}
\date{...}
\begin{document}
\input{slides/01-title}
% ...
\end{document}
Build scripts set TEXINPUTS=./latex/tex/latex// so \usepackage{academicbeamer} resolves without \input{../../...}.
meta.yaml (site index)
title: "Название лекции"
subtitle: "Краткий подзаголовок"
date: "2026-09-01"
description: "1–2 предложения для студентов на сайте"
lang: ru
build: true
hidden: false
Verification checklist
Before finishing a lecture or theme change:
-
make lecture DIR=lectures/…exits 0 and producesmain.pdf -
make sitelists the deck on_site/index.html(unlesshidden: true) -
git statusshows no aux/PDF/_site/files staged - Student
README.mdupdated if a new public lecture was added - Shell scripts remain LF (no
\r— breaksenv: bash\rin CI)
What to avoid
- Committing build output (
main.pdf,_site/,*.aux,*.log, …). - Putting slide content into
.styfiles or theme into slide files. - Editing
README.mdwith LaTeX/CI instructions (use this file instead). - Using
\input{../../latex/...}for theme — use\usepackage{academicbeamer}. - Renumbering lectures without updating student README links.
Related docs
lectures/README.md— lecture folder layout,meta.yamlschemalatex/README.md— theme file map and macroslectures/_template/slides/README.md— example slide patterns