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

Weave inserts sandbox module #27

Open
jlapeyre opened this issue Nov 29, 2020 · 2 comments
Open

Weave inserts sandbox module #27

jlapeyre opened this issue Nov 29, 2020 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@jlapeyre
Copy link

Weave creates a kind of gensym module or namespace that pollutes the rendered latex

\begin{juliaconsole}
struct A end
A()
\end{juliaconsole}

Renders as this:

julia> struct A end
julia> A()
Main.##WeaveSandBox#245.A()

Did you encounter this in your book? Is there a way around it?

@tawheeler
Copy link
Collaborator

tawheeler commented Nov 29, 2020

I don't know that I've tried printing a function in a juliaconsole.
I'm not familiar with the workings of the weave sandbox, but maybe you can overwrite Base.show(io::IO, ::MIME"image/svg+xml, f::Main.##WeaveSandBox#245.A())" or similar?

Might also be worth asking a question on the Weave package github.

@tawheeler tawheeler added the help wanted Extra attention is needed label Nov 29, 2020
@jlapeyre
Copy link
Author

jlapeyre commented Dec 2, 2020

Well, this happens with any identifier: variable, function, whatever. It is qualified because the execution is in a kind of temporary namespace. I was hoping maybe you had seen it. I'll look into Weave. How to configure it in a way that works with building the book might be a chore. I will post here if I solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants