Generate a professional engineering PDF report from Excel force data using PyLaTeX and TikZ/pgfplots.
- Title page and table of contents
- Introduction section with embedded simply supported beam image
- Input table recreated using LaTeX tabular text (not an image)
- Shear Force Diagram (SFD) vector plot using TikZ/pgfplots
- Bending Moment Diagram (BMD) vector plot using TikZ/pgfplots
- Summary section defining shear force and bending moment
.
|-- assets/
| `-- Simply Supported Beam.png
|-- data/
| `-- Force Table.xlsx
|-- output/
| |-- engineering_report.pdf
| `-- engineering_report.tex
`-- src/
`-- generate_report.py
- Python 3.10+
- Python packages:
pandas,numpy,pylatex - A LaTeX distribution with
latexmk, TikZ, and pgfplots
Install Python dependencies:
pip install pandas numpy pylatexRun from repository root:
python src/generate_report.py --input "data/Force Table.xlsx" --output output/engineering_report.pdfArguments (optional):
--inputdefault:data/Force Table.xlsx--outputdefault:output/engineering_report.pdf--title,--subtitle,--author,--institution,--project-name,--report-datefor title-page customization--x-unit,--shear-unit,--moment-unitfor unit-consistent table/plot labels--clean-tempremoves.aux,.fls,.fdb_latexmk,.log,.toc,.out,.synctex.gzafter PDF generation
Example with bonus CLI options:
python src/generate_report.py \
--input "data/Force Table.xlsx" \
--output output/engineering_report.pdf \
--author "Your Name" \
--project-name "OSDAG Screening Assignment" \
--shear-unit "kN" \
--moment-unit "kN*m" \
--clean-tempThe Excel file must contain these headers:
xShear forceBending Moment
Rows must be numeric and x must be strictly increasing.
- Coordinates are generated programmatically and rendered as vector TikZ plots.
- Data checks include missing/non-numeric values and monotonic x positions.
- A data-quality note is added when abrupt shear changes are detected.
- Bonus features included: command-line customization, unit-consistent labeling, and optional build-artifact cleanup.