Skip to content

Commit

Permalink
Fix pdf generation in presence of hidden pages (#763)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored and mortenpi committed Jul 21, 2018
1 parent 76f14af commit 8790d38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/Writers/LaTeXWriter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,14 @@ function files!(out::Vector, v::Vector, depth)
return out
end

# Tuples come from `hide(page)` with either
# (visible, nothing, page, children) or
# (visible, page.first, pages.second, children)
function files!(out::Vector, v::Tuple, depth)
files!(out, v[2] == nothing ? v[3] : v[2] => v[3], depth)
files!(out, v[4], depth)
end

files!(out, s::AbstractString, depth) = push!(out, ("", s, depth))

function files!(out, p::Pair{S, T}, depth) where {S <: AbstractString, T <: AbstractString}
Expand Down
2 changes: 1 addition & 1 deletion test/formats/latex.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ doc = makedocs(
"man/doctests.md",
"man/hosting.md",
"man/latex.md",
"man/contributing.md",
hide("man/contributing.md"), # test hiding
],
"Library" => Any[
"Public" => "lib/public.md",
Expand Down

0 comments on commit 8790d38

Please sign in to comment.