v0.13-beta
Pre-release
Pre-release
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).