# How In Literate add a code chunk and do not run it

**URL:** <https://discourse.julialang.org/t/how-in-literate-add-a-code-chunk-and-do-not-run-it/109508>\
**Category:** Tooling\
**Tags:** literate\
**Created:** [January 31, 2024, 12:05pm UTC](https://discourse.julialang.org/t/how-in-literate-add-a-code-chunk-and-do-not-run-it/109508 "2024-01-31T12:05:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vladdez](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vladdez/32/45806_2.png) [@vladdez](https://discourse.julialang.org/u/vladdez)\
**Post date:** [January 31, 2024, 12:05pm UTC](https://discourse.julialang.org/t/how-in-literate-add-a-code-chunk-and-do-not-run-it/109508/1 "2024-01-31T12:05:45Z")

</div>

I need something like eval=FALSE from R Markdwon. Currently I have a documentation where chunk of code when run will change my environment producing errors.  
So I need it to look like a chunk of code but not run.

I use Literate.jl to transform .jl file into .md file.

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [January 31, 2024, 9:50pm UTC](https://discourse.julialang.org/t/how-in-literate-add-a-code-chunk-and-do-not-run-it/109508/2 "2024-01-31T21:50:13Z")

</div>

In Literste I use the trick when I don’t want the code to be run to change the “codefence” to `text` in `Literate.markdown`:

`codefence = "```text" => "```"`

> <https://github.com/sylvaticus/BetaML.jl/blob/master/docs/make.jl>

---

<div class="post-metadata">

**Author:** ![vladdez](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vladdez/32/45806_2.png) [@vladdez](https://discourse.julialang.org/u/vladdez)\
**Post date:** [February 1, 2024, 9:59am UTC](https://discourse.julialang.org/t/how-in-literate-add-a-code-chunk-and-do-not-run-it/109508/3 "2024-02-01T09:59:42Z")

</div>

But does this mean that all code is ignored?  
I need all the code to be executed except for one chunk of code.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [February 1, 2024, 11:42am UTC](https://discourse.julialang.org/t/how-in-literate-add-a-code-chunk-and-do-not-run-it/109508/4 "2024-02-01T11:42:20Z")

</div>

You can use a regular Markdown code snippet like this:

````julia
# ```julia
# <code goes here>
# ```

````

---

<div class="post-metadata">

**Author:** ![vladdez](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vladdez/32/45806_2.png) [@vladdez](https://discourse.julialang.org/u/vladdez)\
**Post date:** [February 1, 2024, 3:40pm UTC](https://discourse.julialang.org/t/how-in-literate-add-a-code-chunk-and-do-not-run-it/109508/5 "2024-02-01T15:40:55Z")

</div>

This formula worked! Thank you!

````julia
# ```julia
# begin
# using Pkg
# Pkg.activate("FOLDER_PATH")
# Pkg.resolve()
# end
# ```

````
