Component Reference and Development¶
← Component router · Document class · Font reference
This reference owns the shared packages' public-interface catalogue, dependency boundaries, and development requirements. For package directories and example sources, use the component router.
Component structure¶
Every component follows this exact layout:
| File | Responsibility |
|---|---|
component-name.sty |
Reusable implementation named after its directory. |
example/main.tex |
Isolated demonstration of public behavior. |
example/main.pdf |
Canonically compiled, tracked visual fixture. |
Component names use lowercase ASCII kebab-case. No unrelated files or directories belong inside a component directory. The wider source tree is documented in LATEX.md.
Component catalogue¶
Courses load the document class, not individual component packages. The class controls dependency order. Consult the isolated examples for complete syntax.
| Component | Public interfaces or facilities |
|---|---|
algorithms |
algorithm, \KwInput, \KwOutput, \For, \While, \If, \Return; localized algorithm2e pseudocode. |
code |
unipdcode, unipdterminal, and shared listings styles. |
cover |
\makecoursecover, using the document's metadata. |
diagrams |
unipd/... TikZ and CircuitikZ styles for graphs, automata, flowcharts, architecture, UML, and circuits. |
document-structure |
Heading hierarchy, numbering, and \courseappendices. |
environments |
Definitions, results, proofs, examples, remarks, warnings, exercises, and solutions. |
figures-tables |
Figures, tables, captions, L/C columns, \figuresource, and \tablesource. |
front-back-matter |
coursepreface, revisionhistory, \revision, \printcourselists, and front/main-matter transitions. |
glossary |
\newcourseterm, \newcourseacronym, \gls, and \printcourseglossary, without an external indexing step. |
lists |
Standard lists and steps. |
mathematics |
Math fonts, operators, delimiters, \vect, \mat, number sets, and siunitx quantities. |
metadata |
\unipdsetup, \unipdmetadata, \unipdifmetadata, \unipdheadcourse, and \unipdtranslate; field details belong in Metadata. |
navigation |
\href, \url, PDF bookmarks, and PDF metadata. |
page-style |
Geometry, running headers, footers, and page numbers. |
references |
\cref, \Cref, optional BibLaTeX support, and \printcoursebibliography. |
table-of-contents |
\makecoursetableofcontents and Roman-numbered contents. |
typography |
Text fonts, shared colors, paragraph spacing, and emphasis. |
The class reference owns document-level lifecycle commands; Writing notes owns their pedagogical use.
Responsibility boundaries¶
Extend the existing owner rather than creating duplicate commands or cross-cutting global patches. In particular:
metadataowns translations and shared language-dependent labels;typographyowns text fonts and general typographic primitives, whilepage-styleowns geometry and running page elements;figures-tablesowns float/caption infrastructure;diagramsbuilds on it;referencesowns cross-reference names and formatting;- course-specific content must not become a dependency of a shared package.
Dependencies must be explicit, one-directional, and compatible with the class's loading order. Use translation interfaces for language-dependent text rather than hard-coded Italian or English labels.
Component requirements¶
Public commands and environments should be semantic, focused, documented, and backward-compatible where practical. Reuse shared fonts, colors, counters, lengths, translations, and existing packages. Prefer upstream public interfaces over undocumented internals, and preserve LuaLaTeX compatibility.
The course compatibility contract defines what belongs in shared infrastructure versus a course-local extension.
Examples as visual fixtures¶
An example should demonstrate the package's important public behavior with focused Computer Engineering material. Include labels, captions, numbering, references, localization, or long-line cases when relevant to the feature; do not turn it into an unrelated showcase.
example/main.pdf is tool-owned and must be regenerated when its sources or package change. The English and Italian integration documents exercise interactions across components. Building documents owns fixture replacement and PDF-review instructions.
Adding or changing a component¶
- Identify the owner and inspect its package, example, callers, and dependency order in
unipd-notes.cls. - Update the implementation and isolated example together, respecting the requirements above.
- For a genuinely new responsibility, add the standard component layout, register the package in the class, and update this catalogue, the example router, and directory reference.
- Follow Building documents for compilation, visual review, and generated-state checks. The affected-document rules determine the required scope.
Font changes additionally follow Changing the font system. General documentation, tools, and course assets do not belong inside an individual component directory.