Scientific Paper Generator is a small command-line helper that turns a guided questionnaire into a standard LaTeX draft of a scientific paper. It asks for the core pieces of a manuscript (title, authors, abstract, introduction, methods, results, discussion, conclusions, and acknowledgments), places the answers in the right sections, and optionally compiles the result to PDF.
The goal is not to replace the author. SPG creates a structured first draft so that roughly three quarters of the paper is already organized; the remaining work is to connect the text naturally, add figures/tables/references, and check every scientific detail.
- Interactive questionnaire for a complete draft-paper structure.
draftpaper format that writesoutput/draft.tex.- Optional PDF generation when
pdflatexis installed. - JSON answer-file support for repeatable, non-interactive generation.
- Sample answer generation for testing or as a starting point.
Required:
- Python 3.10 or newer.
Optional, for PDF output:
- A LaTeX distribution that provides
pdflatex(for example TeX Live).
Create a paper interactively:
make draftor run the script directly:
python3 spg.py draftThe generated LaTeX file is saved as:
output/draft.tex
If pdflatex is available, SPG also creates:
output/draft.pdf
Create a sample answers file:
python3 spg.py --sample-answers output/sample_answers.jsonGenerate a draft from a JSON answers file without compiling a PDF:
python3 spg.py draft --answers output/sample_answers.json --tex-onlyGenerate a draft from a JSON answers file and compile the PDF if pdflatex is
installed:
python3 spg.py draft --answers output/sample_answers.jsonSPG currently supports one format: draft. Future improvements can add journal-
specific templates, figure/reference management, richer validation, and optional
Natural Language Processing support to improve the generated prose.
Suggestions and improvements are welcome.