Skip to content
Tutorials Center
My learning

Topics

Lesson 36 of 38 ยท Projects and Practice

Project: Write a Research Paper in LaTeX

Put it all together: structure a research paper with abstract, equations, figures, tables, biblatex citations and cross-references, then check it before submission.

In this project you assemble a short research paper that uses most of what the course has covered: a title block, abstract, sections, equations, a data figure, a table, citations and cross-references. The topic is a small made-up study, so the focus stays on the LaTeX. You can replace the content with your own work and keep the skeleton.

Project layout

TEXT
paper/
  main.tex
  preamble.tex
  sections/
    introduction.tex
    method.tex
    results.tex
    conclusion.tex
  figures/
    response.pdf
  data/
    measurements.csv
  references.bib
  .latexmkrc

Keeping sections in separate files gives clean diffs (version control) and lets co-authors edit different parts.

main.tex

LATEX
\documentclass[11pt, a4paper]{article}
\input{preamble}

\title{Response of a Low-cost Temperature Sensor}
\author{Ada Example\thanks{University of Example, \texttt{[email protected]}}
  \and Ben Sample}
\date{\today}

\begin{document}
\maketitle

\begin{abstract}
We measure the step response of a low-cost temperature sensor and fit a
first-order model. The time constant is $\tau = 4.2\,\mathrm{s}$, which agrees
with the datasheet within 5\%. We discuss limits for fast control loops.
\end{abstract}

\input{sections/introduction}
\input{sections/method}
\input{sections/results}
\input{sections/conclusion}

\printbibliography
\end{document}

preamble.tex

LATEX
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{microtype}
\usepackage[margin=2.5cm]{geometry}
\usepackage{amsmath, amssymb}
\usepackage{siunitx}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{pgfplots}\pgfplotsset{compat=1.18}
\usepackage{csquotes}
\usepackage[backend=biber, style=numeric, sorting=none]{biblatex}
\addbibresource{references.bib}
\usepackage[colorlinks=true, allcolors=blue!60!black]{hyperref}
\usepackage[capitalise]{cleveref}

\DeclareMathOperator*{\argmin}{arg\,min}
\newcommand{\tauval}{\ensuremath{\tau}}

The order follows the rules from using packages: csquotes before biblatex, hyperref late and cleveref last. siunitx formats numbers with units, as \qty{4.2}{\second}.

sections/method.tex

LATEX
\section{Method}\label{sec:method}
We model the sensor as a first-order system with time constant $\tau$ and gain $K$.
After a temperature step of size $\Delta T$, the output is
\begin{equation}\label{eq:step}
  y(t) = K\,\Delta T\left(1 - e^{-t/\tau}\right).
\end{equation}
We estimate $\tau$ by least squares,
\begin{equation}\label{eq:fit}
  \hat{\tau} = \argmin_{\tau}\sum_{i=1}^{N}\bigl(y_i - y(t_i;\tau)\bigr)^2,
\end{equation}
as in \textcite{ljung1999}. \Cref{eq:step,eq:fit} are implemented in Python.

The stand-in below does that fit with a simple grid search so you can see what Equation (2) means in practice; the values are generated from a known time constant.

JS Fit the time constant

Press Run (or Ctrl + Enter) to see the console output here.

No output.

sections/results.tex

LATEX
\section{Results}\label{sec:results}
\Cref{fig:response} shows the measured and fitted response, and
\cref{tab:params} lists the estimated parameters.

\begin{figure}[tb]
  \centering
  \begin{tikzpicture}
    \begin{axis}[width=0.85\linewidth, height=6cm, xlabel={$t$ (\unit{\second})},
                 ylabel={$y$ (\unit{\celsius})}, legend pos=south east, grid=major]
      \addplot[only marks, mark=*, mark size=1.2pt] table[col sep=comma, x=t, y=y]
        {data/measurements.csv};
      \addplot[thick, red, domain=0:24, samples=100] {10*(1-exp(-x/4.2))};
      \legend{Measured, Fit}
    \end{axis}
  \end{tikzpicture}
  \caption{Step response of the sensor.}\label{fig:response}
\end{figure}

\begin{table}[tb]
  \centering
  \caption{Estimated parameters.}\label{tab:params}
  \begin{tabular}{lSS}
    \toprule
    Sensor & {$\tau$ (s)} & {Gain $K$} \\
    \midrule
    A & 4.20 & 1.01 \\
    B & 4.35 & 0.98 \\
    \bottomrule
  \end{tabular}
\end{table}

Details to notice: the caption comes before the label (labels and cross-references); booktabs rules instead of vertical lines; the S column type from siunitx aligns decimals (it needs \usepackage{siunitx}); [tb] allows the figure at the top or bottom, never [h!] as a habit.

Bibliography

BIBTEX
@book{ljung1999,
  author    = {Ljung, Lennart},
  title     = {System Identification: Theory for the User},
  publisher = {Prentice Hall},
  edition   = {2},
  year      = {1999},
}

Build with latexmk -pdf main.tex; latexmk will call Biber when needed (biblatex and Biber).

Pre-submission checklist

The stand-in below turns a checklist into an automatic audit of the main source. In a real project the same script runs in CI.

JS Paper audit

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Manual items before submitting:

  1. Compile from scratch; no ?? and no "undefined citation" warnings.
  2. No overfull boxes sticking into the margin.
  3. Figures are vector PDFs or high-resolution PNGs, and readable at print size (text in figures near 8 pt or larger).
  4. Fonts embedded (pdffonts paper.pdf shows "yes" in the emb column).
  5. Meta information: \hypersetup{pdftitle=...,pdfauthor=...}.
  6. The journal class and its rules (page limit, anonymisation, line numbers via lineno).
  7. Archive: sources, figures, .bbl, class and style files, and a README with the build command.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why does the project load csquotes before biblatex?

    biblatex recommends csquotes for correct, language-aware quotation marks in titles.
  2. 2. Which package aligns decimal numbers in a table column using the S column type?

    siunitx provides the S column type for number alignment.
  3. 3. What placement should you normally use for figures?

    Floats are meant to move; forcing a position leads to white space and poor layout.
  4. 4. What should you check about the final PDF for submission?

    Journals commonly require embedded fonts, and unresolved references indicate an incomplete build.

Summary

  • Split the paper into a preamble and section files; keep data and figures in folders.
  • Combine biblatex, cleveref, siunitx, booktabs and PGFPlots in the right load order.
  • Use equation environments with labels and \Cref for readable cross-references.
  • Run an audit for references, citations and unused labels, and finish with a manual checklist.

Next: Project: Thesis Structure