Reputation
6,797
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
12 26
Newest
 Revival
Impact
~113k people reached

  • 0 posts edited
  • 1 helpful flag
  • 128 votes cast
1d
comment Beamer and Pause with PythonTex
@cjorssen Most of this could be put into the beginning of a custom environment, which would open a Beamer frame after customizing pyconsole and the Beamer internals. The problem is that in the current approach, all of the PythonTeX counters have to exist before the frame, and the session is assumed to be default. So you could have an environment, plus a couple of extra lines in the preamble. That preamble code could be wrapped into an environment with some modifications (check if counter exists), but I feel like there should be a better way.
Aug
24
comment Minted. Code highlighting right margin
minted uses fancyvrb internally, so fancyvrb's options xleftmargin, xrightmargin, and resetmargins are available for working with margins.
Aug
18
comment JavaScript ES6 Code highlighting
minted uses Pygments to do the actual highlighting. So you could create a custom Pygments lexer, perhaps based on the existing JavaScript lexer. An ES6 lexer has been requested, but it doesn't look like any work on implementation has been done yet.
Aug
14
comment Version dependent package conflict
For future reference, the lineno package is used by minted to manage line numbers and line continuation symbols for lines that have automatic line breaks. It's only used on the lines that actually break.
Aug
6
awarded  Revival
Aug
5
answered Build errors while using minted package
Aug
5
comment How to use pythontex.py from TeXnicCenter?
I should have clarified that the installation script I meant was pythontex_install.py, which can be used after generating pythontex.sty to move files automatically. At this point, running pdflatex test.tex, pythontex test.tex, and finally pdflatex test.tex should work. If pythontex is giving any error messages, please add those to your question. Also, knowing what is in test.tex might help.
Aug
4
comment How to use pythontex.py from TeXnicCenter?
Using a postprocessor would work. It should add only a tiny amount of overhead compared to creating a special profile or keyboard shortcut for running pythontex, and then manually running pythontex as needed. If you used the pythontex installation script, there should be a batch file pythontex.bat under C:\MiKTeX 2.9\miktex\bin that you can use to run pythontex. Otherwise, you could run pythontex.py directly.
Aug
3
answered LateX minted code in two pages
Jul
25
comment Pythontex don't work ? why?
@fred62 It looks like you may have two installations of pythontex with different versions. You might search under c:/users/frederic/texmf and remove all folders called pythontex. Then you could use the TeX Live package manager to uninstall, and then reinstall, its version of pythontex. I would expect that to work, but that assumes you have sufficient admin privileges. If not, you might need to install everything under c:/users/frederic/texmf, and then make sure that it is that version of pythontex that is called when you run the pythontex command.
Jul
7
answered Pythontex and the g-brief address field
Jun
28
comment Break lines at any character in minted
@PieterStroobants GitHub issue for discussion.
Jun
26
comment Syntax highlighting code fragments
@Xophmeister The best thing you can do for compilation times (if you haven't already) is to use the last release of minted (2.0), which caches output and thus removes most of the package overhead on later compiles. Using a single file for lots of snippets would save some caching checksum calculations, which might be noticeable under XeTeX. But using a single longer file also means that the entire thing would be read in each time, with all of the irrelevant lines thrown away. And it would prevent effective caching; any change would cause everything to be highlighted again.
Jun
26
comment Break lines at any character in minted
@PieterStroobants The code based on this will be on GitHub within the next day or so. This is probably the last thing before I release the next version, so the next version will be out within a week or so, once there has been time to do a little more testing. I am adding more customization for the version that is going on GitHub...if you have suggestions once the code is up, please open an issue there.
Jun
25
answered Syntax highlighting code fragments
Jun
25
answered Break lines at any character in minted
Jun
12
comment Showing nice indentation of Python code
pythontex uses Pygments to do the highlighting. In principle, it would be possible to post-process the Pygments output based on indentation level, and add in the lines. However, that might get complicated, and might fail for expressions that break across multiple lines unless you were really careful. The "proper" way to do this would probably be in Pygments, but even there, I'm not sure if the (default) lexer has enough information to do this in the general case.
Jun
8
awarded  Good Answer
Jun
3
answered Passing unit macro to siunitx with pythontex
May
18
comment minted or listings input a file between markers
This feature has been requested for minted, and some form will be present in the next release. Basic functionality should already be possible using fancyvrb syntax, which is a bit ugly (hence the need for a nice minted wrapper); see the linked issue for an example.