fix: conf.py file to automate PDF generation from .rst files, including those in subdirectories
This PR updates the conf.py
file to ensure that LaTeX builds (e.g., make latexpdf
) generate PDFs for all proposal .rst
files, including those in subdirectories like proposals/2025/index/
. Previously, only top-level proposals (e.g., proposals/template.rst
) were processed, omitting nested files.
Changes:
- Updated the proposal detection logic to use
os.walk()
for scanning all.rst
files within theproposals/
directory. - Modified
latex_documents
to generate.tex
files for each proposal while preserving the full source path. Filenames now follow{basename}.tex
, ensuringsahil_jaiswal.rst
results insahil_jaiswal.pdf
. - Ensured
latex_elements
and other configurations apply consistently to all generated PDFs.
Result:
- Running
make latexpdf
now produces PDFs for all proposals, such astemplate.pdf
andsahil_jaiswal.pdf
. - Ensures automatic inclusion of newly added proposal files without manual changes to
conf.py
.
Testing:
- Ran
make clean
&&make latexpdf
locally and verified output. - Checked
_build/latex/
directory to confirm that PDFs (e.g.,sahil_jaiswal.pdf
) are generated correctly. - Tested for
make html
to confirm HTML files are also generated. - Validated content inside
sahil_jaiswal.pdf
to ensure it matchesproposals/2025/Sahil Jaiswal/sahil_jaiswal.rst
.
Attachments:
- Screenshot of
_build/latex/
directory showing generated PDFs. - Screenshot of
_build/html/
directory showing generated HTML files. - Sample page from
sahil_jaiswal.pdf
to confirm content. - Snapshot from
sahil_jaiswal.html
to confirm content.
This resolves the issue where proposals inside subdirectories were not included in the LaTeX output. It also eliminates the need for manual build commands for individual files.
@lorforlinux Sir can you please review and let me know if further changes are needed ?