sisl / tufte_algorithms_book

A template for textbooks in the same style as Algorithms for Optimization
350 stars 66 forks source link

semicolon does not suppress output in juliaconsole #26

Open jlapeyre opened 3 years ago

jlapeyre commented 3 years ago

This:

\begin{juliaconsole}
rand(100);
\end{juliaconsole}

Prints 100 numbers in my latex document.

I noticed in the slides in your JuliaCon talk that a semicolon does suppress output. Any ideas what is going on here? I did find that this

\begin{juliaconsole}
rand(100); nothing
\end{juliaconsole}

Suppresses output. But, this is of course undesirable in a document.

mykelk commented 3 years ago

This was addressed in Weave.jl v0.10.4 https://github.com/JunoLab/Weave.jl/issues/386 Updating Weave should do the trick!

jlapeyre commented 3 years ago

I did add Weave@0.10.2 to get around this bug https://github.com/JunoLab/Weave.jl/issues/391, which hits me when I use Weave.jl v0.10.4. Maybe there is a way to solve both. Thanks for the lead.

jlapeyre commented 3 years ago

@mykelk : As a work around, I installed Weave.jl v0.9.4 Neither bug occurs now. I can compile and semicolons suppress output as expected. As an added benefit, the namespace noise mentioned in #27 is bit less ugly. Although I still need to track that down to eliminate it.

jlapeyre commented 3 years ago

It seems clear that these are bugs in Weave.jl, not this repo.