CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
A data-driven CV generation system built with Typst. A reusable template (cv-template.typ) is consumed by a personal CV document (guilherme-d-garcia-cv.typ) that loads structured publication data from YAML files. Output is a compiled PDF.
Build Command
typst compile guilherme-d-garcia-cv.typNo other build tools, package managers, or test frameworks are used. Typst packages (datify, fontawesome, use-academicons) are resolved automatically by the Typst compiler.
Architecture
YAML data files ──→ guilherme-d-garcia-cv.typ ──→ typst compile ──→ PDF
│
imports everything from
│
cv-template.typ
cv-template.typ — Reusable template library (~1,700 lines). Defines all entry functions (
entry(),entry-stacked(),academic-position-entry(),funding-entry(),teaching-entry(),advising-entry(),service-entry(),resource-entry(),entries-numbered()), thepublications()renderer, sidebar viaside(), layout viacv(), and aletter()cover-letter template. Uses Typst state (__st-theme,__st-author) for global theming.guilherme-d-garcia-cv.typ — The actual CV document (~2,600 lines). Configures colors, fonts, language, and content. Loads YAML with
yaml("filename.yml")and passes data to template functions. Contains show rules for author-name highlighting and abbreviation formatting.YAML files — Structured bibliographic data split by category:
articles.yml,books.yml,chapters.yml,manuscripts.yml,publications.yml,publications-selected.yml,reviews.yml,others.yml. Each entry uses a consistent schema with fields:type,title,author,date,page-range,serial-number.doi,osf,html, andparent(periodical/book metadata).
Key Patterns
- Publication linking priority: The template links publications using OSF preprint URL first, then DOI, then custom
htmlfield, then no link. - Author highlighting: The
highlight-authorsparameter inpublications()bolds specific author names in rendered lists. - Color theming: Configured via
accent-color,link-color,header-color,font-colorparameters tocv(). Multiple preset themes are commented out in the CV file. - Sidebar content: Managed through
side()function calls that use Typst state to render content in the sidebar region on page 1.
YAML Entry Schema
key_identifier:
type: article | chapter | book | manuscript | review
title: "Title string"
author:
- "Last, First"
date: 2025
page-range: "1-10" # optional
serial-number:
doi: "10.xxxx/xxxxx" # optional
osf: "https://..." # optional, OSF preprint link
html: "https://..." # optional, companion webpage
parent:
type: periodical | book
title: "Journal or Book Name"
volume: 47 # optional
issue: 3 # optional
editor: # optional, for chapters
- "Last, First"Copyright © Guilherme Duarte Garcia