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

Option to display latex log on error #1697

Open
baggepinnen opened this issue Sep 15, 2021 · 3 comments
Open

Option to display latex log on error #1697

baggepinnen opened this issue Sep 15, 2021 · 3 comments
Labels
Format: LaTeX Related to the LaTeX / PDF output

Comments

@baggepinnen
Copy link
Contributor

When trying to get PDF from Latex working in a CI build environment it would be useful if the latex log was dumped to stdout
The current error message only points to a folder, but that folder is not going to be accessible after the build has failed.

"Logs and partial output can be found in $(Utilities.locrepr(logs))." exception = err

Something like

format = Documenter.LaTeX(show_log = true)

would be useful.

@baggepinnen
Copy link
Contributor Author

I've noticed that there is an undocumented option to set

ENV["DOCUMENTER_LATEX_DEBUG"] = "some/path"

to copy all latex files into a specified folder. This, together with artifacts could perhaps solve this issue?

@odow
Copy link
Collaborator

odow commented Oct 20, 2021

It's probably sufficient to just print the output of the LaTeXWriter.stderr file.

logs = cp(pwd(), mktempdir(); force=true)
@error "LaTeXWriter: failed to compile tex with docker. " *
"Logs and partial output can be found in $(Utilities.locrepr(logs))." exception = err

println(stdout, read("LaTeXWriter.stderr", String))

There's also the DOCUMENTER_VERBOSE flag to print everything into the CI log, but that can get pretty large for big projects.

verbose = "--verbose" in ARGS || get(ENV, "DOCUMENTER_VERBOSE", "false") == "true"

@odow odow added the Format: LaTeX Related to the LaTeX / PDF output label Oct 20, 2021
@DilumAluthge
Copy link
Contributor

I'd like to set up some kind of "display LaTeX logs" feature for https://github.com/JuliaLang/docs.julialang.org.

@fredrikekre @mortenpi What do you think is the best option for that repo?

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

No branches or pull requests

3 participants