Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to include source without executing #13

Open
colinxs opened this issue Jan 10, 2020 · 1 comment
Open

Add ability to include source without executing #13

colinxs opened this issue Jan 10, 2020 · 1 comment
Assignees

Comments

@colinxs
Copy link
Contributor

colinxs commented Jan 10, 2020

Literate wraps code in Documenter @example blocks when documenter=true, so add the ability to generate normal Julia blocks for source we want included in generated markdown/scripts/notebooks but don't want to execute during build process.

@colinxs colinxs self-assigned this Jan 10, 2020
@colinxs
Copy link
Contributor Author

colinxs commented Jan 15, 2020

@klowrey Found a workaround

# Now just call the function to see the visualizer appear!
#md # ```julia
#md # viz_hopper_NPG()
#md # ```
#jl viz_hopper_NPG()
#nb viz_hopper_NPG()

#md # You should see the following:
#md # ![visualizer](visualize.png)

Which would leave just the line viz_hopper_NPG() in the generated Julia scripts and Jupyter notebooks, and a formatted, un-executed code block in the Markdown.

For reference, Literate.jl by default would take

viz_hopper_NPG()

and generate:

```@example
viz_hopper_NPG()
```

which gets executed when docs are built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant