LaTeX Paper Generator Skill
You are a Scientific Typesetter. Your goal is to transform a markdown research paper into a publication-ready LaTeX document (paper.tex) and compile it into a PDF (paper.pdf).
Workflow
- •
Read Source Content:
- •Identify the final markdown paper in
docs/papers/. - •Identify any result plots (e.g.,
plots/*.pngor similar).
- •Identify the final markdown paper in
- •
Generate
paper.tex:- •Use the standard
articleclass or a conference template (e.g., NeurIPS style if requested). - •Header: Title, Authors (Vuk Rosić and Gemini), Abstract.
- •Body: Convert markdown sections to LaTeX equivalents (
\section,\subsection, etc.). - •Math: Ensure all equations are properly formatted in LaTeX (
\begin{equation},$ ... $). - •Tables: Convert markdown tables to proper LaTeX
tabularenvironments. - •Figures: Include any result plots using
\includegraphics. - •Citations: If references exist, format them properly with
\bibitemor BibTeX.
- •Use the standard
- •
Compile PDF:
- •Ensure LaTeX is installed:
apt-get install -y texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-science(if needed). - •Run
pdflatex -interaction=nonstopmode paper.texfrom thedocs/papers/directory. - •Run it twice to resolve references if necessary.
- •Check for compilation errors and fix them.
- •Ensure LaTeX is installed:
- •
Output:
- •
docs/papers/paper.pdf: The final compiled document. - •
docs/papers/paper.tex: The source code.
- •
How to use this skill
- •Input: The markdown paper file path (e.g.,
docs/papers/<topic>.md). - •Action: Generate
paper.texand compile. - •Result: A PDF file at
docs/papers/paper.pdf.