From e7187f6d0fc8b935482851b5a73444ca27298537 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Tue, 11 Dec 2018 16:29:41 +0100 Subject: [PATCH] Update to Documenter 0.21 and prepare for PDF documentation builds. (#30339) (cherry picked from commit 217d330296debe0567bb07addabf66b00602e325) --- doc/Makefile | 3 ++- doc/Manifest.toml | 27 ++++++++++++++------------- doc/Project.toml | 1 + doc/make.jl | 17 +++++++++++++---- 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 3d0773342fc1d..99e60ee665c1f 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -20,7 +20,8 @@ help: @echo "To fix outdated doctests, use 'make doctest=fix'" -DOCUMENTER_OPTIONS := linkcheck=$(linkcheck) doctest=$(doctest) buildroot=$(call cygpath_w,$(BUILDROOT)) +DOCUMENTER_OPTIONS := linkcheck=$(linkcheck) doctest=$(doctest) buildroot=$(call cygpath_w,$(BUILDROOT)) \ + texplatform=$(texplatform) UnicodeData.txt: $(JLDOWNLOAD) http://www.unicode.org/Public/9.0.0/ucd/UnicodeData.txt diff --git a/doc/Manifest.toml b/doc/Manifest.toml index 609d04b817e2b..5cbd6d684b7ed 100644 --- a/doc/Manifest.toml +++ b/doc/Manifest.toml @@ -1,3 +1,5 @@ +# This file is machine-generated - editing it directly is not advised + [[Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" @@ -6,35 +8,34 @@ deps = ["Printf"] uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" [[Distributed]] -deps = ["LinearAlgebra", "Random", "Serialization", "Sockets"] +deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[DocStringExtensions]] deps = ["LibGit2", "Markdown", "Pkg", "Test"] -git-tree-sha1 = "a016e0bfe98a748c4488e2248c2ef4c67d6fdd35" +git-tree-sha1 = "1df01539a1c952cef21f2d2d1c092c2bcf0177d7" uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.5.0" +version = "0.6.0" [[Documenter]] deps = ["Base64", "DocStringExtensions", "InteractiveUtils", "LibGit2", "Logging", "Markdown", "Pkg", "REPL", "Random", "Test", "Unicode"] -git-tree-sha1 = "9f2135e0e7ecb63f9c3ef73ea15a31d8cdb79bb7" +git-tree-sha1 = "a6db1c69925cdc53aafb38caec4446be26e0c617" uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -version = "0.20.0" +version = "0.21.0" + +[[DocumenterLaTeX]] +deps = ["Documenter", "Test"] +git-tree-sha1 = "653299370be20ff580bccd707dc9f360c0852d7f" +uuid = "cd674d7a-5f81-5cf3-af33-235ef1834b99" +version = "0.2.0" [[InteractiveUtils]] -deps = ["LinearAlgebra", "Markdown"] +deps = ["Markdown"] uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[LibGit2]] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" -[[Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[LinearAlgebra]] -deps = ["Libdl"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - [[Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" diff --git a/doc/Project.toml b/doc/Project.toml index dfa65cd107d06..c09e74d6533a4 100644 --- a/doc/Project.toml +++ b/doc/Project.toml @@ -1,2 +1,3 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +DocumenterLaTeX = "cd674d7a-5f81-5cf3-af33-235ef1834b99" diff --git a/doc/make.jl b/doc/make.jl index 7a7e8cf1953dd..404003ddc4d23 100644 --- a/doc/make.jl +++ b/doc/make.jl @@ -6,7 +6,7 @@ pushfirst!(DEPOT_PATH, joinpath(@__DIR__, "deps")) using Pkg Pkg.instantiate() -using Documenter +using Documenter, DocumenterLaTeX # Include the `build_sysimg` file. @@ -153,6 +153,17 @@ let r = r"buildroot=(.+)", i = findfirst(x -> occursin(r, x), ARGS) global const buildroot = i === nothing ? (@__DIR__) : first(match(r, ARGS[i]).captures) end +const format = if render_pdf + LaTeX( + platform = "texplatform=docker" in ARGS ? "docker" : "native" + ) +else + Documenter.HTML( + prettyurls = ("deploy" in ARGS), + canonical = ("deploy" in ARGS) ? "https://docs.julialang.org/en/v1/" : nothing, + ) +end + makedocs( build = joinpath(buildroot, "doc", "_build", (render_pdf ? "pdf" : "html"), "en"), modules = [Base, Core, BuildSysImg, [Base.root_module(Base, stdlib.stdlib) for stdlib in STDLIB_DOCS]...], @@ -162,13 +173,11 @@ makedocs( linkcheck_ignore = ["https://bugs.kde.org/show_bug.cgi?id=136779"], # fails to load from nanosoldier? strict = true, checkdocs = :none, - format = render_pdf ? :latex : :html, + format = format, sitename = "The Julia Language", authors = "The Julia Project", analytics = "UA-28835595-6", pages = PAGES, - html_prettyurls = ("deploy" in ARGS), - html_canonical = ("deploy" in ARGS) ? "https://docs.julialang.org/en/v1/" : nothing, assets = ["assets/julia-manual.css", ] )