From dfd4ced0e4dc75446725f3fda37d27904731446b Mon Sep 17 00:00:00 2001 From: Morgan Williams Date: Fri, 1 Nov 2024 11:36:11 +1100 Subject: [PATCH] Update refcomp table with citations --- docs/source/conf.py | 28 +++++++++++++++++++++++++++- docs/source/docutils.conf | 2 ++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 docs/source/docutils.conf diff --git a/docs/source/conf.py b/docs/source/conf.py index 3cc4d3ec..b6541deb 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -313,11 +313,37 @@ def reset_mpl(gallery_conf, fname): comps = [] for r in reservoirs: comps += [n for n in refs if refs[n].reservoir == r] + refcomps = ( "
" - + "\n ".join(["
{}
{}
".format(n, refs[n]) for n in comps]) + + "\n ".join( + [ + "
{}
{}
".format( + n, + " ".join( + [str(refs[n])] + + ( + ["
Citation: " + refs[n].citation] + if refs[n].citation + else [] + ) + + ( + [ + "
doi: {}".format( + refs[n].doi, refs[n].doi + ) + ] + if refs[n].doi + else [] + ) + ), + ) + for n in comps + ] + ) + "
" ) +print(refcomps) rst_prolog = """ .. |br| raw:: html diff --git a/docs/source/docutils.conf b/docs/source/docutils.conf new file mode 100644 index 00000000..4b5a5a72 --- /dev/null +++ b/docs/source/docutils.conf @@ -0,0 +1,2 @@ +[parsers] +line_length_limit=1_000_000 \ No newline at end of file