Use this to set up and troubleshoot LaTeX manuscripts for AEC/engineering venues. A starter template is in
article-template.tex next to this file (reference it with ${CLAUDE_PLUGIN_ROOT} or copy it for the user).
1. Choose the right document class (match the venue)
- Elsevier (Automation in Construction, Energy and Buildings, etc.):
elsarticle(\documentclass[ review,3p,times]{elsarticle}; usemodel5-names/elsarticle-numbib styles). - IEEE:
IEEEtran(\documentclass[journal]{IEEEtran}or[conference]). - ASCE: the
ascelike-newclass (\documentclass[Journal]{ascelike-new}), ASCE bib style. - Springer:
sn-jnl(Springer Nature) or legacysvjour3. - ACM:
acmart. - Generic/thesis:
article/report/bookor institutional thesis class;memoir/koma-scriptfor control.
Download the venue's official template first; don't hand-roll formatting a class already provides.
2. Minimal structure
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc} % (modern: use lualatex/xelatex + fontspec)
\usepackage[T1]{fontenc}
\usepackage{graphicx,booktabs,siunitx,amsmath,amssymb}
\usepackage[hidelinks]{hyperref}
\usepackage[capitalise]{cleveref}
\title{...}\author{...}\date{}
\begin{document}\maketitle
\begin{abstract}...\end{abstract}
\section{Introduction}...
\bibliographystyle{elsarticle-num}\bibliography{references}
\end{document}
3. Bibliography (two routes — don't mix)
- BibTeX + natbib (classic, what most publisher styles ship):
\usepackage[numbers]{natbib}(or author-year),\bibliographystyle{<style>.bst},\bibliography{references}; cite with\citep{}/\citet{}. - BibLaTeX + biber (modern, flexible):
\usepackage[style=ieee,backend=biber]{biblatex},\addbibresource{references.bib}, cite with\autocite{}/\textcite{}, print with\printbibliography. - Keep one
references.bib(seecitation-formatsfor entry hygiene: braces around acronyms{BIM},--page ranges, baredoi). Compile order (BibTeX):pdflatex → bibtex → pdflatex → pdflatex.
4. Figures & tables (publication quality)
\begin{figure}[t]
\centering
\includegraphics[width=.8\linewidth]{figs/workflow.pdf} % vector PDF/EPS for diagrams
\caption{Research workflow.}\label{fig:workflow}
\end{figure}
- Use vector (PDF/EPS/SVG→PDF) for diagrams/plots, high-DPI for photos. Refer with
\cref{fig:workflow}. - Tables:
booktabs(\toprule\midrule\bottomrule) — no vertical rules. Caption above tables, below figures.siunitx'sScolumns align numbers on the decimal. - Subfigures:
subcaption(\begin{subfigure}), not the obsoletesubfigurepackage.
5. Math & units
- Equations:
equation/align(amsmath); never useeqnarray. Reference with\eqref{}. - Units & quantities:
siunitx—\qty{2.5}{\kilo\watt\hour\per\meter\squared},\num{1.2e-3},\SI(legacy). Consistent significant figures; correct unit spacing handled automatically. - Use
\(...\)for inline math (not$...$in new code is fine too); define notation once.
6. Cross-referencing & good practice
cleveref(\cref,\Cref) auto-prefixes "Fig./Table/Eq./Sec." and handles ranges — label everything (fig:,tab:,eq:,sec:prefixes) and never hardcode numbers.hyperreflast (or per package-order rules; loadcleverefafterhyperref).- One sentence per line in the source → cleaner
git difffor collaboration. - Comment out, don't delete, while drafting; use
\todo{}(todonotes) for review notes.
7. Overleaf & collaboration
- Overleaf for real-time co-authoring; set the compiler (pdfLaTeX vs XeLaTeX/LuaLaTeX — the latter for custom fonts/Unicode) and TeX Live version to match the template.
- Use Git/Overleaf-Git integration for version control; keep
figs/andreferences.bibin-repo. - For large theses:
\input/\includeper chapter,latexmkfor builds,glossariesfor acronyms.
8. Troubleshooting quick hits
- "Undefined control sequence" → missing
\usepackage. - Citations show as
[?]→ run BibTeX/biber, then re-run LaTeX twice; check.bibkey & style. - "Overfull \hbox" → long URLs/words; use
\sloppy,microtype, orurl/\url{}line-breaking. - Float placement chaos → use
[t]/[b],\clearpage, or theplaceins/\FloatBarriertrick; don't fight it with[H](float package) except sparingly. - Wrong reference style → you're using the wrong
.bst/biblatexstyle; match the venue. - Unicode errors on pdfLaTeX → switch to LuaLaTeX/XeLaTeX or escape characters.
See article-template.tex (bundled) for a clean, commented starting point.