Skip to content

Commit ff56691

Browse files
committed
Add missing bibtex and links
1 parent da38eee commit ff56691

41 files changed

Lines changed: 543 additions & 50 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/find-bib/SKILL.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
---
2+
name: find-bib
3+
description: Find or construct a BibTeX reference for an OptimizationProblems.jl meta file. Given a DOI, problem name, or free-form reference text, searches for the DOI online, fetches BibTeX from doi2bib.org, and formats the result as a Julia raw string ready to paste into src/Meta/<name>.jl.
4+
argument-hint: <problem-name | DOI | "free-form reference text">
5+
allowed-tools: [Read, Glob, Grep, WebSearch, WebFetch]
6+
---
7+
8+
# find-bib
9+
10+
Find or construct a BibTeX reference and format it as a Julia raw string for `src/Meta/<name>.jl`.
11+
12+
## Arguments
13+
14+
The user invoked this skill with: $ARGUMENTS
15+
16+
This can be:
17+
- A **problem name** from `src/Meta/` (e.g. `zangwil3`, `hs1`) — skill will read the file and extract context
18+
- A **DOI** (e.g. `10.1145/355934.355936` or `https://doi.org/10.1145/355934.355356`)
19+
- **Free-form reference text** (title, authors, journal, year — quoted or unquoted)
20+
- **Empty** — if no argument is given, ask the user to specify a problem name or reference
21+
22+
---
23+
24+
## Instructions
25+
26+
Follow these steps in order.
27+
28+
### Step 1 — Gather source material
29+
30+
If `$ARGUMENTS` looks like a problem name (no spaces, no slashes, exists as `src/Meta/<name>.jl`):
31+
- Read `src/Meta/$ARGUMENTS.jl`
32+
- Extract `:url`, `:notes`, `:origin_notes`, and the existing `:reference` field (may be empty)
33+
- Use this text as the source for Steps 2–4
34+
35+
Otherwise, treat `$ARGUMENTS` directly as a DOI or free-form reference text.
36+
37+
### Step 2 — Extract or find a DOI
38+
39+
1. Regex-scan all gathered text for a DOI pattern: `10\.\d{4,}/\S+`
40+
- DOIs appear in `:url`, `:notes`, `:origin_notes`, or in the argument itself
41+
2. If no DOI is found, run a **WebSearch** to locate one:
42+
- Try: `"<title or key terms>" "<first author>" DOI`
43+
- Try: `site:doi.org "<title or key terms>"`
44+
- Try CrossRef: `site:search.crossref.org "<title or key terms>"`
45+
3. Extract the DOI string from any search result that contains one.
46+
47+
### Step 3 — Fetch BibTeX
48+
49+
If a DOI was found (say `10.1145/355934.355936`), try these endpoints in order:
50+
51+
1. **CrossRef** (primary): `https://api.crossref.org/works/10.1145/355934.355936/transform/application/x-bibtex`
52+
2. **doi2bib.org** (fallback): `https://www.doi2bib.org/bib/10.1145/355934.355936`
53+
54+
The response is plain-text BibTeX — use it as-is (clean up whitespace if needed).
55+
If both fail or return an error, fall through to Step 4.
56+
57+
### Step 4 — Construct BibTeX manually (fallback)
58+
59+
If no DOI was found or doi2bib.org failed, construct the best possible BibTeX from all available information.
60+
61+
Choose the entry type:
62+
63+
| Type | Use when |
64+
|---|---|
65+
| `@article` | journal or conference paper |
66+
| `@book` | book or edited volume |
67+
| `@techreport` | institutional or technical report |
68+
| `@misc` | dataset, software, website, or unclear |
69+
70+
**Citation key format:** `Author1Author2YYYY` using last names only (e.g. `MoreGarbowHillstrom1981`, `HockSchittkowski1981`). For a single author: `AuthorYYYY`.
71+
72+
**LaTeX encoding for special characters:** `Mor{\'e}`, `{\'E}`, etc.
73+
74+
**Flag uncertain fields** with a trailing `% UNVERIFIED` comment on that line.
75+
76+
### Step 5 — Present the result
77+
78+
Show three things:
79+
80+
**1. Status line** — one sentence: whether the DOI was found, and from where.
81+
82+
**2. The BibTeX entry** in a code block:
83+
```bibtex
84+
@article{AuthorYear,
85+
author = {Last, First and Last2, First2},
86+
title = {Title of the Article},
87+
journal = {Journal Name},
88+
year = {YYYY},
89+
volume = {V},
90+
number = {N},
91+
pages = {P1--P2},
92+
doi = {10.xxxx/xxxxx}
93+
}
94+
```
95+
96+
**3. The Julia snippet** ready to paste into `src/Meta/<name>.jl`:
97+
```julia
98+
:reference => raw"""
99+
@article{AuthorYear,
100+
author = {Last, First and Last2, First2},
101+
title = {Title of the Article},
102+
journal = {Journal Name},
103+
year = {YYYY},
104+
volume = {V},
105+
number = {N},
106+
pages = {P1--P2},
107+
doi = {10.xxxx/xxxxx}
108+
}
109+
""",
110+
```
111+
112+
### Step 6 — Suggest next steps
113+
114+
- List any fields marked `% UNVERIFIED` that the user should check manually.
115+
- If a DOI was found and the file's `:url` field does not already contain it, suggest adding `https://doi.org/<DOI>` to `:url`.
116+
- If the problem name was given, name the exact file to edit: `src/Meta/<name>.jl`.
117+
118+
---
119+
120+
## BibTeX type templates (reference)
121+
122+
```bibtex
123+
@article{AuthorYear,
124+
author = {Last, First},
125+
title = {Title},
126+
journal = {Journal},
127+
year = {YYYY},
128+
volume = {V},
129+
number = {N},
130+
pages = {P1--P2},
131+
doi = {10.xxxx/xxxxx}
132+
}
133+
134+
@book{AuthorYear,
135+
author = {Last, First},
136+
title = {Book Title},
137+
publisher = {Publisher},
138+
address = {City},
139+
year = {YYYY}
140+
}
141+
142+
@techreport{AuthorYear,
143+
author = {Last, First},
144+
title = {Report Title},
145+
institution = {Institution},
146+
number = {Report Number},
147+
year = {YYYY}
148+
}
149+
150+
@misc{AuthorYear,
151+
author = {Last, First},
152+
title = {Title},
153+
year = {YYYY},
154+
howpublished = {\url{https://...}}
155+
}
156+
```

src/Meta/Dus2_1.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,15 @@ Problem found in
2727
http://www.dmi.usherb.ca/~dussault/ROP630E17/
2828
Jean_pierre Dussault
2929
""",
30-
:reference => raw"""""",
30+
:reference => raw"""
31+
@misc{Dussault2017,
32+
author = {Dussault, Jean-Pierre},
33+
title = {Optimization Test Problems},
34+
howpublished = {\url{http://www.dmi.usherb.ca/~dussault/ROP630E17/}},
35+
year = {2017},
36+
note = {Universit{\'e} de Sherbrooke}
37+
}
38+
""",
3139
:lib => "",
3240
)
3341
get_Dus2_1_nvar(; n::Integer = default_nvar, kwargs...) = 1

src/Meta/Dus2_3.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,15 @@ Problem found in
2727
http://www.dmi.usherb.ca/~dussault/ROP630E17/
2828
Jean_pierre Dussault
2929
""",
30-
:reference => raw"""""",
30+
:reference => raw"""
31+
@misc{Dussault2017,
32+
author = {Dussault, Jean-Pierre},
33+
title = {Optimization Test Problems},
34+
howpublished = {\url{http://www.dmi.usherb.ca/~dussault/ROP630E17/}},
35+
year = {2017},
36+
note = {Universit{\'e} de Sherbrooke}
37+
}
38+
""",
3139
:lib => "",
3240
)
3341
get_Dus2_3_nvar(; n::Integer = default_nvar, kwargs...) = 1

src/Meta/Dus2_9.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,15 @@ Problem found in
2727
http://www.dmi.usherb.ca/~dussault/ROP630E17/
2828
Jean_pierre Dussault
2929
""",
30-
:reference => raw"""""",
30+
:reference => raw"""
31+
@misc{Dussault2017,
32+
author = {Dussault, Jean-Pierre},
33+
title = {Optimization Test Problems},
34+
howpublished = {\url{http://www.dmi.usherb.ca/~dussault/ROP630E17/}},
35+
year = {2017},
36+
note = {Universit{\'e} de Sherbrooke}
37+
}
38+
""",
3139
:lib => "",
3240
)
3341
get_Dus2_9_nvar(; n::Integer = default_nvar, kwargs...) = 1

src/Meta/Duscube.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,15 @@ Problem found in
2727
http://www.dmi.usherb.ca/~dussault/ROP630E17/
2828
Jean_pierre Dussault
2929
""",
30-
:reference => raw"""""",
30+
:reference => raw"""
31+
@misc{Dussault2017,
32+
author = {Dussault, Jean-Pierre},
33+
title = {Optimization Test Problems},
34+
howpublished = {\url{http://www.dmi.usherb.ca/~dussault/ROP630E17/}},
35+
year = {2017},
36+
note = {Universit{\'e} de Sherbrooke}
37+
}
38+
""",
3139
:lib => "",
3240
)
3341
get_Duscube_nvar(; n::Integer = default_nvar, kwargs...) = 1

src/Meta/NZF1.jl

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ NZF1_meta = Dict(
1616
:is_feasible => true,
1717
:defined_everywhere => missing,
1818
:origin => :unknown,
19-
:url => "",
19+
:url => "https://doi.org/10.1080/10556780500137116",
2020
:notes => raw"""
2121
"Philippe Toint (private communication)"
2222
@@ -27,7 +27,22 @@ A. Montoison, Montreal, 05/2018.
2727
:origin_notes => raw"""
2828
2929
""",
30-
:reference => raw"""""",
30+
:reference => raw"""
31+
@article{Price2006,
32+
title = {Exploiting problem structure in pattern search methods for unconstrained optimization},
33+
volume = {21},
34+
ISSN = {1029-4937},
35+
url = {http://dx.doi.org/10.1080/10556780500137116},
36+
DOI = {10.1080/10556780500137116},
37+
number = {3},
38+
journal = {Optimization Methods and Software},
39+
publisher = {Informa UK Limited},
40+
author = {Price, C. J. and Toint, PH. L.},
41+
year = {2006},
42+
month = June,
43+
pages = {479–491}
44+
}
45+
""",
3146
:lib => "",
3247
)
3348
get_NZF1_nvar(; n::Integer = default_nvar, kwargs...) = 13 * max(2, div(n, 13))

src/Meta/Shpak1.jl

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Shpak1_meta = Dict(
1616
:is_feasible => true,
1717
:defined_everywhere => missing,
1818
:origin => :unknown,
19-
:url => "",
19+
:url => "http://www.math.md/publications/csjm/issues/v3-n2/7902/",
2020
:notes => raw"""
2121
first problem of
2222
Global optimization in one-dimensional case
@@ -30,7 +30,18 @@ Computer Science Journal of Moldova, vol.3, no.2(8), 1995
3030
:origin_notes => raw"""
3131
3232
""",
33-
:reference => raw"""""",
33+
:reference => raw"""
34+
@article{Shpak1995,
35+
author = {Shpak, Alexander},
36+
title = {Global Optimization in One-Dimensional Case Using Analytically Defined Derivatives of Objective Function},
37+
journal = {Computer Science Journal of Moldova},
38+
year = {1995},
39+
volume = {3},
40+
number = {2},
41+
pages = {168--184},
42+
url = {http://www.math.md/publications/csjm/issues/v3-n2/7902/}
43+
}
44+
""",
3445
:lib => "",
3546
)
3647
get_Shpak1_nvar(; n::Integer = default_nvar, kwargs...) = 1

src/Meta/Shpak2.jl

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Shpak2_meta = Dict(
1616
:is_feasible => true,
1717
:defined_everywhere => missing,
1818
:origin => :unknown,
19-
:url => "",
19+
:url => "http://www.math.md/publications/csjm/issues/v3-n2/7902/",
2020
:notes => raw"""
2121
Second problem of
2222
Global optimization in one-dimensional case
@@ -31,7 +31,18 @@ Second problem of
3131
:origin_notes => raw"""
3232
3333
""",
34-
:reference => raw"""""",
34+
:reference => raw"""
35+
@article{Shpak1995,
36+
author = {Shpak, Alexander},
37+
title = {Global Optimization in One-Dimensional Case Using Analytically Defined Derivatives of Objective Function},
38+
journal = {Computer Science Journal of Moldova},
39+
year = {1995},
40+
volume = {3},
41+
number = {2},
42+
pages = {168--184},
43+
url = {http://www.math.md/publications/csjm/issues/v3-n2/7902/}
44+
}
45+
""",
3546
:lib => "",
3647
)
3748
get_Shpak2_nvar(; n::Integer = default_nvar, kwargs...) = 1

src/Meta/Shpak3.jl

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Shpak3_meta = Dict(
1616
:is_feasible => true,
1717
:defined_everywhere => missing,
1818
:origin => :unknown,
19-
:url => "",
19+
:url => "http://www.math.md/publications/csjm/issues/v3-n2/7902/",
2020
:notes => raw"""
2121
third problem of
2222
Global optimization in one-dimensional case
@@ -31,7 +31,18 @@ Computer Science Journal of Moldova, vol.3, no.2(8), 1995
3131
:origin_notes => raw"""
3232
3333
""",
34-
:reference => raw"""""",
34+
:reference => raw"""
35+
@article{Shpak1995,
36+
author = {Shpak, Alexander},
37+
title = {Global Optimization in One-Dimensional Case Using Analytically Defined Derivatives of Objective Function},
38+
journal = {Computer Science Journal of Moldova},
39+
year = {1995},
40+
volume = {3},
41+
number = {2},
42+
pages = {168--184},
43+
url = {http://www.math.md/publications/csjm/issues/v3-n2/7902/}
44+
}
45+
""",
3546
:lib => "",
3647
)
3748
get_Shpak3_nvar(; n::Integer = default_nvar, kwargs...) = 1

src/Meta/Shpak4.jl

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Shpak4_meta = Dict(
1616
:is_feasible => true,
1717
:defined_everywhere => missing,
1818
:origin => :unknown,
19-
:url => "",
19+
:url => "http://www.math.md/publications/csjm/issues/v3-n2/7902/",
2020
:notes => raw"""
2121
4th problem of
2222
Global optimization in one-dimensional case
@@ -32,7 +32,18 @@ Shpak4_meta = Dict(
3232
:origin_notes => raw"""
3333
3434
""",
35-
:reference => raw"""""",
35+
:reference => raw"""
36+
@article{Shpak1995,
37+
author = {Shpak, Alexander},
38+
title = {Global Optimization in One-Dimensional Case Using Analytically Defined Derivatives of Objective Function},
39+
journal = {Computer Science Journal of Moldova},
40+
year = {1995},
41+
volume = {3},
42+
number = {2},
43+
pages = {168--184},
44+
url = {http://www.math.md/publications/csjm/issues/v3-n2/7902/}
45+
}
46+
""",
3647
:lib => "",
3748
)
3849
get_Shpak4_nvar(; n::Integer = default_nvar, kwargs...) = 1

0 commit comments

Comments
 (0)