myCV/Makefile
Giorgio Gilestro f8563e1336 Add 1-page short CV variant, ORCID, profile photo, pre-commit hook
- cv-short.tex: two-column paracol layout (66/34) with curated content
  in the left column and an "at a glance" sidebar on the right.
  Locally tightens parskip, \cvsection and \cvevent so everything fits
  on a single A4 page, and redefines the sidebar list helper \sbitem
  to replace altacv's non-wrapping tikz \cvtag in the narrow column.
- chapters/short/{current,education,grants-selected,products,
  pubs-selected,sidebar}.tex: hand-curated highlight content
  (top 6 publications, top 6 grants, condensed two-line products,
  stats + recognition + leadership + research-focus sidebar blocks).
- chapters/header.tex / preamble.tex: ORCID 0000-0001-7512-8541
  via a new \orcid info field (faOrcid icon); blog field for
  giorgio.gilest.ro.
- images/gilestro.png: profile photo, used only by the short CV via
  altacv's circular \photoR.
- hooks/pre-commit + `make install-hooks`: rebuilds every variant on
  any .tex/.cls/Makefile change, aborts the commit on build failure,
  and stages refreshed PDFs into pdf/.
- Makefile: short target, hook-install target, dep glob extended to
  chapters/short/*.tex so the short build refreshes when its sources
  change.
2026-05-13 16:25:24 +01:00

46 lines
1.6 KiB
Makefile

# Build CV variants to ./build/<name>.pdf using a dockerised XeLaTeX.
# Run `make` (or `make full`) to build the full CV. Add new targets per variant.
DOCKER_IMAGE := texlive/texlive:latest
BUILD_DIR := build
ENGINE := xelatex
# Run the container with the current dir mounted. UID:GID match avoids root-owned outputs.
# TEXINPUTS prepends ./tex-vendor so altacv.cls (vendored) is found.
DOCKER_RUN = docker run --rm \
-u $(shell id -u):$(shell id -g) \
-v $(CURDIR):/work \
-w /work \
-e TEXINPUTS=.:./tex-vendor: \
$(DOCKER_IMAGE)
.PHONY: all full short clean shell install-hooks
all: full short
# Activate the pre-commit hook that rebuilds every variant on commit.
# Run once after cloning, or after a fresh checkout.
install-hooks:
git config core.hooksPath hooks
@echo "Hooks path set to ./hooks -- pre-commit will rebuild all variants on .tex/.cls/Makefile changes."
# Pattern rule: build/<name>.pdf is built from <name>.tex by running xelatex twice
# (twice to settle cross-references / hyperref).
$(BUILD_DIR)/%.pdf: %.tex preamble.tex $(wildcard chapters/*.tex) $(wildcard chapters/short/*.tex) | $(BUILD_DIR)
$(DOCKER_RUN) $(ENGINE) -interaction=nonstopmode -halt-on-error \
-output-directory=$(BUILD_DIR) $<
$(DOCKER_RUN) $(ENGINE) -interaction=nonstopmode -halt-on-error \
-output-directory=$(BUILD_DIR) $<
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
full: $(BUILD_DIR)/cv-full.pdf
short: $(BUILD_DIR)/cv-short.pdf
# Drop into an interactive TeX-Live shell (handy for debugging).
shell:
docker run --rm -it -u $(shell id -u):$(shell id -g) \
-v $(CURDIR):/work -w /work $(DOCKER_IMAGE) bash
clean:
rm -rf $(BUILD_DIR)