| name | physics-lab-report |
| description | Use when generating, auditing, revising, or compiling UESTC Glasgow College Physics Experiments I/II lab reports, prelab预习报告, postlab实验报告, short/long lab reports, XeLaTeX templates, data tables, uncertainty calculations, scanned-data appendices, or 大物实验报告. |
UESTC Physics Lab Report
Overview
Generate and audit UESTC Glasgow College physics experiment reports with the
existing XeLaTeX templates. Use this skill for prelabs, postlabs, short reports,
long reports, report audits, data-table setup, uncertainty calculation, and
PDF-first delivery.
This is a static, auditable skill knowledge base. It is not a RAG service, vector
database, or automatic textbook ingestion system. Load only the reference files
needed for the current experiment and keep private course materials outside the
public repository.
Golden Template Rule
The files below are hard-won golden templates:
templates/prelab_template.tex
templates/postlab_template.tex
Do not rewrite, reformat, simplify, or "clean up" their settings unless the user
explicitly asks for template maintenance. They encode the official cover
insertion, absolute prelab overlays, score boxes, watermark wording, fonts,
spacing, and appendix behavior.
When producing a report, copy or adapt from these templates into a working
report file. Leave the committed templates unchanged.
Core Principles
- Use the full experiment title as the primary key. Lab numbers change by year.
- Use current official templates and teacher materials before old examples.
- Use real data only. Never invent raw data, questions, signatures, or formulas.
- Prefer manual raw-data input. OCR or visual extraction is only a draft until
the user confirms every value.
- Treat senior reports as style and completeness references only. The goal is
to produce a better, more current, more traceable report than the references.
- Return the final PDF as the main deliverable when local XeLaTeX is available.
- Keep generated plots, scans, and scripts inside the report folder with
relative paths.
Reference Routing
Read these files only when they apply:
| Need | Read |
|---|
| First-time setup, update mode, audit mode | references/course-workflow.md |
| Finding local templates, scans, reports, PPTs, and senior examples | references/material-discovery.md |
| Significant figures, uncertainty, regression, units | references/numerical-rules.md |
| Figures, scanned appendix, XeLaTeX/PDF workflow | references/figures-and-compilation.md |
| Experiment title lookup | references/experiment-index.md |
| Physics Experiments II lookup | references/experiments/physics-experiments-ii-index.md |
| Specific experiment formulas/tables | Matching references/experiments/*.md |
Work Modes
First-Time Setup
Use once per semester or course version:
- Save official prelab and postlab cover PDFs.
- Copy
config/student_profile.example.yaml to config/student_profile.yaml.
- Copy
config/naming.example.yaml to config/naming.yaml.
- Copy
config/template_fields.example.yaml to config/template_fields.yaml.
- Confirm stable fields: name, student ID, email, college, major, class,
instructor, and teaching assistant.
- Confirm PDF naming rules and course version.
Private filled config files and private assets are gitignored.
Regular Generation
For each report, collect:
- Report type: prelab, postlab, short report, or long report.
- Full experiment title.
- Lab number/submission label for cover and filename only.
- Date fields.
- Manually entered raw data, or a scan transcription confirmed by the user.
- Teacher formula/data-processing sheet when it differs from the reference.
- Completed scanned data sheet for appendix when required.
Then:
- Select the experiment reference by title/alias.
- Prepare or confirm the data table before calculations.
- Generate the report
.tex from the golden template.
- Compile with XeLaTeX.
- Rename the PDF using
config/naming.yaml when available.
Update Mode
Use when stable material changes:
- cover template PDFs
- student profile
- instructor or TA
- output naming rule
- course/textbook version
- teacher formula template
- experiment reference card
Do not edit golden templates unless the update is specifically about template
maintenance.
Audit Mode
Use this to check a finished report or this skill:
- Identify report type, submission label, and actual title.
- Read the current official template first.
- Read the matching experiment reference and current teacher materials.
- Check raw-data traceability, formulas, units, significant figures, final
result, questions, cover, watermark, and appendix scans.
- Compile in a clean temporary folder when possible.
- Report current-template mismatches before style suggestions.
Report Types At A Glance
| Prelab | Postlab |
|---|
| Cover PDF | 01-Template for Prelab work-2026*.pdf | 02-Template for lab report-2026*.pdf |
| Cover insertion | \includepdf | \includepdf |
| Page style | empty | fancy, centered page numbers |
| Watermark | Physics Lab 2026 | Physics Labs 2026 |
| Main sections | Answers to Questions (20 points) | Abstract, Calculations/Results/Comments, Conclusions, Questions |
| Data appendix | Usually not needed | attach completed scanned data sheet when required |
| Identity | overlay on answer pages | usually contained in filled cover PDF |
Physics Experiments II may use prelab, short lab report, or long lab report
formats. Always inspect the current cover/template before assuming section
names or point values.
Title-Based Experiment Mapping
Known Physics Experiments I current mapping:
| Submission label | Actual experiment |
|---|
| lab1 | Measurement of Resistance by Ammeter-Voltmeter Method |
| lab2 | The Oscilloscope |
| lab3 | Newton's Rings |
| lab4 | Young's Modulus of Wire by Elongating |
| lab5 | Polarized Light |
Physics Experiments II historical labels conflict across years. Use
references/experiments/physics-experiments-ii-index.md and ask the user to
confirm the full title when labels disagree.
Data Handling
Manual input is the default. If the user uploads scans:
- Try direct text extraction when the PDF is text-based.
- Render scanned pages for visual inspection when extraction is empty.
- Transcribe conservatively.
- Show the table to the user for confirmation.
- Do not calculate until the user confirms unclear values.
If raw data is missing, generate only a skeleton report or blank data-entry
table. Do not generate a final report.
Formula Sources
Use formulas in this order:
- Current teacher formula/data-processing sheet.
- Matching experiment reference card.
- Current lab manual/textbook.
- Senior reports as examples only.
If a teacher-specific formula sheet is missing, use the reference card only when
it covers the experiment and warn that current teacher details may differ.
LaTeX Patterns To Preserve
Cover insertion:
\usepackage{pdfpages}
\includepdf[pages=1,pagecommand={\thispagestyle{empty}}]{\CoverPDF}
\setcounter{page}{1}
Postlab section headings:
\labsection{Calculations, Results, and Comments}{(Calculations, data tables and figures; 15 points)}
Data table pattern:
\datatable{DATA TABLE X-X}{(Purpose: ...)}
\begin{table}[H]
\centering
\small
\renewcommand{\arraystretch}{1.15}
\setlength{\tabcolsep}{3pt}
{\tablefont
\begin{tabular}{|...|}
\hline
... real data only ...
\hline
\end{tabular}
}
\caption*{Unit: ... $\Delta_{\mathrm{instr.}}=...$, $\Delta_{\mathrm{read}}=...$}
\end{table}
Scanned appendix:
\clearpage
\appendixhead
\begin{figure}[H]
\centering
\includegraphics[page=1,width=0.90\textwidth]{\DataPDF}
\caption*{Scanned data sheet page 1}
\end{figure}
Compilation
Use XeLaTeX:
bash scripts/build_report.sh file.tex "final_submission_name.pdf"
The script compiles twice, cleans auxiliary files, and optionally renames the
PDF. If XeLaTeX is unavailable, produce an Overleaf-ready project and say that
local compilation was not run.
When Materials Are Missing
| Missing material | Behavior |
|---|
| Cover template PDF | Generate .tex draft only and ask for the official cover |
| Raw data | Generate skeleton or data-entry table only |
| Formula template | Use reference card if available and warn about teacher-specific gaps |
| Questions | Leave placeholders or ask user; do not invent questions |
| Unclear scan | Draft transcription with caveats and ask for confirmation |
| Teacher signature | Attach completed signed scan; do not auto-place signatures |
Common Mistakes
| Mistake | Fix |
|---|
| Using lab number as the experiment key | Match by full title and aliases |
| Editing golden templates casually | Copy into a report file; leave templates untouched |
| Copying senior-report formulas blindly | Check current teacher template first |
| Relying on OCR for handwritten numbers | Ask the user to confirm every value |
| Fabricating missing data/questions | Stop and request the missing material |
| Compiling with pdfLaTeX | Use XeLaTeX |
| Referencing Desktop paths in LaTeX | Use relative paths inside the report folder |
| Forgetting scanned-data appendix | Attach completed data sheet when required |
| Treating old point values as current | Current cover/template wins |
Finish Checklist
Before saying a report is ready: