rasko-europass:1.0.0 - #5905
rasko-europass:1.0.0#5905Raskolny wants to merge 6 commits into
Conversation
Adds `signature-image:` so a user can render an uploaded handwritten
signature instead of the placeholder rule (kept as the `none` default,
for signing on paper after printing).
DO NOT MERGE — known incomplete:
* `image(signature-image, width: 40mm)` has no `alt:`. CONTRIBUTING.md
requires alt text on every image and build.sh compiles with
`--pdf-standard 1.7,ua-1`, which FAILS the build on an untagged
image. Needs a localised `signature-alt` key in lang.toml, mirroring
the existing `photo-alt`.
* `width: 40mm` with no height cap can overflow the 55mm block and
distort the aspect ratio.
* Asset strategy undecided: one shared vector
`assets/signature-sample.svg` (matches the existing
`assets/photo-placeholder.svg` pattern, ships in the bundle) versus
24 per-example raster images (bundle bloat against the Universe
"Size" guideline; `assets/` is NOT in typst.toml's `exclude`).
* README parameter table and CHANGELOG `[Unreleased]` not updated.
Parked here to get it off the dirty working tree so `main` stays exactly
at the state PR typst/packages#5905 was submitted from.
CONTRIBUTING.md asks for changes to be recorded under an `Unreleased` heading, but the file only had the shipped `[1.0.0]` section, so there was nowhere to stage 1.1.0 work. Also records the ground rules that keep the two release streams separate: 1.0.0 is frozen because it is what typst/packages#5905 was submitted from, and everything new targets 1.1.0. Points at the `feat/signature-image` WIP branch and at discussion #2 for the two compliance-gated proposals.
Pure formatting, no behaviour change. lib.typ and main.typ were already typstyle-canonical (`typstyle --check` exits 0 on both), so only the examples needed normalising. Proven cosmetic, not assumed: every PDF was rendered before and after and compared page-by-page. All 25 documents (main + 24 examples) are pixel-identical at 110 dpi, with identical extracted text and identical bookmark outline. This matters because Typst treats whitespace inside content blocks as significant, and this template's value proposition is PDF/UA-1 conformance, so a formatting change had to be shown inert rather than trusted. This prepares the ground for adopting typstyle as the project's declared formatter (next commit), which removes the current hazard of an *undeclared* formatter silently rewriting files in a maintainer's environment. 1.0.0 remains frozen; the v1.0.0 tag and typst/packages#5905 are untouched.
Declares the canonical style instead of leaving it implicit. Until now the repo had NO declared formatter while a formatter was silently active in at least one maintainer environment (pi-lens -> Tinymist -> typstyle), which is how 24 example files were nearly committed as unintended churn. Making the style explicit and machine-checked removes that hazard. Design choices: - CI installs typstyle pinned to 0.15.1 (bare release binary, unlike Typst's .tar.xz) and runs `typstyle --check lib.typ main.typ examples/*.typ`. - The gate REPORTS but never rewrites: a contributor sees a failing step with the diff and can fix locally or ask a maintainer. Nobody must install anything; Tinymist users already have typstyle via format-on-save. - typstyle 0.15.1 has no config file (CLI flags only) and the project uses its defaults, so the pinned version is the entire style contract. This is why there is deliberately no .typstyle.toml and nothing new to add to typst.toml's exclude. CONTRIBUTING.md documents the style and the no-install-required workflow; CHANGELOG records the adoption and corrects the now-false statement that work in progress lives on feature branches (none remain after feat/signature-image was closed). 1.0.0 remains frozen; v1.0.0 tag and typst/packages#5905 untouched.
Closes the "section-title spacing" item tracked separately in discussion #2 (title -> blue rule, and previous section -> title). It is a purely visual concern with no Europass-compliance dimension, so it is decided here rather than waiting on community input; unlike extra-fields/cv-section it is NOT part of Proposals A/B and preempts no open consultation. Two gaps, both measured on the rendered PDF rather than eyeballed: previous-section -> title 7.03pt -> 15.03pt (+8pt) title -> blue rule 11.56pt -> 13.56pt (+2pt) rule -> content 9.46pt -> 9.46pt (unchanged, deliberate) Implementation notes: - The +8pt wires up `section-gap`, a constant declared at the top of lib.typ that was never used anywhere (orphan). It now has a single, named purpose. - The gap above the title is emitted as real content space (`v(section-gap)`), NOT as a block `above:` margin. First attempt used `above:` and measured +0.00pt: Typst drops the top margin of the first element inside a grid cell, and every section heading lives in a grid cell. Caught by measuring. - `below` stays 6pt so the heading remains grouped with its own content. All 24 examples and main.typ still compile clean under --pdf-standard 1.7,ua-1 with verify.sh green; typstyle --check passes. 1.0.0 remains frozen; v1.0.0 tag and typst/packages#5905 untouched.
Visual review of the previous spacing commit found the title->blue-rule gap still too loose. 3.4mm is moved out of it and recovered above the title, so the rule keeps its position while the title sits closer to it and each heading reads as the start of a new block. Measured on the rendered PDF (previous commit -> now): previous-section -> title 15.03pt -> 24.67pt (+3.40mm) title -> blue rule 13.56pt -> 3.92pt (-3.40mm) rule -> content 9.46pt -> 9.46pt (unchanged) The title->rule spacer is now a deliberately negative v() (3pt - 3.4mm), pulling the rule up into the heading's line-box descent; verified visually that it does not touch the text. Against 1.0.0 the net change is previous-section->title 7.03 -> 24.67pt and title->rule 11.56 -> 3.92pt. All 24 examples and main.typ compile clean under --pdf-standard 1.7,ua-1 with verify.sh green; typstyle --check passes. CHANGELOG numbers updated. 1.0.0 remains frozen; v1.0.0 tag and typst/packages#5905 untouched.
Visual review of the previous commit found the recovered space above the title unnecessary: the +3.4mm on the top spacer is removed, leaving the original section-gap (8pt) there. The tightened title->rule gap is kept. Measured on the rendered PDF (previous commit -> now): previous-section -> title 24.67pt -> 15.03pt (-3.40mm) title -> blue rule 3.92pt -> 3.92pt (unchanged) rule -> content 9.46pt -> 9.46pt (unchanged) Net against 1.0.0: previous-section->title 7.03 -> 15.03pt (+8pt), title->rule 11.56 -> 3.92pt (-3.4mm), rule->content unchanged. All 24 examples and main.typ compile clean under --pdf-standard 1.7,ua-1 with verify.sh green; typstyle --check passes. CHANGELOG numbers updated. 1.0.0 remains frozen; v1.0.0 tag and typst/packages#5905 untouched.
Encodes, per example, the CV conventions of the persona's country, using the deliberate (and documented-as-improper) simplification country == language, since each examples/<code>.typ carries a persona of the matching nationality. The planned `country:` parameter (1.1.0, discussion #3) will remove the conflation; until then the examples carry the conventions explicitly. Three profiles, decided quickly and labelled UNVERIFIED in every file (the open discussion #3 is the arbiter over time): - lean (en, ga, nl, da, sv, fi, et): omit photo, date of birth, gender and any signature/date at the foot - anti-discrimination practice and lean-CV custom (Ireland, Netherlands, Scandinavia, Finland, Estonia). - signature kept (bg, el, hr, pl, ro): still customarily close the CV with place/date and a signature; photo and DOB kept. - middle (cs, de, es, fr, hu, it, lt, lv, mt, pt, sk, sl): omit the signature/date block; photo and DOB kept. Gender is omitted in ALL examples (data-minimisation default); its render coverage lives in main.typ. France additionally writes dates with month names in words, lowercase. Every example carries a short header comment stating which conventions it follows and pointing at discussion #3 for corrections, so the examples themselves animate the consultation. All 24 examples and main.typ compile clean under --pdf-standard 1.7,ua-1; typstyle --check passes. 1.0.0 frozen; v1.0.0 tag and typst/packages#5905 untouched.
The convention alignment removed the photo / photo-alt / date-of-birth / gender / signature-* lines outright, which threw away the very instructions a user needs in order to override the convention. They are now retained as commented-out lines in their original position, so anyone who wants e.g. a photo or a signature despite the local custom can simply promote the comment to an instruction (uncomment it) - the values are all still there. Profiles unchanged: lean (en, ga, nl, da, sv, fi, et) comments photo, photo-alt, date-of-birth, gender and the whole signature block; middle (cs, de, es, fr, hu, it, lt, lv, mt, pt, sk, sl) comments gender and the signature block; signature-kept (bg, el, hr, pl, ro) comments only gender. Also re-applies the localised month+year signature dates (marts/Martios/ ozujak/marzec/martie 2025) that the regeneration from the pre-alignment revision had dropped; verified present in the rendered PDFs. All 24 examples compile clean under --pdf-standard 1.7,ua-1; typstyle --check passes. 1.0.0 frozen; v1.0.0 tag and typst/packages#5905 untouched.
…coherence Closes the four open housekeeping/coherence items: 1. thumbnail.png regenerated (it was stale since the 1.1.0 section-spacing change); PUBLISHING.md's "regenerate thumbnail" checkbox ticked. 2. social-preview.png regenerated from the new thumbnail, and - importantly - the card now has a VERSIONED generator, social-preview.typ (1280pt x 640pt page at --ppi 72 == 1280x640 px). The card was previously composed ad hoc and could not be reproduced; future regenerations are one command, documented in the file header and in PUBLISHING.md. social-preview.typ is added to typst.toml's exclude (dev-only, must not ship in the bundle) and to the typstyle --check gate. 3. The typst.toml comment claiming the vendored Open Sans "ships with the package" - flatly contradicting fonts being in exclude - is rewritten to state the real policy (Universe forbids font binaries; vendored copy serves repository builds only). 4. README and CONTRIBUTING no longer claim every example carries the placeholder portrait: lean-CV countries omit it, keeping the parameter as a commented-out instruction. Both now point at discussion #3. NOTE for the maintainer: social-preview.png must be re-uploaded manually (Settings -> Social preview); GitHub exposes no REST endpoint for it. All 24 examples and main.typ compile clean under --pdf-standard 1.7,ua-1; typstyle --check passes on lib.typ, main.typ, social-preview.typ and examples. 1.0.0 frozen; v1.0.0 tag and typst/packages#5905 untouched.
…nifest comments - Add [template] table (template/main.typ entrypoint, thumbnail.png) so the package is a proper Universe template (typst init works, thumbnail shown); main.typ moved to template/ unchanged apart from a comment rewording. - README banner now references preview.png (excluded from the bundle per the exclude docs, still rendered on Universe) because a [template] thumbnail must not be referenced inside the package. - Remove dev-only files per docs/tips.md 'Other files (don't commit)': .gitignore, PUBLISHING.md, CONTRIBUTING.md. - typst.toml: drop the contradictory 'fonts ship with the package' comment (fonts/ is and stays excluded per Universe policy); shorten description per docs/manifest.md guidance. - README/main.typ: replace unsourced Europass market-uptake claims and the 'GDPR-conscious' wording with neutral descriptions.
…ission README/main.typ: - document cross-package image-path resolution: photo:/signature-image: strings resolve inside the package, so user files must be passed as bytes via read(.., encoding: none); mark signature-image:/signature-alt: as unreleased 1.1.0 (not in @preview/rasko-europass:1.0.0) - drop the unsourced Europass market-uptake claims and the 'GDPR-conscious' wording on gender; reword the PDF/UA-1 claim as compile-time enforcement plus automated checks (verify.sh is an assertion suite, not a validator) typst.toml: - shorten description per manifest guidelines (same text as the submission) - exclude dev-only social-preview.png alongside its generator - correct the thumbnail note: [template] is the real mechanism (the submission now declares it; this repo adopts template/ in 1.1.0) PUBLISHING/ROADMAP/CHANGELOG/CONTRIBUTING: record the [template] conversion of typst/packages#5905, the dev-only-file removals, tick done housekeeping, note translations are community-maintained. No API, layout, version or tag changes; frozen 1.0.0 untouched.
elegaanz
left a comment
There was a problem hiding this comment.
Thank you for this template. I have a few remarks, mostly related to the fact that the submitted package should assume to be on Typst Universe, not in a GitHub repository.
| #show: europass-cv.with(lang: "en", name: "Your Name") | ||
| ``` | ||
|
|
||
| ### From this repository |
There was a problem hiding this comment.
You should assume that this copy of the README is read from Typst Universe, not GitHub. It should say something like "From the repository" and have a command or instructions on how to clone or obtain an archive of the repository.
| - **GDPR / DPR 445 self-declaration** clause, localised. | ||
| - **Full i18n for all 24 official EU languages.** | ||
| - **PDF/UA-1 (ISO 14289-1) accessible output**, verified by `verify.sh`. | ||
| - **Self-contained fonts**: the whole Open Sans family is vendored in |
There was a problem hiding this comment.
This is not true: packages on Universe can't ship fonts. You should instruct users to download and install the font themselves if they don't already have it.
There was a problem hiding this comment.
Is there a reason to have both this image and thumbnail.png? They look similar to me. If they are indeed the same, can you please keep only one of the two?
|
|
||
| ## Examples | ||
|
|
||
| `examples/<code>.typ` contains one complete CV per EU language, each with a |
There was a problem hiding this comment.
For info, these files will be very hard to find via Typst Universe, where only the README is displayed. I would advise adding a link to that directory in your own repository, so that people can easily browse it.
…eview.png Responds to @elegaanz's review (pullrequestreview-5288070478). README (R1): rewritten to be read from Typst Universe, not from GitHub. `typst init @preview/rasko-europass:1.0.0` is now the lead quick-start path; the repository route is renamed "From the repository" and gains `git clone` and archive-download instructions; every reference to build.sh, build-examples.sh, verify.sh, fonts/, examples/ and social-preview.* is gathered under an explicit "Repository-only files" call-out, so a package user is never told to run a script that is not in the bundle. Fonts (R2): installation is now a prominent call-out at the top of the README, with the download link and the `font:` escape hatch, instead of a note buried halfway down. The 1.0.0 "Self-contained fonts" CHANGELOG claim is rescoped to "Hermetic repository builds" and cross-references the `font:` parameter. Banner (R3): preview.png deleted. It was a byte-identical duplicate of thumbnail.png (md5 e42f5761e141f723b21befe43d03f867). docs/manifest.md states the template thumbnail "must not be referenced anywhere in the package", so the banner links to the repository's copy over HTTPS instead: that renders on Universe and in an offline reading of the packaged README, where a relative reference to the automatically stripped thumbnail would not. Also dropped from `exclude`. Examples (R4): the examples section now links straight at the GitHub directory and at examples/bg.typ, since Universe renders only the README. Code is unchanged: lib.typ, lang.toml, LICENSE, NOTICE.md, assets/, examples/*.typ and thumbnail.png still match the v1.0.0 tag byte for byte. Verified by running `typst init @preview/rasko-europass:1.0.0` against this folder and compiling the result with `--pdf-standard 1.7,ua-1`; the output passes all six phases of the repository's verify.sh.
Addresses @elegaanz's review of typst/packages#5905 (pullrequestreview-5288070478). The submission itself was updated in the same pass (Raskolny/packages@34746f45). R1 — the README assumed it was being read on GitHub. It is rendered on Typst Universe, where none of the referenced tooling exists. `typst init @preview/rasko-europass:1.0.0` now leads the quick start; the repository route is renamed "From the repository" and gains `git clone` and archive-download instructions; and every mention of build.sh, build-examples.sh, verify.sh, fonts/, examples/ and social-preview.* is gathered under an explicit "Repository-only files" call-out. R2 — "packages on Universe can't ship fonts". The claim was already rescoped in 942b1b7 but only in prose buried halfway down the file. Font installation is now a call-out at the top, with the download link and the `font:` escape hatch for environments where fonts cannot be installed. The 1.0.0 CHANGELOG entry "Self-contained fonts" is rescoped to "Hermetic repository builds" and cross-references the `font:` parameter. R3 — preview.png dropped. It was a byte-identical duplicate of thumbnail.png (md5 e42f5761e141f723b21befe43d03f867). The banner cannot point at thumbnail.png relatively, because docs/manifest.md says the template thumbnail "must not be referenced anywhere in the package" and bundler/src/main.rs always strips it from the archive ("// Always ignore the thumbnail."), so a relative reference would break for anyone reading the README offline. It now links to the repository's copy over HTTPS, which resolves on Universe and offline alike. R4 — examples/ is unreachable from Universe, where only the README renders, so the section now links straight at the GitHub directory and at examples/bg.typ. sync-universe.sh is new and exists because of how this review came about: the package is developed here but submitted to a fork of typst/packages, where files must be physically copied. Pushing here does not update that PR, so the bundle had silently gone stale. The script holds it to two baselines at once — code and assets must equal the frozen release tag, while README.md, CHANGELOG.md (minus [Unreleased]) and template/main.typ are live — and reports rather than auto-fixes frozen drift, because overwriting a frozen file from the working tree would publish unreleased 1.1.0 features under a 1.0.0 label. template/main.typ is only written when it differs from the tag in comments alone. `--check` exits non-zero on drift. PUBLISHING.md §2 now documents the workflow and the post-sync `typst init` verification step. Verified: ./build.sh passes all six verify.sh phases, and `typst init @preview/rasko-europass:1.0.0` against the synced bundle compiles clean under --pdf-standard 1.7,ua-1.
|
Thanks for the review, @elegaanz — all four points are addressed in 34746f4. 1. Universe-first README. 2. Fonts. You're right. Installation is now a call-out at the top of the README, ahead of the quick start, with the Open Sans download link and the 3. 4. Examples. The section now links to the Code is unchanged — |
Clears the four warnings from the automated package check. All four were the same issue and all were introduced by my previous commit: GitHub URLs pointing at the default branch instead of a tag or permalink. raw…/main/thumbnail.png -> raw…/v1.0.0/thumbnail.png (banner) /tree/main/examples -> /tree/v1.0.0/examples (x2) /blob/main/examples/bg.typ -> /blob/v1.0.0/examples/bg.typ The archive-download instruction had the same defect and is fixed alongside it, though the linter did not flag it: it pointed at archive/refs/heads/main.tar.gz, which would have handed a reader of the packaged 1.0.0 README a tarball of unreleased 1.1.0 code. It now fetches archive/refs/tags/v1.0.0.tar.gz, and the `cd` is corrected to europass-cv-1.0.0 (GitHub strips the leading v from tag archives). Pinning the banner to the tag also makes it match the frozen thumbnail.png in this folder, rather than the regenerated one on main. No code, manifest or other file changed.
|
Follow-up |
I am submitting
Description:
rasko-europassis a faithful, accessibility-first reproduction of the official EU Europass CV format for Typst. It provides the characteristic asymmetric two-column grid (dates/labels vs. content) with the unbroken vertical blue rule and the official EU palette, a CEFR language self-assessment table (A1–C2) with contrast-safe shading, a localised GDPR/DPR-445 self-declaration, and full i18n for all 24 official EU languages via a single translator-friendlylang.toml. Output is PDF/UA-1 conformant (semantic H1–H3 headings producing a real document outline, presentational layout tagged asDivrather than a bogus data table, tagged CEFRTable/TH/TD, alt text, document metadata). The complete Open Sans family (Apache-2.0) is vendored so builds are reproducible and rendered PDFs embed subsetted fonts with no system/Base-14 fallback. 24 per-language examples double as an i18n regression suite, and CI re-verifies accessibility and font embedding on every push.I have read and followed the submission guidelines and, in particular, I
selected a name that isn't the most obvious or canonical name for what the package does
The name is
rasko-europass: a unique, non-descriptive part (rasko, the author's handle) followed by a descriptive part using the official entity abbreviation (europass), mirroring the documentation'sorganized-ajp/eternal-ajpexample shape. The unamended entity name (europass) is deliberately not used and this is not an official EU package; the full entity name is supplied as a keyword (europass) as encouraged for template packages. The obvious/canonical name for this functionality (europass-cv) was avoided on purpose; it remains only as the descriptive development-repository name, which is not subject to the package naming rules.added a
typst.tomlfile with all required keysadded a
README.mdwith documentation for my packagehave chosen a license and added a
LICENSEfile or linked one in myREADME.mdtested my package locally on my system and it worked
excluded PDFs or README images, if any, but not the LICENSEensured that my package is licensed such that users can use and distribute the contents of its template directory without restriction, after modifying them through normal use.
Additional notes for reviewers:
fonts/, licensed Apache-2.0 with the full licence text shipped alongside (fonts/LICENSE-OpenSans-Apache2.txt) and provenance documented infonts/README.mdandNOTICE.md. Users may freely use and modify the template through normal use.excludeomits build/verification scripts and example PDF outputs;README.md,LICENSEand thethumbnail.pngare included.@local/rasko-europass:1.0.0) with no font flags: the entrypoint,lang.toml, assets and the embedded fonts all resolve, and the produced PDF passes--pdf-standard 1.7,ua-1.