Code Monkey home page Code Monkey logo

Comments (7)

newptcai avatar newptcai commented on June 20, 2024 2

I think the op is asking, how can you hide a whole code block? We can append #hide at the end of each line. But that seems to be a pretty tedious process.

from literate.jl.

fredrikekre avatar fredrikekre commented on June 20, 2024 1

Same syntax as Documenter:

$ cat test.jl 
# Executed, no output

x = 1
nothing #hide

# Executed, no output

y = 2;

# Executed but hidden

z = 3 #hide

#-

x + y + z

$ julia -e 'using Literate; Literate.markdown("test.jl"; execute=true)' 2>/dev/null

$ cat test.md 
```@meta
EditURL = "<unknown>/test.jl"
```

Executed, no output

````julia
x = 1
````

Executed, no output

````julia
y = 2;
````

Executed but hidden


````
3
````

````julia
x + y + z
````

````
6
````

from literate.jl.

abhinavnatarajan avatar abhinavnatarajan commented on June 20, 2024 1

I think it would helpful to have per-block code-fencing. Documenter.jl has support for @repl, @example, and @setup which are treated differently. It would be useful to indicate which code blocks to fence in what way. Appending # hide at the end of each line is tedious and also shows up in script output, which is ugly.

from literate.jl.

fredrikekre avatar fredrikekre commented on June 20, 2024

I believe all of this is supported already? I don't understand what you mean with the last part.

from literate.jl.

RoyiAvital avatar RoyiAvital commented on June 20, 2024

How can I make a chuck execute but without trying to capture its output?
How can I run something without displaying it in the output file?

I don't think you allow this granularity per chunk.

from literate.jl.

frankier avatar frankier commented on June 20, 2024

I am also interested in the possibility of having some blocks not execute e.g. if I have a document with some stuff at the beginning I would like to show, then some interactive (readlines()) parts later on, I might like to execute the earlier cells in a notebook, but leave the later ones unexecuted so as not to block the process.

from literate.jl.

RoyiAvital avatar RoyiAvital commented on June 20, 2024

I see there are changes since this.
Is there a block control in the pipepline?

from literate.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.