JunoLab / Weave.jl

Scientific reports/literate programming for Julia
http://weavejl.mpastell.com
MIT License
821 stars 94 forks source link

Block Scope #435

Open CiaranOMara opened 2 years ago

CiaranOMara commented 2 years ago

It would be useful to dynamically change block labels or options, either via WEAVE_ARGS or by including the evaluation of code block option in the mod/sandbox scope. As far as I understand, evaluating dynamic code block options is not currently possible, but please correct me if I'm mistaken.

The use-case I have in mind is labelling output images.

```julia; label="$(WEAVE_ARGS.group)"
plot(
    x = rand(9),
    y = rand(9),
    Geom.point
    )

Evaluation the code block options in the mod/sandbox scope, may be a step towards evaluating blocks in loop.