Releases: gpoore/pythontex
v0.18
-
\inputpygmentsnow checks inputted files for modification, so that
typeset code will correctly update when the source is changed (#162). -
Fixed bug in processing Pygments options (
pygopt) when a key is used
without a value (#181). -
Some error handling for Windows was incompatible with other operating
systems: replaced checks forWindowsErrorwith checks forOSError
(#177). -
Rust support is now compatible with document and working directory paths
that contain spaces (#167).
v0.17
-
Pygments syntax highlighting for the Python console (
pyconlexer) now
uses thepython3option, and the default Python lexer is now
python3(#156). -
Added support for JavaScript (#147; thanks to Nathan Carter).
-
Updated Julia support for Julia versions 0.6 (#107), and 0.7 and 1.0 (#126,
#130). -
There are now meaningful error messages for the Julia console when Weave.jl
is not installed or raises errors (#131). -
pythontexcustomcodeand\pythontexcustomcnow set
pytex.context(#65). -
Added support for R. The
Rfamily of commands and environments
(\R,\Rc,Rcode, ...) executes code as a script.
There is currently no utilities class or equivalent. TheRconfamily
(Rconsole) executes code to emulate an interactive R session (#121). -
fancyvrbsettings from\setpythontexfvand console
environments now work with Julia and R consoles. -
pythontexcustomcodenow works withjuliacon. There are now proper
juliaconcodeandRconcodeenvironments that execute code but
typeset nothing, to parallelpyconcode(#134). -
Added support for Perl with the
perlandplfamilies of commands
and environments. There is currently no utilities class or equivalent. -
Added support for Perl 6 with the
perlsixandpsixfamilies of
commands and environments (#104). There is currently no utilities class or
equivalent. -
Updated Rust support by using
dynwith traits in utilities object. -
Under Windows, capitalization of script paths in
stderris now
preserved. -
Fixed a bug that prevented the
subenvironment from working with
depythontex(#155). -
Fixed a bug in checking mtime of dependencies to see if they have been
modified whilepythontexis running. The check failed for dependencies
that do not exist or were deleted beforepythontexcan read them
(#136).
v0.16
v0.15
New features
- The
fvextrapackage is now required. This provides line breaking with
fine-grained control over break locations, the ability to highlight
specific lines or ranges of lines, improved handling of tabs, and several
additional features. - Added
subcommands and environments (\pys,pysub, ...). These
commands and environments perform string interpolation on text. Fields
delimited by!{...}are replaced by the result of evaluating and then
printing their content. This works for all families of commands and
environments, not just Python. See the documentation for details about
field delimiters and escaping. - Added
rustandrsfamilies of commands and environments. These
provide essentially complete support for Rust, except that
rstex.formatter(),rstex.before(), andrstex.after()will
likely need additional refinement (#90). - Added the
sagefamily of commands and environments, which provide
support for Sage (#63). - Added
bashfamily of commands and environments. This provides basic
support for bash (no utilities class or equivalent). Bash works with
Windows if it is installed. - Improved
consolecompatibility under Linux with Python 3 (#70). - Counters for default sessions are now created automatically. This prevents
counter errors under some circumstances when working with\includeonly. - Commands like
\pycan now output verbatim content under LuaTeX.
Bugfixes
- Fixed a bug that could cause an endless loop when a
codecommand or
environment printed acodecommand or environment of the same family
withautoprint=true.
v0.14
v0.14 (2014/07/17)
New features
- All commands for working with code inline are now robust, via
etoolbox's\newrobustcmd. Among other things, this allows
commands like\pyto work in standard captions that have not been
redefined to avoid protection issues. - Upgraded
syncpdbto v0.2, which provides better list formatting.
Backward-incompatible changes
- The default working directory is now the main document directory instead
of the output directory. Using the output directory was a common source
of confusion for new users and was incompatible with plans for future
development. Old documents in which the working directory was not
specified will continue to use the output directory, but PythonTeX will
print an upgrade message; new documents will use the new setting. The
output directory may be selected as the working directory manually, or
with the shorthand
"\setpythontexworkingdir{<outputdir>}". - Standardized version numbering by removing the "v" prefix from the stored
version numbers in Python variables and LaTeX macros. Standardized the
PythonTeX scripts by renamingversionto__version__.
v0.13
v0.13 (2014/07/14)
New features
- Added
--interactivecommand-line option. This runs a single
session in interactive mode, allowing user input. Among other things,
this is useful when working with debuggers. - Added
--debugcommand-line option. This runs a single session
with the default debugger in interactive mode. Currently, only
standard (non-console) Python sessions are supported. The default
Python debugger is the newsyncpdb, which wrapspdband
synchronizes code line numbers with document line numbers. All
pdbcommands that take a line number or filename:lineno as an
argument will refer to document files and line numbers when the
argument has a percent symbol (%) as a prefix. For example,
list %50lists code that came from around line 50 in the
document. The--debugoption will support other languages and
provide for customization in the future. - Added command-line option
--jobs, which allows the maximum number
of concurrent processes to be specified (#35). - Added support for GNU Octave, via the
octavefamily of commands
and environments (#36). Parsing of Octave stderr is not ideal, though
synchronization works in most cases; this will be addressed by a
future rewrite of the stderr parser. - Installer now automatically works with MiKTeX, not just TeX Live.
- The PythonTeX utilities class has a new
open()method that opens
files and automatically tracks dependencies/created files. - When
pythontex2.pyandpythontex3.pyare run directly, the
Python interpreter is automatically set to a reasonable default
(py -2orpy -3under Windows, using the Python 3.3+ wrapper;
python2orpython3under other systems). - The installer now creates symlinks for the numbered scripts
pythontex*.pyanddepythontex*.py. - Added Python version checking to all numbered scripts.
- Under Python, the type of data passed via
\setpythontexcontextmay
now be set using YAML-style tags (!!str,!!int,!!float). For
example,{myint=!!int 123}. - The
fancyvrboptionsfirstlineandlastlinenow work with
thepygmentsenvironment and\inputpygmentscommand. This required
some additional patching offancyvrb. - The
pytx@Verbatimandpytx@SaveVerbatimenvironments are now
used for typesetting verbatim code. These are copies of the
fancyvrbenvironments. This prevents conflicts when literal
VerbatimandSaveVerbatimenvironments need to be typeset. - Improved
latexmkcompatibility (#40). Added discussion of
latexmkusage to documentation. - Tildes
~may now be used inoutputdirandworkingdirto
refer to the user’s home directory, even under Windows.
Bugfixes
- Fixed a bug that prevented created files from being cleaned up when
the working directory was not the document root directory and the
full path to the files was not provided. - Fixed a bug that prevented the
fvextfileoption from working when
external files were highlighted.
v0.13-beta
v0.13-beta (2014/02/06)
New features
- Switching to GitHub's Releases for downloads.
- TeX information such as page dimensions may now be easily passed to
the programming-language side, using the new\setpythontexcontext
command. Contextual information is stored in thecontextattribute
of the utilities class, which is a dictionary (and also has
attributes in Python). - The utilities class now has
pt_to_in(),pt_to_cm(), and
pt_to_mm()methods for converting units of TeX points into inches,
centimeters, and millimeters. These work with integers and floats,
as well as strings that consist of numbers and optionally end in
"pt". There is also apt_to_bp()for converting TeX points
(1/72.27 inch) into big (DTP or PostScript) points (1/72 inch). - Expanded Quickstart. Quickstart is now compatible with all LaTeX
engines. Quickstart now avoidsmicrotypeissues on some systems
(#32). - Added information on citing PythonTeX (#28).
- Utilities class has a new attribute
id, which is a string that
joins the command family name, session name, and session restart
parameters with underscores. This may be used in creating files that
need a name that contains a unique, session-based identifier (for
example, names for figures that are saved automatically).
Backward-incompatible changes
- All utilities-class attributes with names of the form
input_*have
been renamed with the "input_" removed. Among other things, this
makes it easier to access thecontextattribute (pytex.context
vs.pytex.input_context). depythontexnow has-oand--outputcommand-line options for
specifying the name of the output file. If an output file is not
specified, then output is written tostdout. This allows
depythontexoutput to be piped to another program.- All scripts
*2.pynow have shebangs withenv python2, and all
scripts*3.pynow have shebangs withenv python3. This allows
the wrapper scripts (env pythonshebang) to be used with the
default Python installation, and the numbered scripts to be used
with specific versions. Remember that except for console content,
the--interpreteroption is what determines the Python version
that actually executes code. The version of Python used to launch
pythontex.pymerely determines the version that manages code
execution. (--interpretersupport for console content is coming.) - Changed the template style used in the
CodeEngineclass.
Replacement fields are now surrounded by single curly braces (as in
Python's format string syntax), rather than double curly braces.
Literal curly braces are obtained by doubling braces. This allows
the use of literal adjacent double braces in templates, which was
not possible previously. - The Julia template now uses the new
in()function, replacing
contains(). This requires Julia v0.2.0+.
Bugfixes
- Modified test for LuaTeX, so that
\directluais not\letto
\relaxif it does not exist. This was causing incompatibility with
babelunder pdfTeX and XeTeX (#33). - Added missing shebangs to
depythontex*.py. Handling ofutilspath
is now more forgiving, so thatpythontex_utils.pycan be installed
in alternate locations (#23). depythontexno longer leaves a blank line where
\usepackage{pythontex}was removed.- Console environments typeset with
fancyvrbno longer end with an
unnecessary empty line. - Fixed bug in installer when
kpsewhichwas not found (#21).