Skip to content

Commit cef1167

Browse files
fredrikekreKristofferC
authored andcommitted
Update to Documenter 0.21 and prepare for PDF documentation builds. (#30339)
(cherry picked from commit 217d330)
1 parent acbb3cc commit cef1167

File tree

4 files changed

+30
-18
lines changed

4 files changed

+30
-18
lines changed

doc/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ help:
2020
@echo "To fix outdated doctests, use 'make <target> doctest=fix'"
2121

2222

23-
DOCUMENTER_OPTIONS := linkcheck=$(linkcheck) doctest=$(doctest) buildroot=$(call cygpath_w,$(BUILDROOT))
23+
DOCUMENTER_OPTIONS := linkcheck=$(linkcheck) doctest=$(doctest) buildroot=$(call cygpath_w,$(BUILDROOT)) \
24+
texplatform=$(texplatform)
2425

2526
UnicodeData.txt:
2627
$(JLDOWNLOAD) http://www.unicode.org/Public/9.0.0/ucd/UnicodeData.txt

doc/Manifest.toml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is machine-generated - editing it directly is not advised
2+
13
[[Base64]]
24
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
35

@@ -6,35 +8,34 @@ deps = ["Printf"]
68
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
79

810
[[Distributed]]
9-
deps = ["LinearAlgebra", "Random", "Serialization", "Sockets"]
11+
deps = ["Random", "Serialization", "Sockets"]
1012
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
1113

1214
[[DocStringExtensions]]
1315
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
14-
git-tree-sha1 = "a016e0bfe98a748c4488e2248c2ef4c67d6fdd35"
16+
git-tree-sha1 = "1df01539a1c952cef21f2d2d1c092c2bcf0177d7"
1517
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
16-
version = "0.5.0"
18+
version = "0.6.0"
1719

1820
[[Documenter]]
1921
deps = ["Base64", "DocStringExtensions", "InteractiveUtils", "LibGit2", "Logging", "Markdown", "Pkg", "REPL", "Random", "Test", "Unicode"]
20-
git-tree-sha1 = "9f2135e0e7ecb63f9c3ef73ea15a31d8cdb79bb7"
22+
git-tree-sha1 = "a6db1c69925cdc53aafb38caec4446be26e0c617"
2123
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
22-
version = "0.20.0"
24+
version = "0.21.0"
25+
26+
[[DocumenterLaTeX]]
27+
deps = ["Documenter", "Test"]
28+
git-tree-sha1 = "653299370be20ff580bccd707dc9f360c0852d7f"
29+
uuid = "cd674d7a-5f81-5cf3-af33-235ef1834b99"
30+
version = "0.2.0"
2331

2432
[[InteractiveUtils]]
25-
deps = ["LinearAlgebra", "Markdown"]
33+
deps = ["Markdown"]
2634
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
2735

2836
[[LibGit2]]
2937
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
3038

31-
[[Libdl]]
32-
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
33-
34-
[[LinearAlgebra]]
35-
deps = ["Libdl"]
36-
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
37-
3839
[[Logging]]
3940
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
4041

doc/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
DocumenterLaTeX = "cd674d7a-5f81-5cf3-af33-235ef1834b99"

doc/make.jl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pushfirst!(DEPOT_PATH, joinpath(@__DIR__, "deps"))
66
using Pkg
77
Pkg.instantiate()
88

9-
using Documenter
9+
using Documenter, DocumenterLaTeX
1010

1111
# Include the `build_sysimg` file.
1212

@@ -159,6 +159,17 @@ let r = r"buildroot=(.+)", i = findfirst(x -> occursin(r, x), ARGS)
159159
global const buildroot = i === nothing ? (@__DIR__) : first(match(r, ARGS[i]).captures)
160160
end
161161

162+
const format = if render_pdf
163+
LaTeX(
164+
platform = "texplatform=docker" in ARGS ? "docker" : "native"
165+
)
166+
else
167+
Documenter.HTML(
168+
prettyurls = ("deploy" in ARGS),
169+
canonical = ("deploy" in ARGS) ? "https://docs.julialang.org/en/v1/" : nothing,
170+
)
171+
end
172+
162173
makedocs(
163174
build = joinpath(buildroot, "doc", "_build", (render_pdf ? "pdf" : "html"), "en"),
164175
modules = [Base, Core, BuildSysImg, [Base.root_module(Base, stdlib.stdlib) for stdlib in STDLIB_DOCS]...],
@@ -168,13 +179,11 @@ makedocs(
168179
linkcheck_ignore = ["https://bugs.kde.org/show_bug.cgi?id=136779"], # fails to load from nanosoldier?
169180
strict = true,
170181
checkdocs = :none,
171-
format = render_pdf ? :latex : :html,
182+
format = format,
172183
sitename = "The Julia Language",
173184
authors = "The Julia Project",
174185
analytics = "UA-28835595-6",
175186
pages = PAGES,
176-
html_prettyurls = ("deploy" in ARGS),
177-
html_canonical = ("deploy" in ARGS) ? "https://docs.julialang.org/en/v1/" : nothing,
178187
assets = ["assets/julia-manual.css", ]
179188
)
180189

0 commit comments

Comments
 (0)