Limit output in Documenter when displaying a DataFrame

In a .md file for Documenter if I do the following,

````@example dataset_movies
     using DataFrames, RDatasets
     movies = dataset("ggplot2", "movies") ````

Then when building with makedocs(…) I get a file of size ~65MB. Which, when inspected the output is actually the whole dataset and not just the usual print that one would get the REPL or notebook. So, is this known? And how do I get just the smaller output?

for now I’m using first to limit the output to get a smaller output, here but it would be nice to not do that.

It is likely that @example macro sets :limit=false in the IO settings. This is something that maybe @mortenpi or @fredrikekre can confirm (as I see you are using Literate.jl) and maybe there is a setting allowing to change it.

You can probably check if this is a case by outputting rand(1000, 1000) and seeing if it gets cropped or not.

When we build DataFrames.jl documentation we do not use @example and we do get properly cropped output (but it looks a bit differently).

BTW: I also see that your output is not using fixed-width font, which probably is also something that could be fixed (and @mortenpi should know how :smile:).

I see, but maybe is not that (and not sure where to set the argument). If I do the rand(1000,1000) thing, the output looks ok.

I see that the main difference is that in this case the generated .md file quotes the output as in

```
1000×1000 Matrix{Float64}:
 0.345615   1.15629   0.215339    1.36107   …  0.396787    1.67245   1.46421
 1.73526    0.559616  1.16765     1.8466       1.75194     1.91477   1.99523
 0.945625   1.47853   1.5186      0.729305     0.868071    1.55946   0.342094
 1.94822    1.9187    1.66495     0.246893     0.736548    1.6934    1.3979
 0.679382   1.70972   1.9179      1.84543      0.754924    1.76885   1.19251
 0.736575   0.220556  0.747972    1.58713   …  1.45554     0.540514  0.990042
 0.116453   0.807285  0.00807545  0.810521     0.485176    1.53018   0.582547
 1.11338    0.823099  0.230622    0.761413     1.5602      1.38637   1.63436
 1.87819    1.49075   0.63936     0.862223     1.17052     1.12302   0.454598
 0.660834   0.123913  0.879262    0.396635     1.8467      1.38467   0.718561
 ⋮                                          ⋱                        
 1.94697    1.86702   1.48503     0.522106     0.959761    1.90535   1.7322
 1.51101    1.35389   0.719413    0.680911     0.317919    1.92128   0.405665
 0.0463142  1.6294    0.398713    1.99056      0.582115    0.299126  0.721452
 0.16254    0.223222  1.88253     0.359544     1.73818     0.120908  0.325782
 0.431466   1.85554   0.47358     1.17302   …  0.00594467  1.29382   0.210079
 1.24678    0.844529  0.899974    0.365235     0.532963    0.627109  1.76208
 0.38201    1.44423   1.28379     1.2877       0.610467    0.458963  0.332925
 1.99501    0.905117  0.416979    1.69932      1.43719     0.245553  1.42144
 0.174049   1.08074   0.70135     1.3436       0.0836711   1.91487   0.314635
```

but for the dataframe is in a div block.

<div>
all output
</div>

which now looks fine, with proper css formatting. But less would be better.