Documenter.jl
Documenter.jl copied to clipboard
[FR] New code block with displayed output but hidden code
Long code blocks are a pain to # hide
every line.
The easiest alternative I can think of is a hidden @setup <name>
block that defines a variable with the desired printed output result, then a following @example <name>
that calls the variables with # hide
and outputs it. But to do that several times for multiple code blocks is a pain.
P.S. Otherwise block options like Weave.jl
does.
I think the at-eval block does what you need?
Thanks @mortenpi
I couldn't find any info on an "at-eval" block in your link, do you know where I can find it?
I tried Google-searching it as well.
It links directly to it. If it doesn't jump to the right section somehow, then you can also click on "@eval
block" heading in the sidebar.
Ah, my bad, I misinterpreted "at-eval" thinking it was different from @eval
.
Thanks, but @eval
block doesn't hide every line of code in the block. I guess I'll stick to # hide
ing every line.
Thanks, but
@eval
block doesn't hide every line of code in the block.
With at-eval, the input code should always be completely removed.