Templates
Template reference
Everything a template needs so HitApply can fill it in. Use this page to write a template by hand, or give it to an AI assistant (see Make one with an AI assistant).
A template is one .tex file that does three things:
- Declares itself in a short metadata block.
- Defines a fixed set of LaTeX macros, one for each part of a document.
- Marks where the content goes with
{{HITAPPLY_BODY}}.
HitApply then writes the body as calls to your macros. You decide how each part looks. HitApply decides what it says.
The metadata block
Put this anywhere before \begin{document}. Every line between the markers must start with %.
% HITAPPLY-CONTRACT-BEGIN
% {
% "contract_version": 1,
% "kind": "resume",
% "name": "My Template",
% "sections": ["header", "summary", "education", "experience", "projects", "skills"]
% }
% HITAPPLY-CONTRACT-END
| Field | Required | Meaning |
|---|---|---|
contract_version | Yes | Always 1. |
kind | Yes | "resume" or "cover". |
name | No | The name shown in HitApply. |
sections | Résumés only | Your default section order, from header, summary, education, experience, projects, skills, bullets. Leave it out of cover letters. |
Rules for the file
- It's a complete document, with
\documentclass,\begin{document}and\end{document}. - It contains
{{HITAPPLY_BODY}}exactly once, between\begin{document}and\end{document}. - It defines every macro for its kind, even ones your design rarely shows.
- It uses standard TeX Live packages only. No shell escape, downloads, separate files, images or custom fonts. It must compile within 60 seconds.
- It never contains a real person's details.
Résumé macros
| Macro | Arguments | What it draws |
|---|---|---|
\haHeader{name}{contacts} | 2 | The header. contacts is a list of \haContact calls, or empty, so handle the empty case if you draw separators. |
\haContact{icon}{text} | 2 | One contact item. icon is an icon name from the list below, or empty. |
\haContactSep | 0 | Drawn between contact items. |
\haSection{title} | 1 | A section heading. |
\haParagraph{text} | 1 | A paragraph, used for the summary and custom text sections. |
\haSkills{rows} | 1 | Wraps the skills block. rows is a list of \haSkillRow calls. |
\haSkillRow{name}{items} | 2 | One row of skills. name can be empty. |
\haEntryListStart / \haEntryListEnd | 0 | Wrap the entries of an education, experience or projects section. |
\haEntry{title}{right}{subtitle}{subright} | 4 | An education or experience entry. Experience: role, dates, company, location. Education: school, location, degree, date. Any argument may be empty. |
\haProject{title}{subtitle}{right} | 3 | A project entry. subtitle is often empty. |
\haBulletsStart / \haBullet{text} / \haBulletsEnd | 0 / 1 / 0 | A bullet list, under an entry or as its own section. |
Optional: before each entry list HitApply runs \def\haEntryShape{education} (or timeline or project). Read it if you want education and experience laid out differently. Add \def\haEntryShape{} near the top if you use it.
HitApply fits the page by hiding lower-priority bullets and entries. It never changes your spacing.
Cover letter macros
| Macro | Arguments | What it draws |
|---|---|---|
\haCoverSender{name}{contacts} | 2 | Your name and contact line. contacts works as in \haHeader. |
\haContact{icon}{text} and \haContactSep | 2 / 0 | Required in cover letters too. |
\haCoverRecipient{company}{location}{date} | 3 | Recipient and date. Any argument may be empty. |
\haCoverSubject{text} | 1 | The subject line. Left out when empty. |
\haCoverGreeting{text} | 1 | "Dear …". Left out when empty. |
\haCoverParagraph{text} | 1 | One body paragraph, called once per paragraph. |
\haCoverClosing{salutation}{name} | 2 | The sign-off and your name. |
Text arrives ready to print
Every argument is already escaped. Don't escape it again or wrap it in \detokenize. Characters like &, %, $ and _ print as themselves. The only formatting is bold: HitApply turns **bold** into \textbf{...} for you.
Contact icons come from fontawesome5, so load that package. icon is always one of these, or empty:
faPhone, faEnvelope, faLinkedin, faGithub, faGlobe, faMapMarker
A common way to draw one: \csname #1\endcsname. Check for an empty icon first.
HitApply decides what appears
- Hidden sections, entries, bullets and contacts are never sent to your template.
- Empty sections are left out entirely, heading included.
- Bullet lists are only started when there's at least one bullet.
So you never need to guard against an empty list, but you still have to define every macro.
Checklist
HitApply rejects a template, with a message saying why, if:
- the metadata block is missing, appears twice, isn't closed, or has a line that doesn't start with
% contract_versionisn't1,kindis wrong, or there's an unknown field or section name- a cover letter declares
sections - any required macro isn't defined with
\newcommand,\renewcommand,\providecommandor\def {{HITAPPLY_BODY}}is missing, appears twice, or sits outside the document- the document doesn't compile
Complete example: cover letter
A minimal, working cover letter template.
% HITAPPLY-CONTRACT-BEGIN
% {
% "contract_version": 1,
% "kind": "cover",
% "name": "Minimal Letter"
% }
% HITAPPLY-CONTRACT-END
\documentclass[11pt,letterpaper]{article}
\usepackage[letterpaper,left=1in,right=1in,top=1in,bottom=1in]{geometry}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{setspace}
\usepackage{parskip}
\usepackage[hidelinks]{hyperref}
\usepackage{fontawesome5}
\setstretch{1.1}
\pagestyle{empty}
\setlength{\parindent}{0pt}
\newcommand{\haContact}[2]{\raisebox{-0.1\height}{\csname #1\endcsname}\ #2}
\newcommand{\haContactSep}{\hspace{0.6em}\textbar\hspace{0.6em}}
\newcommand{\haCoverSender}[2]{%
{\fontsize{18pt}{22pt}\selectfont #1}\par
\vspace{4pt}
{\small #2}\par
\vspace{18pt}
}
\newcommand{\haCoverRecipient}[3]{%
#1\par
#2\par
#3\par
\vspace{16pt}
}
\newcommand{\haCoverSubject}[1]{\textbf{#1}\par\vspace{12pt}}
\newcommand{\haCoverGreeting}[1]{#1\par\vspace{10pt}}
\newcommand{\haCoverParagraph}[1]{#1\par\vspace{10pt}}
\newcommand{\haCoverClosing}[2]{%
\vspace{10pt}
#1\par
\vspace{8pt}
\textbf{#2}\par
}
\begin{document}
{{HITAPPLY_BODY}}
\end{document}
Complete example: résumé
The classic one-column résumé layout, with every résumé macro defined.
% HITAPPLY-CONTRACT-BEGIN
% {
% "contract_version": 1,
% "kind": "resume",
% "name": "Jake's Resume — Classic",
% "sections": ["header", "summary", "education", "experience", "projects", "skills"]
% }
% HITAPPLY-CONTRACT-END
\documentclass[letterpaper,11pt]{article}
\usepackage{latexsym}
\usepackage[empty]{fullpage}
\usepackage{titlesec}
\usepackage{marvosym}
\usepackage[usenames,dvipsnames]{color}
\usepackage{verbatim}
\usepackage{enumitem}
\usepackage[hidelinks]{hyperref}
\usepackage{fancyhdr}
\usepackage[english]{babel}
\usepackage{tabularx}
\usepackage{fontawesome5}
\usepackage{multicol}
\setlength{\multicolsep}{-3.0pt}
\setlength{\columnsep}{-1pt}
\input{glyphtounicode}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% Adjust margins
\addtolength{\oddsidemargin}{-0.6in}
\addtolength{\evensidemargin}{-0.5in}
\addtolength{\textwidth}{1.19in}
\addtolength{\topmargin}{-.7in}
\addtolength{\textheight}{1.4in}
\urlstyle{same}
\raggedbottom
\raggedright
\setlength{\tabcolsep}{0in}
% Sections formatting
\titleformat{\section}{
\vspace{-1pt}\scshape\raggedright\large\bfseries
}{}{0em}{}[\color{black}\titlerule \vspace{-2pt}]
\pdfgentounicode=1
% --- Contract macros ------------------------------------------------------
\makeatletter
\newcommand{\haHeader}[2]{%
\def\ha@contacts{#2}%
\begin{center}
{\Huge \scshape #1}%
\ifx\ha@contacts\@empty\else\\ \vspace{2pt} \small #2\fi
\vspace{3pt}
\end{center}
}
\makeatother
\newcommand{\haContact}[2]{\raisebox{-0.2\height}{\csname #1\endcsname}\ #2}
\newcommand{\haContactSep}{~ }
\newcommand{\haSection}[1]{\section{#1}}
\newcommand{\haParagraph}[1]{{\small #1}\par\vspace{2pt}}
\makeatletter
\newcommand{\haSkillRow}[2]{%
\def\ha@skillname{#1}%
\ifx\ha@skillname\@empty #2\else\textbf{#1}{: #2}\fi \\
}
\makeatother
\newcommand{\haSkills}[1]{%
\begin{itemize}[leftmargin=0.15in, label={}]
\small{\item{#1}}
\end{itemize}
\vspace{-10pt}
}
\newcommand{\haEntryListStart}{\begin{itemize}[leftmargin=0.0in, label={}]}
\newcommand{\haEntryListEnd}{\end{itemize}}
\newcommand{\haEntry}[4]{%
\vspace{0pt}\item
\begin{tabular*}{1.0\textwidth}[t]{l@{\extracolsep{\fill}}r}
\textbf{#1} & {\small #2} \\
\textit{\small#3} & \textit{\small #4} \\
\end{tabular*}\vspace{-7pt}
}
\makeatletter
\newcommand{\haProject}[3]{%
\def\ha@subtitle{#2}%
\item
\begin{tabular*}{1.0\textwidth}{l@{\extracolsep{\fill}}r}
\small\textbf{#1}\ifx\ha@subtitle\@empty\else{ $|$ \emph{#2}}\fi
& \textbf{\small #3}\\
\end{tabular*}\vspace{-7pt}
}
\makeatother
\renewcommand\labelitemi{$\vcenter{\hbox{\tiny$\bullet$}}$}
\renewcommand\labelitemii{$\vcenter{\hbox{\tiny$\bullet$}}$}
\newcommand{\haBulletsStart}{\begin{itemize}}
\newcommand{\haBullet}[1]{\item\small{{#1 \vspace{0pt}}}}
\newcommand{\haBulletsEnd}{\end{itemize}\vspace{-5pt}}
\begin{document}
{{HITAPPLY_BODY}}
\end{document}