-
Notifications
You must be signed in to change notification settings - Fork 101
Obtaining the output of an expression when usefamily=jl #51
8000New 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
Comments
Currently, only Python has console emulation. It is still possible to show Julia code with its output; it just won't look like a console. With the \documentclass{article}
\usepackage[usefamily=jl]{pythontex}
\begin{document}
\begin{jlblock}
a = 1
b = 2
println("\$a + b = ", a+b, "\$")
\end{jlblock}
\printpythontex
\end{document} will give If you want the output verbatim, then just use |
Thanks for the reply. That's more-or-less what I had expected. I'll check on the Julia lists to see if there is a way of resetting the REPL to provide auto-printing of results as in the interactive REPL. Then all I need to do is to include the |
If you find a way to auto-print things, let me know, and I may be able to add that to the documentation or incorporate it somehow. I don't use Julia much myself at present, so the Julia features are still somewhat basic. Also, interactive REPL support could be added in the future. I would just need version of the REPL that reads commands a line at a time from a file instead of from user input. |
I have a question on the julia-users list about this https://groups.google.com/forum/#!topic/julia-users/VO0lPBMWxN4 I'm sure it will be possible, I'm just not exactly sure how to do it. |
The doctest mechanism of the official documentation package seems to just walk through the lines and use |
@mlhetland The last release added preliminary Julia console support (#98). |
Ah, brilliant! |
I am using PythonTeX to create a document with Julia code. I would like to include the value of the expression as well as the expression itself. A
jlblock
environment evaluates the expression and prints the expression but not the value. I don't see any Julia equivalent of the pycon family.Can anyone tell me how to accomplish this?
The text was updated successfully, but these errors were encountered: