Releases: gpoore/pythontex
v0.18
-
\inputpygments
now 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 forWindowsError
with 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 (
pycon
lexer) now
uses thepython3
option, 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). -
pythontexcustomcode
and\pythontexcustomc
now set
pytex.context
(#65). -
Added support for R. The
R
family of commands and environments
(\R
,\Rc
,Rcode
, ...) executes code as a script.
There is currently no utilities class or equivalent. TheRcon
family
(Rconsole
) executes code to emulate an interactive R session (#121). -
fancyvrb
settings from\setpythontexfv
and console
environments now work with Julia and R consoles. -
pythontexcustomcode
now works withjuliacon
. There are now proper
juliaconcode
andRconcode
environments that execute code but
typeset nothing, to parallelpyconcode
(#134). -
Added support for Perl with the
perl
andpl
families of commands
and environments. There is currently no utilities class or equivalent. -
Added support for Perl 6 with the
perlsix
andpsix
families of
commands and environments (#104). There is currently no utilities class or
equivalent. -
Updated Rust support by using
dyn
with traits in utilities object. -
Under Windows, capitalization of script paths in
stderr
is now
preserved. -
Fixed a bug that prevented the
sub
environment from working with
depythontex
(#155). -
Fixed a bug in checking mtime of dependencies to see if they have been
modified whilepythontex
is running. The check failed for dependencies
that do not exist or were deleted beforepythontex
can read them
(#136).
v0.16
v0.15
New features
- The
fvextra
package 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
sub
commands 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
rust
andrs
families 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
sage
family of commands and environments, which provide
support for Sage (#63). - Added
bash
family of commands and environments. This provides basic
support for bash (no utilities class or equivalent). Bash works with
Windows if it is installed. - Improved
console
compatibility 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
\py
can now output verbatim content under LuaTeX.
Bugfixes
- Fixed a bug that could cause an endless loop when a
code
command or
environment printed acode
command 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\py
to work in standard captions that have not been
redefined to avoid protection issues. - Upgraded
syncpdb
to 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 renamingversion
to__version__
.
v0.13
v0.13 (2014/07/14)
New features
- Added
--interactive
command-line option. This runs a single
session in interactive mode, allowing user input. Among other things,
this is useful when working with debuggers. - Added
--debug
command-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 wrapspdb
and
synchronizes code line numbers with document line numbers. All
pdb
commands 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 %50
lists code that came from around line 50 in the
document. The--debug
option 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
octave
family 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.py
andpythontex3.py
are run directly, the
Python interpreter is automatically set to a reasonable default
(py -2
orpy -3
under Windows, using the Python 3.3+ wrapper;
python2
orpython3
under other systems). - The installer now creates symlinks for the numbered scripts
pythontex*.py
anddepythontex*.py
. - Added Python version checking to all numbered scripts.
- Under Python, the type of data passed via
\setpythontexcontext
may
now be set using YAML-style tags (!!str
,!!int
,!!float
). For
example,{myint=!!int 123}
. - The
fancyvrb
optionsfirstline
andlastline
now work with
thepygments
environment and\inputpygments
command. This required
some additional patching offancyvrb
. - The
pytx@Verbatim
andpytx@SaveVerbatim
environments are now
used for typesetting verbatim code. These are copies of the
fancyvrb
environments. This prevents conflicts when literal
Verbatim
andSaveVerbatim
environments need to be typeset. - Improved
latexmk
compatibility (#40). Added discussion of
latexmk
usage to documentation. - Tildes
~
may now be used inoutputdir
andworkingdir
to
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
fvextfile
option 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 thecontext
attribute
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 avoidsmicrotype
issues 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 thecontext
attribute (pytex.context
vs.pytex.input_context
). depythontex
now has-o
and--output
command-line options for
specifying the name of the output file. If an output file is not
specified, then output is written tostdout
. This allows
depythontex
output to be piped to another program.- All scripts
*2.py
now have shebangs withenv python2
, and all
scripts*3.py
now have shebangs withenv python3
. This allows
the wrapper scripts (env python
shebang) 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--interpreter
option is what determines the Python version
that actually executes code. The version of Python used to launch
pythontex.py
merely determines the version that manages code
execution. (--interpreter
support for console content is coming.) - Changed the template style used in the
CodeEngine
class.
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
\directlua
is not\let
to
\relax
if it does not exist. This was causing incompatibility with
babel
under pdfTeX and XeTeX (#33). - Added missing shebangs to
depythontex*.py
. Handling ofutilspath
is now more forgiving, so thatpythontex_utils.py
can be installed
in alternate locations (#23). depythontex
no longer leaves a blank line where
\usepackage{pythontex}
was removed.- Console environments typeset with
fancyvrb
no longer end with an
unnecessary empty line. - Fixed bug in installer when
kpsewhich
was not found (#21).