Skip to content

Commit

Permalink
Build documenters docs in as pdf in doc build stage.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Dec 7, 2018
1 parent 74cbcf5 commit cd1bea4
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ test/missingdocs/build/
test/nongit/build/
test/errors/build/
docs/build/
docs/pdf/build/
docs/site/
docs/Manifest.toml
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ julia:
- 1.0
- nightly

services:
- docker

notifications:
email: false

Expand All @@ -22,6 +25,10 @@ jobs:
julia: 1.0
os: linux
script:
# html
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- julia --project=docs/ docs/make.jl
# pdf
- julia --project=docs/pdf/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- julia --project=docs/pdf/ docs/pdf/make.jl
after_success: skip
93 changes: 93 additions & 0 deletions docs/pdf/Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[Distributed]]
deps = ["LinearAlgebra", "Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[DocStringExtensions]]
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "1df01539a1c952cef21f2d2d1c092c2bcf0177d7"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.6.0"

[[Documenter]]
deps = ["Base64", "DocStringExtensions", "InteractiveUtils", "LibGit2", "Logging", "Markdown", "REPL", "Random", "Test", "Unicode"]
path = "../.."
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.20.0+"

[[DocumenterLaTeX]]
deps = ["Documenter"]
git-tree-sha1 = "653299370be20ff580bccd707dc9f360c0852d7f"
repo-rev = "fe/ltx"
repo-url = "https://github.com/JuliaDocs/DocumenterLaTeX.jl.git"
uuid = "cd674d7a-5f81-5cf3-af33-235ef1834b99"
version = "0.1.0"

[[DocumenterTools]]
deps = ["Base64", "DocStringExtensions", "LibGit2", "Pkg", "Test"]
git-tree-sha1 = "f5803a9c2c23ff226e8eab2df7ac4c75e77a0d53"
uuid = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
version = "0.1.0"

[[InteractiveUtils]]
deps = ["LinearAlgebra", "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"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[UUIDs]]
deps = ["Random"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
5 changes: 5 additions & 0 deletions docs/pdf/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterLaTeX = "cd674d7a-5f81-5cf3-af33-235ef1834b99"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
23 changes: 10 additions & 13 deletions test/formats/latex.jl → docs/pdf/make.jl
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
module LaTeXFormatTests

using Documenter, DocumenterTools, DocumenterLaTeX
using Test

using Documenter

# Documenter package docs
@info("Building Documenter's docs with LaTeX.")
const Documenter_root = normpath(joinpath(dirname(@__FILE__), "..", "..", "docs"))
doc = makedocs(
debug = true,
root = Documenter_root,
modules = [Documenter],
root = joinpath(@__DIR__, ".."),
build = "pdf/build",
modules = [Documenter, DocumenterTools],
clean = false,
format = :latex,
format = LaTeX(engine = "docker"),
sitename = "Documenter.jl",
authors = "Michael Hatherly, Morten Piibeleht, and contributors.",
pages = [
Expand All @@ -23,7 +19,9 @@ doc = makedocs(
"man/syntax.md",
"man/doctests.md",
"man/latex.md",
"man/hosting.md",
hide("man/hosting.md", [
"man/hosting/walkthrough.md"
]),
"man/other-formats.md",
],
"Library" => Any[
Expand All @@ -49,10 +47,9 @@ doc = makedocs(
],
"contributing.md",
]
)
);

@testset "LaTeX" begin
@test isa(doc, Documenter.Documents.Document)
end

@test isfile(joinpath(doc.user.root, doc.user.build, doc.user.sitename * ".pdf"))
end
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ println("="^50)

# Documenter package docs with other formats.
include("formats/markdown.jl")
include("formats/latex.jl")
# include("formats/latex.jl")

# A simple build outside of a Git repository
include("nongit/tests.jl")
Expand Down

0 comments on commit cd1bea4

Please sign in to comment.