-
-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting from raw in code citations to bibtex (1/N). #5149
base: master
Are you sure you want to change the base?
Conversation
@dave3d is there a way to have the spellchecker ignore the bibliography tags which are used by the doxygen \cite command? Other than listing all the tags in the itk_dict.txt file. |
So do you mean don't spell check the word after the "\cite" command? I'll have a look at it. |
Yes. If there's the "\cite" directive ignore the next word which is the bibtex tag for the reference. Otherwise we'll have to add these exceptions for every reference because the tags are arbitrary and generally not "real" words. Thanks. Another option is to use the bibtexparser package. The spellchecker will have bibliography files that it then parses and auto-magically adds the tags to the ignore list. This is more specific than ignore all words that appear after the "\cite" directive which is particular to doxygen and may not be the right thing to do in a different setting. Some relevant code:
|
Already great progress! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great ❤️ 🚀. Thanks for doing this @zivy.
Two minor comments:
- Remove the dot from the subject message.
- Use the imperative mode.
Some comments that would require more work, as consistency would be important in this file:
- Use the same style for names, e.g. First Name Last Name and etc.
- Use brackets consistency for the field values. Use double brackets for all titles so that the cases are respected.
- Do not add whitespaces, indentations or add them systematically and consistently.
- Add first all articles, the books, then bookchapters, etc.: alphabetically.
- Sort the entries alphabetically within each group.
- Sort the field for each entry type the same way.
- Define and document the keys, e.g. lastnameYYYY and how collisions are resolved in the ITK documentation.
I know this is a lot of work, but the earlier is done, the easier it is to do for the upcoming cases as it sets a clear example.
Have you used some tool to gather this, if yes, please describe it in the commit message.
Is it still a draft or is it ready to be merged according to you @zivy ?
@zivy Very nice. Perhaps just bulk adding these citations to the itk dictionary would be the easiest. |
a7d2e97
to
031beda
Compare
@jhlegarreta I modified the commit message per your request (first two points). I don't have a style preference and all the variations found in the bib file were obtained from the online source of each of the publications, so there is inherent variability. I think this is ready for merge, but it won't pass the spellchecking due to the use of bibtex tags. Sadly this is a tedious manual process because the inline citations are free-form, sometimes incomplete and sometimes partially incorrect (detecting all of them by assuming the year will be listed so searching for what looks like a year in all *.h files). @hjmjohnson Will do a bulk dictionary update if @dave3d doesn't add this functionality in the next couple of days. For now I think this PR can be merged. |
Sadly this is a tedious manual process because the inline citations are free-form, sometimes incomplete and sometimes partially incorrect (detecting all of them by assuming the year will be listed so searching for what looks like a year in all *.h files). I know. I understand. Thanks for this work @zivy 💯. |
Sorry, closed inadvertently. |
@jhlegarreta It's been a long day. I am stepping away from the computer before I do more harm than good 😪 |
3d8e263
to
a251fe8
Compare
Some additional updates:
|
Simply great @zivy 💯. Thanks for doing that ! |
First PR out of N, converting raw inline citations with various styles to using a bibliography database and the doxygen cite command. Bibtex file was formatted using bibtex-tidy (https://github.com/FlamingTempura/bibtex-tidy). This tool can be used as a pre-commit hook but currently does not have an option for just performing compliance checking so not added to .pre-commit-config.yaml file.
First PR out of N, converting raw inline citations with various styles to using a bibliography database and the doxygen cite command. Will take multiple PRs to fully complete #3662.