Skip to content

workflow for including code #28

@jlapeyre

Description

@jlapeyre

What is a good method for displaying code in a document and then using it in a juliaconsole block?
The following seems to work, but I suspect there is a simpler way.

\begin{example}
\begin{juliablock}
some code
\end{juliablock}
\caption{example code}
\end{example}

Then I copy the code in the juliablock by hand into a file called example_code.jl.
Then I do this:

\begin{juliaconsole}
include("example_code.jl"); nothing
... use code...
\end{juliaconsole}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions