Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to modify IOContext parameters in outputs #2207

Open
mortenpi opened this issue Aug 14, 2023 · 2 comments
Open

Document how to modify IOContext parameters in outputs #2207

mortenpi opened this issue Aug 14, 2023 · 2 comments
Labels
good first issue Indicates a good issue for first-time contributors Type: Documentation

Comments

@mortenpi
Copy link
Member

I.e. number of columns of the REPL output etc. -- would be good to have a short how-to guide for this in the docs. Related issues:

@fredrikekre: in reference to #1450, how do you imagine the user using DisplayAs.(set|with)context in Documenter? Explicitly call it in the at-example/repl block? I.e. something like this?

```@example
f() = collect('a':'z') # hide
f() |> DisplayAs.withcontext(...)
```
@mortenpi mortenpi added Type: Documentation good first issue Indicates a good issue for first-time contributors labels Aug 14, 2023
@asinghvi17
Copy link
Contributor

It would be great to have these as "keyword arguments" to the example/repl blocks as well - as well as maybe some defaults on the page level, settable via @meta. That way there is less of a barrier to entry - and people can easily opt in, versus googling to get to DisplayAs and then installing the package, making sure it's used (and hidden) in every example environment, etc.

@mortenpi
Copy link
Member Author

Yes, they should be keywords. We also got JuliaDocs/IOCapture.jl#26 now, so it should be possible to pass these on pretty easily.

One first step towards all that would be to harmonize the parsing on the at-block arguments. I would like there to be a single function that you pass the "language" attribute string (i.e. @example foo; x = 2, y = 3) and it returns a data structure that has the parsed arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Indicates a good issue for first-time contributors Type: Documentation
Projects
None yet
Development

No branches or pull requests

2 participants