sisl / tufte_algorithms_book

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

differences between `jlcode`, `jlblock` and `juliaconsole`? #1

Closed johnnychen94 closed 3 years ago

johnnychen94 commented 5 years ago

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:

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

tawheeler commented 5 years ago

Hello Johnny,

Thank you for your interest! The first three console environments are provided by pythontex.

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.