chore: add project config, Claude instructions, and reference docs

- CLAUDE.md: project guidance for Claude Code (build commands, conventions,
  editing rules, CI notes)
- AGENTS.md: agent-level task conventions for autonomous editing sessions
- .claude/: skills, memory, and settings for Claude Code integration
- docs/: research-backed LaTeX reference examples (small, medium, large-doc
  templates with latexmkrc, local .sty, CI workflow)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Mahdi Hoseini 2026-03-04 16:39:18 -08:00
parent 4b3b3ec1a7
commit 8aa1e106be
34 changed files with 1150 additions and 0 deletions

View file

@ -0,0 +1,17 @@
name: build-latex
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compile LaTeX
uses: xu-cheng/latex-action@v4
with:
root_file: src/main.tex
work_in_root_file_dir: true
latexmk_use_lualatex: true

View file

@ -0,0 +1,14 @@
LATEXMK=latexmk
MAIN=src/main.tex
.PHONY: pdf clean glossary
pdf:
$(LATEXMK) -lualatex -interaction=nonstopmode -file-line-error $(MAIN)
glossary:
makeglossaries src/main
clean:
$(LATEXMK) -C $(MAIN)
rm -f src/main.acn src/main.acr src/main.alg src/main.glo src/main.gls src/main.ist

View file

@ -0,0 +1,6 @@
@manual{biblatex,
title = {The biblatex Package},
author = {Philipp Lehman and Joseph Wright and Philip Kime and others},
year = {2025},
url = {https://ctan.org/pkg/biblatex}
}

View file

@ -0,0 +1 @@
\newacronym{ci}{CI}{continuous integration}

View file

@ -0,0 +1,2 @@
\chapter{Reproducibility Notes}
Build commands are pinned in \texttt{Makefile} and CI workflow config.

View file

@ -0,0 +1,2 @@
\chapter{Introduction}
We define CI as continuous integration. See Table~\ref{tab:baseline}.

View file

@ -0,0 +1,16 @@
\chapter{Methods}
The workflow uses explicit build orchestration and modular files.
\begin{table}[htbp]
\centering
\begin{tabular}{ll}
\toprule
Component & Choice \\
\midrule
Engine & LuaLaTeX \\
Bibliography & biblatex+biber \\
\bottomrule
\end{tabular}
\caption{Baseline choices.}
\label{tab:baseline}
\end{table}

View file

@ -0,0 +1,2 @@
\chapter{Results}
The repository structure enables per-file reviews and targeted ownership.

View file

@ -0,0 +1,4 @@
\maketitle
\begin{abstract}
This project demonstrates a large-repo LaTeX layout with modular chapters, bibliography, and acronyms.
\end{abstract}

View file

@ -0,0 +1,32 @@
\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage[final]{microtype}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage[hidelinks]{hyperref}
\usepackage{styles/project}
\title{Large Document Example}
\author{Your Team}
\date{\today}
\begin{document}
\pagenumbering{roman}
\input{frontmatter/title}
\tableofcontents
\clearpage
\pagenumbering{arabic}
\input{chapters/01-intro}
\input{chapters/02-methods}
\input{chapters/03-results}
\appendix
\input{appendix/a-reproducibility}
\end{document}

View file

@ -0,0 +1,4 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{project}[2026/03/04 Project-local macros]
\newcommand{\ProjectName}{LargeDocExample}

View file

@ -0,0 +1,8 @@
@article{knuth1986,
author = {Donald E. Knuth},
title = {The {\TeX}book and Beyond},
journal = {TUGboat},
year = {1986},
volume = {7},
number = {3}
}

View file

@ -0,0 +1,4 @@
$pdflatex = 'pdflatex -interaction=nonstopmode -file-line-error %O %S';
$pdf_mode = 1;
$bibtex_use = 2;
$max_repeat = 5;

View file

@ -0,0 +1,23 @@
\documentclass[11pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[final]{microtype}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{hyperref}
\title{Medium Document Example}
\author{Your Name}
\date{\today}
\begin{document}
\maketitle
\tableofcontents
\input{sections/intro}
\input{sections/method}
\input{sections/results}
\end{document}

View file

@ -0,0 +1,2 @@
\chapter{Introduction}
Modular files keep merge conflicts smaller and enable focused reviews.

View file

@ -0,0 +1,2 @@
\chapter{Method}
This chapter demonstrates splitting technical content across files.

View file

@ -0,0 +1,13 @@
\chapter{Results}
\begin{table}[htbp]
\centering
\begin{tabular}{lr}
\toprule
Metric & Value \\
\midrule
Accuracy & 0.95 \\
Runtime (s) & 1.3 \\
\bottomrule
\end{tabular}
\caption{Example table using \texttt{booktabs}.}
\end{table}

View file

@ -0,0 +1,3 @@
$pdf_mode = 1;
$bibtex_use = 2;
$max_repeat = 5;

View file

@ -0,0 +1,17 @@
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[final]{microtype}
\usepackage{hyperref}
\title{Small Document Example}
\author{Your Name}
\date{\today}
\begin{document}
\maketitle
This is a minimal small-document layout.
\end{document}

View file

@ -0,0 +1,6 @@
@book{lamport1994,
author = {Leslie Lamport},
title = {LaTeX: A Document Preparation System},
year = {1994},
publisher = {Addison-Wesley}
}