`American "Acknowledgments" heading is misclassified and rendered after Introduction`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
Research direction
Start in section_processor.py and compare its acknowledgements mapping with the Acknowledgements? handling in section_validator.py. Add coverage for both heading spellings, then run the existing section-processing tests and confirm both map to acknowledgements and render in the template's back matter.
Written by the indexing model from the issue text.
Description
Bug
Using the section heading:
## Acknowledgments
causes the acknowledgments section to be treated as a custom/main-text section and rendered immediately after the Introduction rather than in the back matter.
This was reproduced with RxivMaker v1.24.3.
Expected behavior
Both common spellings should map to the standard acknowledgements section:
## Acknowledgements
## Acknowledgments
and should therefore be rendered in the normal back-matter location defined by the template.
Actual behavior
## Acknowledgments is not recognized by the section mapper, so it is treated as a custom section and inserted with the main content after the Introduction.
Changing the heading to:
## Acknowledgements
fixes the placement.
Cause
The validator already accepts both spellings, but section_processor.py currently maps acknowledgements using logic equivalent to:
elif "acknowledgement" in title_lower or "acknowledge" in title_lower:
return "acknowledgements"
The American spelling acknowledgments does not contain either acknowledgement or acknowledge, so it falls through as a custom section.
Suggested fix
Explicitly recognize both spellings in the section mapper, for example:
elif (
"acknowledgement" in title_lower
or "acknowledgment" in title_lower
or "acknowledge" in title_lower
):
return "acknowledgements"
It would also be useful to add a regression test confirming that both:
## Acknowledgements
and
## Acknowledgments
map to `acknowledgements` and render in the same back-matter position.
## Related inconsistency
`section_validator.py` already accepts both `Acknowledgements?` and `Acknowledgments?`, so the parser and validator currently disagree on valid headings.
If you want, I can also turn this into a small PR patch instead, which may be possible even if issue creation is blocked.
- Dominant language
- Python
- Stars
- 41
- Forks
- 6
- Avg merge
- 7m
- Merged PRs (30d)
- 6
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from HenriquesLab/rxiv-maker
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
HenriquesLab/rxiv-maker#324 · 1 comment ·
-
documentation enhancement good first issue help wanted
Difficulty 5/5 Over a week Newbie friendliness 25/100
HenriquesLab/rxiv-maker#169 · 1 comment ·
All issues in HenriquesLab/rxiv-maker
Similar issues
-
bug server
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sportsdataverse/sportsdataverse-py#641 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
googleapis/google-cloud-python#18532 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day