differences between `jlcode`, `jlblock` and `juliaconsole`?
johnnychen94 opened this issue · 1 comments
Hi,
Thank you very much for providing such a powerful toolchain, I like the style of your book, and I'm planning to use this to write some tutorial materials for undergraduate students.
According to the README, I've successfully set the dependencies up. When I look into the template details, I find four environments defined:
jlcode
jlblock
juliaconsole
juliatest
I'm not sure if this is correct, but here's my understanding:
* codes in jlcode
are used only once and don't affect the following codes, and jlblock
do.
* jlblock
and jlconsole
only diff in the pygments colors.
* juliatest
acts the same as juliaconsole
except they're separated and fed into two pipelines.
Also, I don't quite get the difference between jlblock
and juliaconsole
.
Could you please explain the usage of these four environments?
Best
Johnny Chen
Hello Johnny,
Thank you for your interest! The first three console environments are provided by pythontex.
- jlcode: This environment encloses code that is executed but not typeset.
- jlblock: This environment encloses code that is both executed and typeset.
- juliaconsole: This environment mimics the julia console, in which each line is typeset and its output is printed, line-by-line
The juliatest
macro is totally ignored by pythontex and LaTeX. If you run the pull_julia_code.jl script, it extracts the contents of juliatest environments into an all_julia_tests.jl file for executing all test cases.