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

[FR] New way to customize LaTeX preamble #1746

Closed
inkydragon opened this issue Jan 8, 2022 · 2 comments · Fixed by #1788
Closed

[FR] New way to customize LaTeX preamble #1746

inkydragon opened this issue Jan 8, 2022 · 2 comments · Fixed by #1788
Labels
Format: LaTeX Related to the LaTeX / PDF output Type: Enhancement

Comments

@inkydragon
Copy link
Contributor

inkydragon commented Jan 8, 2022

People sometimes need to modify existing preamble sections to achieve some complex effects:

I customize the preamble by overriding the writeheader function.

Maybe Documenter could accept a keyword argument specifying the path to a custom preamble.tex and use its contents to replace the existing preamble.

Originally posted by @inkydragon in JuliaLang/julia#43698 (comment)

@mortenpi
Copy link
Member

I think it would be completely fine to add such an option to the LaTeX struct:

struct LaTeX <: Documenter.Writer
platform::String
function LaTeX(; platform = "native")
platform ("native", "docker", "none") || throw(ArgumentError("unknown platform: $platform"))
return new(platform)
end
end

@inkydragon
Copy link
Contributor Author

Do we need to add a new platform?

Maybe we just need to add a new optional input file, like custom.sty.

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: Enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants