Skip to content

Commit 36c7849

Browse files
authored
[docs] add DocumenterCitations (#336)
* [docs] add DocumenterCitations * Add Floudas * Fixes * Add missing files * Fix
1 parent 2efff04 commit 36c7849

File tree

13 files changed

+83
-65
lines changed

13 files changed

+83
-65
lines changed

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Cyclotomics = "da8f5974-afbb-4dc8-91d8-516d5257c83b"
77
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
88
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
99
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
10+
DocumenterCitations = "daee34ce-89f3-4625-b898-19384cb65244"
1011
Dualization = "191a621a-6537-11e9-281d-650236a99e60"
1112
DynamicPolynomials = "7c1d4256-1411-5781-91ec-d7bc3513ac07"
1213
GroupsCore = "d5909c97-4eac-4ecc-a3dc-fdd0858a4120"

docs/make.jl

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
using SumOfSquares
44
using Documenter, Literate
5+
import DocumenterCitations
56

67
const _TUTORIAL_DIR = joinpath(@__DIR__, "src", "tutorials")
78
const _OUTPUT_DIR = joinpath(@__DIR__, "src", "generated")
@@ -34,7 +35,10 @@ literate_directory.(_TUTORIAL_SUBDIR)
3435
makedocs(
3536
sitename = "SumOfSquares",
3637
# See https://github.com/JuliaDocs/Documenter.jl/issues/868
37-
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
38+
format = Documenter.HTML(
39+
prettyurls = get(ENV, "CI", nothing) == "true",
40+
assets = ["assets/citations.css"],
41+
),
3842
pages = [
3943
"Index" => "index.md",
4044
"Sum-of-Squares Programming" => "sumofsquares.md",
@@ -51,10 +55,17 @@ makedocs(
5155
),
5256
_TUTORIAL_SUBDIR,
5357
),
58+
"Bibliography" => "bibliography.md",
5459
],
5560
# The following ensures that we only include the docstrings from
5661
# this module for functions define in Base that we overwrite.
57-
modules = [SumOfSquares, PolyJuMP]
62+
modules = [SumOfSquares, PolyJuMP],
63+
plugins = [
64+
DocumenterCitations.CitationBibliography(
65+
joinpath(@__DIR__, "src", "references.bib");
66+
style = :authoryear,
67+
),
68+
],
5869
)
5970

6071
deploydocs(

docs/src/assets/citations.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.citation dl {
2+
display: grid;
3+
grid-template-columns: max-content auto; }
4+
.citation dt {
5+
grid-column-start: 1; }
6+
.citation dd {
7+
grid-column-start: 2;
8+
margin-bottom: 0.75em; }
9+
.citation ul {
10+
padding: 0 0 2.25em 0;
11+
margin: 0;
12+
list-style: none;}
13+
.citation ul li {
14+
text-indent: -2.25em;
15+
margin: 0.33em 0.5em 0.5em 2.25em;}
16+
.citation ol li {
17+
padding-left:0.75em;}

docs/src/bibliography.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Bibliography
2+
3+
```@bibliography
4+
```

docs/src/references.bib

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
@Book{Floudas1999,
3+
author = {Floudas, Christodoulos A. and Pardalos, Pãnos M. and Adjiman, Claire S. and Esposito, William R. and Gümüş, Zeynep H. and Harding, Stephen T. and Klepeis, John L. and Meyer, Clifford A. and Schweiger, Carl A.},
4+
publisher = {Springer US},
5+
title = {Handbook of Test Problems in Local and Global Optimization},
6+
year = {1999},
7+
isbn = {9781475730401},
8+
doi = {10.1007/978-1-4757-3040-1},
9+
issn = {1571-568X},
10+
journal = {Nonconvex Optimization and Its Applications},
11+
}
12+
13+
@Book{Lasserre2009,
14+
author = {Lasserre, Jean Bernard},
15+
publisher = {Imperial College Press},
16+
title = {Moments, Positive Polynomials and Their Applications},
17+
year = {2009},
18+
isbn = {9781848164468},
19+
month = oct,
20+
doi = {10.1142/p665},
21+
file = {:ebooks/Lasserre_2009_Moments, positive polynomials and their applications.pdf:PDF},
22+
issn = {2399-1593},
23+
journal = {Series on Optimization and Its Applications},
24+
}
25+
26+
@InBook{Laurent2008,
27+
author = {Laurent, Monique},
28+
pages = {157--270},
29+
publisher = {Springer New York},
30+
title = {Sums of Squares, Moment Matrices and Optimization Over Polynomials},
31+
year = {2008},
32+
isbn = {9780387096865},
33+
month = sep,
34+
booktitle = {The IMA Volumes in Mathematics and its Applications},
35+
doi = {10.1007/978-0-387-09686-5_7},
36+
issn = {0940-6573},
37+
}

docs/src/sumofsquares.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ These facts can be verified numerically using this package as detailed in the [m
5252
*Semidefinite Optimization and Convex Algebraic Geometry*.
5353
Society for Industrial and Applied Mathematics, **2012**.
5454

55-
[Las09] Lasserre, J. B.
56-
*Moments, positive polynomials and their applications*
57-
World Scientific, **2009**.
58-
5955
[Lau09] Laurent, M.
6056
*Sums of squares, moment matrices and optimization over polynomials*
6157
Emerging applications of algebraic geometry, Springer, **2009**, 157-270.

docs/src/tutorials/Extension/certificate.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@
66

77
# ## Introduction
88

9-
# Consider the polynomial optimization problem (a variation from [L09, Example 2.2]) of
9+
# Consider the polynomial optimization problem (a variation from [Lasserre2009; Example 2.2](@cite)) of
1010
# minimizing the polynomial $x^3 - x^2 + 2xy - y^2 + y^3$
1111
# over the polyhedron defined by the inequalities $x \ge 0, y \ge 0$ and $x + y \geq 1$.
1212

13-
# [L09] Lasserre, J. B.
14-
# *Moments, positive polynomials and their applications*.
15-
# World Scientific, **2009**.
16-
1713
using Test #src
1814
using DynamicPolynomials
1915
@polyvar x y

docs/src/tutorials/Polynomial Optimization/bilinear.jl

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,11 @@
22

33
#md # [![](https://mybinder.org/badge_logo.svg)](@__BINDER_ROOT_URL__/generated/Polynomial Optimization/bilinear.ipynb)
44
#md # [![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](@__NBVIEWER_ROOT_URL__/generated/Polynomial Optimization/bilinear.ipynb)
5-
# **Adapted from**: Section 3.1 of [F99] and Table 5.1 of [Las09]
6-
#
7-
# [F99] Floudas, Christodoulos A. et al.
8-
# *Handbook of Test Problems in Local and Global Optimization.*
9-
# Nonconvex Optimization and Its Applications (NOIA, volume 33).
10-
#
11-
# [Las09] Lasserre, J. B.
12-
# *Moments, positive polynomials and their applications*
13-
# World Scientific, **2009**.
5+
# **Adapted from**: [Floudas1999; Section 3.1](@cite) and [Lasserre2009; Table 5.1](@cite)
146

157
# ## Introduction
168

17-
# Consider the polynomial optimization problem [F99, Section 3.1]
9+
# Consider the polynomial optimization problem from [Floudas1999; Section 3.1](@cite).
1810

1911
using Test #src
2012
using DynamicPolynomials

docs/src/tutorials/Polynomial Optimization/ellipsoid.jl

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,11 @@
22

33
#md # [![](https://mybinder.org/badge_logo.svg)](@__BINDER_ROOT_URL__/generated/Polynomial Optimization/ellipsoid.ipynb)
44
#md # [![](https://img.shields.io/badge/show-nbviewer-579ACA.svg)](@__NBVIEWER_ROOT_URL__/generated/Polynomial Optimization/ellipsoid.ipynb)
5-
# **Adapted from**: Section 3.5 of [F99] and Table 5.1 of [Las09]
6-
#
7-
# [F99] Floudas, Christodoulos A. et al.
8-
# *Handbook of Test Problems in Local and Global Optimization.*
9-
# Nonconvex Optimization and Its Applications (NOIA, volume 33).
10-
#
11-
# [Las09] Lasserre, J. B.
12-
# *Moments, positive polynomials and their applications*
13-
# World Scientific, **2009**.
5+
# **Adapted from**: [Floudas1999; Section 3.5](@cite) and [Lasserre2009; Table 5.1](@cite)
146

157
# ## Introduction
168

17-
# Consider the polynomial optimization problem [F99, Section 3.5]
9+
# Consider the polynomial optimization problem from [Floudas1999; Section 3.5](@cite)
1810

1911
A = [
2012
0 0 1

docs/src/tutorials/Polynomial Optimization/goldstein_price.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ solution_summary(model)
4747
# The moment matrix is as follows, we can already see the global minimizer
4848
# `[0, -1]` from the entries `(2, 1)` and `(3, 1)`.
4949
# This heuristic way to obtain solutions to the polynomial optimization problem
50-
# is suggested in [L09, (6.15)].
51-
#
52-
# [L09] Laurent, Monique.
53-
# *Sums of squares, moment matrices and optimization over polynomials.*
54-
# Emerging applications of algebraic geometry (2009): 157-270.
50+
# is suggested in [Laurent2008; (6.15)](@cite).
5551

5652
ν = moment_matrix(con_ref)
5753

0 commit comments

Comments
 (0)