Skip to content

Commit 8c9f53c

Browse files
authored
Double use of citation name (#8504)
Based on #8320 and doxygen/doxygen#11157 creating an assertion for builds from scratch when a citation name is used multiple times.
2 parents 9601e96 + 47dfb09 commit 8c9f53c

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Documentation/doc/scripts/generate_how_to_cite.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,9 @@ def main():
278278
encoding="utf-8",
279279
)
280280
k = 2
281+
citeDic = {}
281282
for line in f:
283+
foundDouble=False
282284
match = pattern.match(line)
283285
if match:
284286
pkg = match.group(1)
@@ -304,6 +306,10 @@ def main():
304306
match = pattern_bib.match(pkg_line)
305307
if match:
306308
bib = match.group(1)
309+
if bib in citeDic:
310+
foundDouble=True
311+
else:
312+
citeDic[bib] = pkg
307313
continue
308314
assert len(bib) > 0, "Did you forget a \\cgalPkgBib{} in %r?" % filename
309315
assert len(authors) > 0, (
@@ -313,6 +319,11 @@ def main():
313319
"Did you forget the anchor in \\cgalPkgDescriptionBegin{} in %r?"
314320
% filename
315321
)
322+
assert not foundDouble, (
323+
"""Multiple use of citation name '{}' package '{}'
324+
first occurence package '{}'
325+
""".format(bib,pkg,citeDic[bib])
326+
)
316327
result_txt += gen_txt_entry(title, authors, bib, anchor, k)
317328
# convert title and author to bibtex format
318329
title = protect_upper_case(title)

Triangulation_on_hyperbolic_surface_2/doc/Triangulation_on_hyperbolic_surface_2/PackageDescription.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
\cgalPkgShortInfoBegin
2828
\cgalPkgSince{6.1}
2929
\cgalPkgDependsOn{\ref PkgCombinatorialMaps}
30-
\cgalPkgBib{cgal:y-t2}
30+
\cgalPkgBib{cgal:ddpt-thss}
3131
\cgalPkgLicense{\ref licensesGPL "GPL"}
3232
\cgalPkgDemo{2D Triangulations on Hyperbolic Surfaces,nofilefornow.zip}
3333
\cgalPkgShortInfoEnd

0 commit comments

Comments
 (0)