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
Agreed, it's a duplicate, and I figured out how to use DisplayAs as a workaround:
# # Minimum Working Example## Print a long array:import DisplayAs # md
a =rand(1000)
#md a |> DisplayAs.withcontext(:limit => true) #hide# Print a long matrix:
A =rand(2, 1000)
#md A |> DisplayAs.withcontext(:limit => true) #hide
I might still look into whether this has a better solution, since I agree with #181 (comment) that the default output should emulate the REPL.
But the need is less pressing than I thought initially.
Consider the following
mwe_document.jl
:Executing this with
produces a
.md
file that shows all values of the array and matrix. This is both non-ideal to look at and produces a large file.In contrast, running the code in a terminal will show the array/matrix truncated, e.g.,
The number of printed elements depends on the size of the terminal (see
displaysize
in IOContext).A Jupyter notebook also truncates the output, apparently using the standard 80x24 terminal size.
Literate
should set theIOContext
during execution to mimic a standard terminal. The 80x24 size is probably a good default.I'll have a look to see if I can fix this.
The text was updated successfully, but these errors were encountered: