From fd62ec40090449ccd3ccc028d82783db2ae06410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Sch=C3=BCtt?= Date: Fri, 26 Jul 2024 10:38:52 +0200 Subject: [PATCH] Docs: Adopt Physical Review's citation style --- docs/generate_input_reference.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/generate_input_reference.py b/docs/generate_input_reference.py index 12bffb1fbb..9e6f718ea4 100755 --- a/docs/generate_input_reference.py +++ b/docs/generate_input_reference.py @@ -52,21 +52,19 @@ def build_bibliography(root: ET.Element, output_dir: Path) -> None: doi = get_text(r.find("DOI")) source = get_text(r.find("SOURCE")) volume = get_text(r.find("VOLUME")) - issue = get_text(r.find("ISSUE")) pages = get_text(r.find("PAGES")) year = get_text(r.find("YEAR")) title = get_text(r.find("TITLE")) ref = source - ref += f", {volume}" if volume else "" - ref += f" ({issue})" if volume and issue else "" + ref += f" **{volume}**" if volume else "" ref += f", {pages}" - ref += f" ({year})." if year else "" + ref += f" ({year})" if year else "" output += [f"({key})=", f"## {key}", ""] if doi: - output += [f"{authors}. **{title}.** _[{ref}](https://doi.org/{doi})_", ""] + output += [f"{authors}, _{title},_ [{ref}](https://doi.org/{doi}).", ""] else: - output += [f"{authors}. **{title}.** _{ref}_", ""] + output += [f"{authors}, _{title},_ {ref}.", ""] write_file(output_dir / "bibliography.md", "\n".join(output))