| name | template-fill |
| description | Fill a LaTeX resume template with structured ResumeData using a per-template LLM-driven strategy. Produces a complete, compilable .tex file by studying an example .tex for the chosen template, understanding its custom commands, and generating correct LaTeX code. Adaptively handles section mismatch: omits template sections with no data, adds new sections for resume content not in the template, and uncomments commented sections when data exists. Handles LaTeX special character escaping and CJK mixed-language content. Supports templates: basic, modern, classic, academic — each with unique visual style but shared command interface. Use when converting structured resume data into a formatted LaTeX document.
|
Template Fill
You are tasked with filling a LaTeX resume template using structured resume
data (ResumeData JSON). You must produce a complete, compilable .tex
file.
Available Templates
| Template | Style | Best For |
|---|
| basic | Clean layout, serif, section separators | General industry |
| modern | Sans-serif, navy accent color, colored links | Tech, startups |
| classic | Serif, centered header, double rules, formal | Corporate, finance |
| academic | Extended CV, numbered publications, awards, teaching | PhD, professors |
Workflow
- Read the template
.tex file — understand the preamble, custom
commands, and section structure.
- Read the example
.tex file — this is a fully filled, compilable
reference showing correct usage of the template's commands with real data.
- Read the ResumeData JSON — the structured data to fill into the
template.
- Generate a filled
.tex file following the rules below.
Filling Rules
Rule 1: Preserve Preamble Exactly
Copy the template's entire preamble (from \documentclass through the
custom command definitions to \begin{document}) without modification.
Do NOT add, remove, or modify any \usepackage, \newcommand, color
definitions, or other preamble content.
Rule 2: Reference the Example
Study the example .tex to understand how each custom command is used.
All templates share the same core command interface:
\resumeSubheading{arg1}{arg2}{arg3}{arg4} — note which argument is
title, date, subtitle, location.
\resumeItem{text} — single bullet point.
\resumeItemListStart / \resumeItemListEnd — wraps bullet lists.
\resumeSubHeadingListStart / \resumeSubHeadingListEnd — wraps
subheading groups.
\resumeProjectHeading{title}{date} — project entries.
\resumeNonExperience{text} — single flowing-paragraph entry for any
non-experience section (publications, awards, certifications, etc.).
Text wraps naturally; no two-column layout.
Template-specific commands (only available in certain templates):
\awardEntry{description}{year} — Academic template only.
- Numbered publications via
\enumerate — Academic template only.
Rule 3: Fill Section by Section
For each section in the template:
- Check if ResumeData has content for this section.
- If yes: fill using the template's custom commands, following the
example's patterns.
- If no: completely omit the entire section — remove the
\section{}
command, the list environments, and everything between the section
comment markers. Do NOT leave empty sections. Do NOT leave orphaned
comment markers like %-----------SECTION----------- for omitted sections.
Rule 4: Handle Commented Sections
Some templates have commented-out sections (prefixed with %):
- If ResumeData has content for a commented section, uncomment it and
fill it with data.
- If no data: remove the commented section entirely (do not leave
commented-out blocks in the output).
Rule 4b: Add Extra Sections Not in Template
If the ResumeData (especially rawSections) contains sections with content
that have no corresponding section in the template, you MUST create new
sections to include this content:
- Placement: Insert extra sections BEFORE the Skills section. If there
is no Skills section, insert before
\end{document}.
- Styling: Use the same
\section{} formatting as the template. Match
the visual style (font weight, spacing, etc.) of existing sections.
- Content format: Choose the appropriate command pattern:
- For entry-style content (publications, awards, certifications,
volunteer work, leadership, teaching, etc.) — use
\resumeNonExperience with inline metadata:
\section{Section Title}
\resumeSubHeadingListStart
\resumeNonExperience{\textbf{Title/Name}, Organization, Date.}
\resumeSubHeadingListEnd
- For simple bullet-list content (e.g., Interests, Activities):
\section{Section Title}
\resumeItemListStart
\resumeItem{Content item}
\resumeItemListEnd
- For simple text content (e.g., Summary, Objective):
\section{Section Title}
\small{Content text here.}
- Faithfulness: Preserve ALL content from the resume. Do not
summarize, truncate, or omit any data from extra sections.
Rule 5: LaTeX Special Character Escaping
Escape these characters in ALL content text (not in LaTeX commands):
& → \&
% → \%
$ → \$
# → \#
_ → \_
{ → \{
} → \}
Exception: Do NOT escape characters that are part of LaTeX commands
(e.g., \textbf{...}, \href{...}{...}).
Rule 6: CJK Mixed Content
- Keep CJK support setup from the preamble intact.
- Chinese characters can be used directly in content — they do not need
escaping.
- Ensure proper spacing between CJK and Latin characters (handled by
xeCJK settings in preamble).
Rule 7: Section Mapping
Common sections (all templates):
| ResumeData field | Template section |
|---|
| name, email, phone, links | HEADING |
| education[] | Education |
| experience[] | Experience |
| skills[] | Skills |
Template-specific sections:
| ResumeData field | Template | Section |
|---|
| projects[] | modern (active), basic/classic (commented) | Projects |
| publications | basic, modern, classic | Publications (via \resumeNonExperience — Rule 10) |
| publications | academic | Publications (via multi-line \enumerate — Rule 10) |
| awards/honors | academic | Awards & Honors (via \awardEntry) |
| teaching entries | academic | Teaching Experience |
| service entries | academic | Professional Service (commented) |
| certifications[] | any | Certifications section (create if not in template) |
| summary | any | Summary/Objective section (create if not in template) |
Extra sections (from rawSections, not in template):
Any section in rawSections that does not map to a template section or
structured field above MUST be included as a new section. Common extras
include: Volunteer Work, Languages, Interests, Leadership, References,
Activities, Honors, etc. Follow Rule 4b for formatting.
Rule 8: Template-Specific Heading Format
Each template has a unique heading structure. Match the example exactly:
- basic: Centered, with
Email: and Phone: labels, $|$ separators
- modern: Centered, no labels,
\textbullet separators, larger name
- classic: Centered with small caps,
$\diamond$ separators, thick rule
- academic: Two-column
tabular* (name+title left, contact right), thin rule
Rule 9: Academic Template Special Handling
For the Academic template:
- Split experience into Research Experience and Industry Experience
based on role context (lab, RA, RI → research; company, SDE → industry).
If all entries are one type, use a single appropriate section.
- Publications use
\enumerate with [\arabic*] labels, NOT \resumeItem.
Each \item must use multi-line structure — see Rule 10.
- Awards use
\awardEntry{description}{year} (2 args), NOT \resumeSubheading.
- Include department/title and institution in the heading if available.
Rule 10: \resumeNonExperience for Non-Experience Sections
For ALL sections other than Education, Experience, and Projects (which
use \resumeSubheading / \resumeProjectHeading), use
\resumeNonExperience{text} in basic / modern / classic templates.
\resumeNonExperience takes a single argument — one flowing paragraph
of inline text. All metadata (title, authors, venue, year, organization,
etc.) is composed inline. Text wraps naturally within the page margins.
There is NO two-column layout and NO right-aligned date.
General pattern:
\section{Section Title}
\resumeSubHeadingListStart
\resumeNonExperience{FORMATTED INLINE TEXT}
\resumeSubHeadingListEnd
If an entry needs additional detail bullets, add them after:
\resumeNonExperience{FORMATTED INLINE TEXT}
\resumeItemListStart
\resumeItem{Additional detail}
\resumeItemListEnd
Formatting conventions for the inline text:
- Title/name in
\textbf{...} — NO quotes around titles.
- Venue/journal in
\emph{...}.
- Year/date placed inline with the venue, not separately.
- Fields separated by periods or commas; entry ends with a period.
Publications (basic / modern / classic)
\resumeSubHeadingListStart
\resumeNonExperience{\textbf{Paper Title.} Author1, Author2, \& Author3. \emph{Conference Name}, Year, pp.~X--Y.}
\resumeSubHeadingListEnd
Publications (academic — numbered)
Academic template uses \enumerate (NOT \resumeNonExperience):
\begin{enumerate}[leftmargin=0.3in, label={[\arabic*]}]
\item\small{\textbf{Paper Title.} \\
Author1, Author2, \& Author3. \\
\emph{Conference/Journal Name}, Year, pp.~123--456. \vspace{-2pt}}
\end{enumerate}\vspace{-5pt}
Awards / Honors (non-academic templates)
\resumeSubHeadingListStart
\resumeNonExperience{\textbf{Award Name}, Issuing Organization, Year.}
\resumeSubHeadingListEnd
Awards / Honors (academic template)
Use \awardEntry{description}{year} (2 args, academic only):
\resumeSubHeadingListStart
\awardEntry{Best Paper Award, ACM SIGMOD Conference}{2023}
\resumeSubHeadingListEnd
Certifications
\resumeSubHeadingListStart
\resumeNonExperience{\textbf{Certification Name}, Issuing Organization, Date. Credential ID: XXX.}
\resumeSubHeadingListEnd
Volunteer Work / Leadership / Activities
\resumeSubHeadingListStart
\resumeNonExperience{\textbf{Organization Name} --- Role, Date Range, Location.}
\resumeItemListStart
\resumeItem{Description of activity or contribution}
\resumeItemListEnd
\resumeSubHeadingListEnd
Teaching (non-academic templates, as extra section)
\resumeSubHeadingListStart
\resumeNonExperience{\textbf{Course Name}, Role, Institution, Term Year.}
\resumeItemListStart
\resumeItem{Responsibility description}
\resumeItemListEnd
\resumeSubHeadingListEnd
Professional Affiliations / Memberships
\resumeSubHeadingListStart
\resumeNonExperience{\textbf{IEEE} --- Member, Computer Society, 2019 -- Present.}
\resumeSubHeadingListEnd
IMPORTANT: Do NOT use \resumeSubheading or \resumeProjectHeading
for non-experience sections. Their tabular* columns do not wrap text,
causing long content (paper titles, author lists, etc.) to overflow off
the page. Always use \resumeNonExperience for these sections.
Quality Checklist
Before returning the .tex output, verify:
For detailed per-template guides, consult references/FILLING_GUIDE.md.