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

FR: Provide environment #41

Closed
BeastyBlacksmith opened this issue Feb 9, 2022 · 4 comments
Closed

FR: Provide environment #41

BeastyBlacksmith opened this issue Feb 9, 2022 · 4 comments

Comments

@BeastyBlacksmith
Copy link

Would be nice to have a dedicated environment where one can put code examples in, that gets numbered and can be labeled and referenced

@BeastyBlacksmith BeastyBlacksmith changed the title FR: Provide FR: Provide environment Feb 9, 2022
@wg030
Copy link
Owner

wg030 commented Feb 9, 2022

Hmm, do you mean something like an open gallery so that people can see how the package displays code in practice?
If so, I am not sure if github would be the best platform to realize that altough I like this idea.

@BeastyBlacksmith
Copy link
Author

BeastyBlacksmith commented Feb 9, 2022

No, I mean a latex environment like figure or table
Actually I'd like to use \codefile with a numbered caption that I can reference somewhere else

@wg030
Copy link
Owner

wg030 commented Feb 9, 2022

😂 Looks like I completley missunderstood you.

We already have \jlinputlisting and it can (hopefully) be used in the same was as \lstinputlisting from the listings package.
Have your tried something like \jlinputlisting[caption={My caption}, label=mylabel]{codefile.jl}?
I think this should do the job

@BeastyBlacksmith
Copy link
Author

You are right, I confused myself here >.<

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants