From b72247ea1b5c5a32ec6aac4678e0ec5ca3c5553f Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Fri, 13 Nov 2026 08:17:58 -0600 Subject: [PATCH] DOC: Document how to cite publications in the AI agent guide Citations use Doxygen's \cite with entries in doxygen.bib (issue #3662, converted in #5149, #5211, #5215, and #5216); Insight Journal links use DOIs (#4796). Neither convention was written down, so a new citation followed the older insight-journal.org/browse form from #2129. --- AGENTS.md | 1 + Documentation/AI/conventions.md | 37 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 88e32e9c1d5..9e0330a696b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,6 +24,7 @@ rows labeled **Agent default** bind AI agents only. Agents set | Code style, formatting, naming | [enforced-code-style.md](./Documentation/AI/enforced-code-style.md) | | Writing or reviewing C++ code | [code-review-lessons.md](./Documentation/AI/code-review-lessons.md) | | Writing ITK C++ classes, CMake, Python wrapping | [conventions.md](./Documentation/AI/conventions.md) | +| Citing a publication in documentation | [conventions.md](./Documentation/AI/conventions.md) (Citing Publications) | | Avoiding compiler pitfalls and refactoring hazards | [compiler-cautions.md](./Documentation/AI/compiler-cautions.md) | | Creating a **DOC:** commit | [git-commits.md](./Documentation/AI/git-commits.md) | | Creating a **STYLE:** commit | [git-commits.md](./Documentation/AI/git-commits.md), [enforced-code-style.md](./Documentation/AI/enforced-code-style.md) | diff --git a/Documentation/AI/conventions.md b/Documentation/AI/conventions.md index 4e3be2b763d..a0f0b7837aa 100644 --- a/Documentation/AI/conventions.md +++ b/Documentation/AI/conventions.md @@ -102,6 +102,43 @@ required to keep CI green: **References:** PR #6032 (VTI factory wrapping fix), PR #6034 (SSIM filter add). +## Citing Publications + +Cite a publication in Doxygen documentation with `\cite ` and a +matching entry in `Documentation/Doxygen/doxygen.bib`, not with an +inline author, title, or URL (issue #3662). Do not copy the direct DOI +links that older headers still carry. + +- Keys for most papers are lowercase `lastnameYYYY`, with a letter + appended on a collision (`soille2004b`). Insight Journal papers + (`10.54294/...` DOIs) use `Author_Year`, with `_a`, `_b` on a + collision. +- Put the DOI in both `DOI` and `url` (`https://doi.org/`); Doxygen + links only the `url` field. +- The `bibtex-tidy` pre-commit hook keeps `doxygen.bib` in key order and + formats it; stage what it changes and commit again. +- Write accented letters as UTF-8 (`Zukić`), not LaTeX accents + (`Zuki\'{c}`): Doxygen drops LaTeX accents that have no HTML entity. + Spell an author the same way in source comments as in `doxygen.bib`. +- Keep `\cite` and its key on one line, and out of a `\par` heading + line; both produce Doxygen warnings (#5203, #5219). +- Every key must resolve: the `ITK.Doxygen.Warnings` check fails on any + Doxygen warning, including an unknown key. The comment spell check + reads keys from `doxygen.bib`, so keys need no `itk_dict.txt` entry. +- Where a URL is needed, use `https://doi.org/`. Handle links were + replaced in #2129, and `insight-journal.org/browse` links in #4796. + +**Agent default.** Search `doxygen.bib` for the DOI before adding an +entry, and reuse an existing key. Take a new entry from the DOI +(`curl -LH "Accept: application/x-bibtex" https://doi.org/`), set +its key and `url` as above, and let the hook format the rest. + +Example citation in a C++ comment: + +```cpp + * This implementation was taken from the Insight Journal paper \cite Lehmann_2007. +``` + ## Module File Layout ```