You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/creating_casts.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,10 +13,21 @@ cast"""
13
13
"""0.25
14
14
```
15
15
16
-
The `Cast` objects have a `show` method defined for HTML, allowing rich display with a local [asciinema-player](https://github.com/asciinema/asciinema-player), in Documenter, Pluto, jupyter, etc. For convenient use with Documenter in particular, see the `@cast` syntax in [Documenter usage](@ref). Note that this player needs the asciinema-player javascript and CSS assets to be loaded.
16
+
The `Cast` objects have a `show` method defined for HTML, allowing rich display with a local [asciinema-player](https://github.com/asciinema/asciinema-player), in Documenter, Pluto, jupyter, VSCode, etc. For convenient use with Documenter in particular, see the `@cast` syntax in [Documenter usage](@ref). Note that this player needs the asciinema-player javascript and CSS assets to be loaded (note that in VSCode, this happens automatically).
17
17
18
18
They can be saved to a `.cast` file using [`Asciicast.save`](@ref) or saved to a gif using [`Asciicast.save_gif`](@ref). See also [Markdown usage](@ref) for easier integration into READMEs and other documents.
19
19
20
+
Note also that `julia>` prompts may be prepended. In this case, existing outputs will be discarded, similarly to the REPL's prompt-pasting feature:
Copy file name to clipboardExpand all lines: docs/src/markdown_usage.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,12 +37,32 @@ Note that the attributes must be separated by spaces, not commas, as shown above
37
37
38
38
Here, the gifs are generated with [`agg`](https://github.com/asciinema/agg) (which is installed automatically using a JLL package), and the font-size parameter is passed there. Currently no other `agg` parameters are supported, but file an issue if you have a use for one.
39
39
40
+
### Named blocks
41
+
42
+
One can name blocks to continue execution after interrupting by some text. For example:
43
+
````markdown
44
+
Here we have `x`:
45
+
```julia {cast="true" name="ex1"}
46
+
x=2
47
+
48
+
```
49
+
50
+
Now we add 1:
51
+
```julia {cast="true" name="ex1"}
52
+
y = x+1
53
+
54
+
```
55
+
````
56
+
57
+
This works the same way as [named example blocks in Documenter](https://documenter.juliadocs.org/stable/man/syntax/#@example-block).
58
+
40
59
### All supported attributes
41
60
42
61
*`delay::Float64=0.25`. The amount of delay between line executions (to emulate typing time).
43
62
*`font-size::Int=28`. Used by `agg` when generating the gif.
44
63
*`height::Int`. Heuristically determined by default. Set to an integer to specify the number of lines.
45
64
*`allow_errors::Bool=false`. Whether or not [`cast_document`](@ref) (or [`cast_readme`](@ref)) should fail if exceptions are encountered during execution of the block.
65
+
*`name::String`. Optionally provide a name to allow running multiple examples in the same module, similar to named example blocks in Documenter.
0 commit comments