Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix headers in LaTeXWriter #1716

Merged
merged 3 commits into from
Oct 20, 2021
Merged

Conversation

odow
Copy link
Collaborator

@odow odow commented Oct 19, 2021

The same general fix as #1417, with credit to @cserteGT3

Rather than testing the LaTeX page structure, I just added tests for the structure returned by files.

Closes #1416
Closes #1417

Here's the change from my MathOptInterface-inspired layout (jump-dev/MathOptInterface.jl#1638):

Old

Screen Shot 2021-10-20 at 11 53 04 AM

New

Screen Shot 2021-10-20 at 11 52 50 AM

The same general fix as JuliaDocs#1416, with credit to @cserteGT3
@fredrikekre
Copy link
Member

Can you comment on Mortens comment here: #1417 (comment) ? Is that relevant to this PR?

@odow
Copy link
Collaborator Author

odow commented Oct 20, 2021

Nested subparts work as expected.

import Documenter
Documenter.makedocs(
    sitename = "bug",
    pages = [
        "Introduction" => "index.md",
        "Tutorials" => [
            "tutorials/tutorial1.md",
            "Sub-part" => [
                "tutorials/tutorial2.md",
                "Release notes" => "release.md",
            ],
        ],
    ],
    format = Documenter.LaTeX(),
)

produces
image

"Tutorials" is the \part, "Sub-part" becomes the \chapter, and the level-1 header in tutorial2 becomes the \section

@odow
Copy link
Collaborator Author

odow commented Oct 20, 2021

I think this is more a bug-fix rather than a feature change.

The underlying problem is that "Introduction" => "index.md" gets inferred as a Pair{String,Any} because it an element of Vector{Pair{String,Any}}.

@fredrikekre
Copy link
Member

Okay great. Can you add a note in the changelog and update the version in the toml file?

@odow
Copy link
Collaborator Author

odow commented Oct 20, 2021

Yip will do.

@cserteGT3
Copy link
Contributor

@odow Thanks for taking care of this one! 🚀

@fredrikekre fredrikekre added Format: LaTeX Related to the LaTeX / PDF output Type: Bugfix labels Oct 20, 2021
CHANGELOG.md Show resolved Hide resolved
@fredrikekre fredrikekre merged commit 33d50fd into JuliaDocs:master Oct 20, 2021
@odow odow deleted the od/fix-headers branch September 28, 2022 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Format: LaTeX Related to the LaTeX / PDF output Type: Bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Level 2 headings become Chapters in pdf build if pages contains arrays of files
3 participants