4,995 reputation
821
bio website
location
age
visits member for 2 years, 8 months
seen 3 mins ago

2d
revised Break Lines in minted environment
Mentioned breaklines option explicitly, to increase clarity
2d
comment Break Lines in minted environment
@SpmP I just updated the linked question, so it should be fixed as soon as it is reviewed. I also updated the answer above to mention breaklines explicitly.
Sep
25
comment Is there any way to interact with the shell but keep the same session open?
@Jubobs It should be compatible with most shells. All it relies on is the existence of cd and echo, plus >&2 as a way to echo to stderr. To actually use it with other shells, though, you would need to specify the shell. Running the PythonTeX script with the command-line option --interpreter bash:zsh should work (that allows you to set which executable is actually called). Or it would be very simple to create a set of environments for other shells, for example, zshblock etc. That way, you could access multiple shells in the same document.
Sep
25
awarded  Nice Answer
Sep
24
answered Is there any way to interact with the shell but keep the same session open?
Sep
22
comment Is there any way to interact with the shell but keep the same session open?
It should be possible to add shell support to pythontex...I already added Ruby, Julia, and Octave support with minimal modifications. I can see if it's possible.
Sep
12
comment Break Lines in minted environment
@Thanos If you compare against your example, line 9 (wrapped) no longer begins with a quotation mark " from the string on the previous line being broken. The image you linked to shows the downside of this approach. If tokens can't be broken, then a long token like a long comment will go off into the margin. I have some ideas about possible ways to allow breaking tokens while trying to keep tokens intact, but nothing I can implement and try quickly.
Sep
12
answered Break Lines in minted environment
Sep
12
comment Macro output as an input in subsequent pythontex command/environement?
@KlemenD It might be best to ask a new question with more detail about what your exercises look like and what types of calculations are needed. If you asked a new question with an example of the sort of nesting you want, or at least an example of the output you are trying to create, it would be easier to find a solution.
Sep
11
comment Break Lines in minted environment
The bgcolor option provides a background color but will not break across pages. If you need breaks across pages, you should always use a proper framing package like mdframed or tcolorbox. In you final example, code runs off the page because breaklines wasn't used. I agree that the location of automatic breaks can be inconvenient. Unfortunately, to get really good automatic breaks, you probably need a language-specific tool. I believe I have found a way to prevent breaks in the middle of strings (line 9 in your first example). Solution coming soon.
Sep
9
comment Break Lines in minted environment
Did you download the latest minted.sty (not the release download)? Are you using breaklines as an optional argument for the minted environment?
Sep
9
comment Break Lines in minted environment
If you download the minted.sty from GitHub and put it in the same directory as your document, it will be used for that document. That would be a good way to check and see if it works for you. Longer term, you could install in texmf-local (see this). Or you could replace the minted.sty in /texmf-dist/tex/latex/minted (though that might be frowned on, since it puts texmf-dist out of sync with the repository).
Sep
9
comment Break Lines in minted environment
The development version of minted has a breaklines option inspired by the answer you referenced. It seems to work fine with your example. The development version also has some options for customizing the break symbol and indent.
Sep
4
answered Macro output as an input in subsequent pythontex command/environement?
Sep
1
comment “missing autoprint content” error in PythonTeX
My guess is that you had a configuration issue with Anaconda. You probably needed to set assoc and ftype. See the Python docs for how to do this. You would just change their example to use Anaconda instead.
Sep
1
comment “missing autoprint content” error in PythonTeX
There won't be a folder unless pythontex can run successfully once. So you can ignore that suggestion. If things are installed correctly, I don't know why pythontex test.tex would cause errors. If running pythontex --version works, and you are in the same directory as test.tex, everything should be fine.
Sep
1
comment “missing autoprint content” error in PythonTeX
How did you install? Did you use the installation script? Or manually copy files?
Sep
1
comment “missing autoprint content” error in PythonTeX
Having the .bat file in miktex/bin is what you want, since that should be on your PATH (although if the .bat file specifies the full path, it will work elsewhere). If you are only using Anaconda Python, you might uninstall the other version. Otherwise, you could install Pygments for the other version. Or you could edit the .bat file to specify the version of Python that should be used. Using the run button in your editor for running LaTeX should be fine.
Aug
31
comment “missing autoprint content” error in PythonTeX
This works fine for me when using pdflatex test.tex, then pythontex test.tex, then pdflatex test.tex. You might make sure that the PDF is being refreshed after the second compile; I've seen a case where there was a delay for some reason. If that isn't it, can you delete the output folder pythontex-files-test, run pythontex again, and post the output message? Also, what commands are you using for the LaTeX compiling?
Aug
23
comment pythontex - How to choose the version of Python used?
@projetmbc I've added a note about --interpreter to the quickstart for the next release.