Make every number in the final PDF traceable to the exact code line that produced it. Uses \hypertarget/\hyperlink LaTeX commands and \num{formula} evaluated at compile time. Use for reproducibility and data integrity verification.
Make every number in the final PDF hyperlink back to the exact code line that produced it.
$0 — Paper project directory containing code and LaTeX files~/.claude/skills/backward-traceability/references/traceability-patterns.mdpython ~/.claude/skills/backward-traceability/scripts/ref_numeric_values.py \
--scan paper/main.tex --output report.json
Reports: all hypertargets, hyperlinks, orphan references, unreferenced numeric values.
python ~/.claude/skills/backward-traceability/scripts/ref_numeric_values.py \
--verify paper/main.tex --code-output results.txt
Cross-checks values between paper text and code output. Reports mismatches.
For every numeric value produced by experiment code, add hypertarget tags:
# In experiment code output:
print(f"\\hypertarget{{R1a}}{{45.3}}") # Mean accuracy
print(f"\\hypertarget{{R1b}}{{2.1}}") # Std deviation
Label format: {prefix}{line_number}{letter} where letter = a, b, c... for multiple values on same line.
Use \hyperlink to create clickable references in the paper:
Our method achieves \hyperlink{R1a}{45.3}\% accuracy
($\pm$\hyperlink{R1b}{2.1}).
For values derived from other values, use \num{} for compile-time evaluation:
% \num{formula, "explanation"} → evaluated at compile time
The improvement is \num{45.3 - 38.7, "accuracy gain"}\%.
Create an appendix with the full code listing, with \hypertarget anchors at relevant lines:
\section*{Appendix: Code Listing}
\begin{lstlisting}[escapechar=@]
@\hypertarget{code1}{}@result = model.evaluate(test_data)
@\hypertarget{code2}{}@accuracy = result['accuracy']
\end{lstlisting}
\hypertarget in the code\num{} formula must evaluate correctlyRequired packages:
\usepackage{hyperref}
\usepackage{listings}
\num{} for any derived/computed values