Skip to content

Commit 3ac7263

Browse files
committed
v0.17
1 parent 0b9455b commit 3ac7263

10 files changed

Lines changed: 98 additions & 26 deletions

File tree

NEWS.rst

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,57 @@ Version History
77
===============
88

99

10+
v0.17 (2019/09/22)
11+
------------------
12+
13+
* Pygments syntax highlighting for the Python console (``pycon`` lexer) now
14+
uses the ``python3`` option, and the default Python lexer is now
15+
``python3`` (#156).
16+
17+
* Added support for JavaScript (#147; thanks to Nathan Carter).
18+
19+
* Updated Julia support for Julia versions 0.6 (#107), and 0.7 and 1.0 (#126,
20+
#130).
21+
22+
* There are now meaningful error messages for the Julia console when Weave.jl
23+
is not installed or raises errors (#131).
24+
25+
* ``pythontexcustomcode`` and ``\pythontexcustomc`` now set
26+
``pytex.context`` (#65).
27+
28+
* Added support for R. The ``R`` family of commands and environments
29+
(``\R``, ``\Rc``, ``Rcode``, ...) executes code as a script.
30+
There is currently no utilities class or equivalent. The ``Rcon`` family
31+
(``Rconsole``) executes code to emulate an interactive R session (#121).
32+
33+
* ``fancyvrb`` settings from ``\setpythontexfv`` and console
34+
environments now work with Julia and R consoles.
35+
36+
* ``pythontexcustomcode`` now works with ``juliacon``. There are now proper
37+
``juliaconcode`` and ``Rconcode`` environments that execute code but
38+
typeset nothing, to parallel ``pyconcode`` (#134).
39+
40+
* Added support for Perl with the ``perl`` and ``pl`` families of commands
41+
and environments. There is currently no utilities class or equivalent.
42+
43+
* Added support for Perl 6 with the ``perlsix`` and ``psix`` families of
44+
commands and environments (#104). There is currently no utilities class or
45+
equivalent.
46+
47+
* Updated Rust support by using ``dyn`` with traits in utilities object.
48+
49+
* Under Windows, capitalization of script paths in ``stderr`` is now
50+
preserved.
51+
52+
* Fixed a bug that prevented the ``sub`` environment from working with
53+
``depythontex`` (#155).
54+
55+
* Fixed a bug in checking mtime of dependencies to see if they have been
56+
modified while ``pythontex`` is running. The check failed for dependencies
57+
that do not exist or were deleted before ``pythontex`` can read them
58+
(#136).
59+
60+
1061

1162
v0.16 (2017/07/20)
1263
------------------

README.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
:Author: Geoffrey Poore
1313

14-
:Version: 0.16
14+
:Version: 0.17
1515

1616
:License: LPPL_ (LaTeX code) and `BSD 3-Clause`_ (Python code)
1717

@@ -30,8 +30,9 @@ results to be included within the original document. It also provides syntax
3030
highlighting for code within LaTeX documents via the Pygments syntax
3131
highlighter.
3232

33-
PythonTeX also provides support for Ruby, Julia, Octave, Sage, Bash, Rust,
34-
and R. Support for additional languages is coming soon.
33+
PythonTeX also provides support for Ruby, Julia, Octave, Sage, Bash, Rust, R,
34+
Perl, Perl 6, and JavaScript. Support for additional languages is coming
35+
soon.
3536

3637
See ``pythontex_quickstart.pdf`` to get started, and ``pythontex_gallery.pdf``
3738
for examples of what is possible with PythonTeX. PythonTeX is included in

pythontex/README

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
===================================================================
44

55
:Author: Geoffrey Poore
6-
:Version: 0.16 (2017/07/20)
6+
:Version: 0.17 (2019/09/22)
77
:License: LPPL v1.3 or later (LaTeX code) and BSD 3-Clause (Python code)
88
:Development: https://github.com/gpoore/pythontex
99
:Requirements: Python 2.7 or 3.2+; Pygments
1010

1111

12-
The PythonTeX package allows you to enter Python code within a LaTeX
13-
document, execute the code, and access its output in the original document.
14-
It also supports the Ruby, Julia, Octave, Sage, Bash, and Rust languages.
12+
The PythonTeX package allows you to enter Python code within a LaTeX document,
13+
execute the code, and access its output in the original document. It also
14+
supports the Ruby, Julia, Octave, Sage, Bash, Rust, R, Perl, Perl 6, and
15+
JavaScript languages.
1516

1617
PythonTeX provides fast, user-friendly access to Python from within LaTeX.
1718
Python code is only executed when it has been modified, or when it meets

pythontex/depythontex2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686

8787
# Script parameters
8888
# Version
89-
__version__ = '0.17dev'
89+
__version__ = '0.17'
9090

9191

9292
# Functions and parameters for customizing the script output

pythontex/depythontex3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686

8787
# Script parameters
8888
# Version
89-
__version__ = '0.17dev'
89+
__version__ = '0.17'
9090

9191

9292
# Functions and parameters for customizing the script output

pythontex/pythontex.dtx

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
2727
%<package>\ProvidesPackage{pythontex}
2828
%<*package>
29-
[2019/09/20 v0.17dev execute and typeset Python code and other languages]
29+
[2019/09/22 v0.17 execute and typeset Python code and other languages]
3030
%</package>
3131
%
3232
%<*driver>
@@ -40,6 +40,20 @@
4040
\usepackage{environ}
4141
\usepackage{enumitem}
4242
\usepackage{fvextra}
43+
% The typesetting for macrocode doesn't use \@noligs, which upquote modifies.
44+
% So apply the upquote fix to \verbatim@nolig@list as well, which is in macrocode.
45+
\begingroup
46+
\catcode`'=\active
47+
\catcode``=\active
48+
\g@addto@macro\verbatim@nolig@list{%
49+
\let'\textquotesingle
50+
\let`\textasciigrave
51+
\ifx\encodingdefault\upquote@OTone
52+
\ifx\ttdefault\upquote@cmtt
53+
\def'{\char13 }%
54+
\def`{\char18 }%
55+
\fi\fi}
56+
\endgroup
4357
\usepackage{pythontex}
4458
\usepackage{hyperref}
4559
\hypersetup{
@@ -154,21 +168,22 @@
154168
%
155169
%
156170
%
157-
% \begin{changelog}{v0.17}{2019/09/??}
171+
% \begin{changelog}{v0.17}{2019/09/22}
158172
% \begin{itemize}
159173
% \item Pygments syntax highlighting for the Python console (\texttt{pycon} lexer) now uses the \texttt{python3} option, and the default Python lexer is now \texttt{python3} (\#156).
160174
% \item Added support for JavaScript (\#147; thanks to Nathan Carter).
161175
% \item Updated Julia support for Julia versions 0.6 (\#107), and 0.7 and 1.0 (\#126, \#130).
162-
% \item There are now meaningful error messages for Julia console when Weave.jl is not installed or raises errors (\#131).
176+
% \item There are now meaningful error messages for the Julia console when Weave.jl is not installed or raises errors (\#131).
163177
% \item \texttt{pythontexcustomcode} and \texttt{\string\pythontexcustomc} now set \texttt{pytex.context} (\#65).
164178
% \item Added support for R. The \texttt{R} family of commands and environments (\texttt{\string\R}, \texttt{\string\Rc}, \texttt{Rcode}, ...) executes code as a script. There is currently no utilities class or equivalent. The \texttt{Rcon} family (\texttt{Rconsole}) executes code to emulate an interactive R session (\#121).
165179
% \item \texttt{fancyvrb} settings from \texttt{\string\setpythontexfv} and console environments now work with Julia and R consoles.
166-
% \item \texttt{pythontexcustomcode} now works with |juliacon|. There are now proper \texttt{juliaconcode} and \texttt{Rconcode} environments that execute code but typeset nothing, to parallel \texttt{pyconcode} (\#134).
180+
% \item \texttt{pythontexcustomcode} now works with \texttt{juliacon}. There are now proper \texttt{juliaconcode} and \texttt{Rconcode} environments that execute code but typeset nothing, to parallel \texttt{pyconcode} (\#134).
167181
% \item Added support for Perl with the \texttt{perl} and \texttt{pl} families of commands and environments. There is currently no utilities class or equivalent.
168182
% \item Added support for Perl 6 with the \texttt{perlsix} and \texttt{psix} families of commands and environments (\#104). There is currently no utilities class or equivalent.
183+
% \item Updated Rust support by using \texttt{dyn} with traits in utilities object.
169184
% \item Under Windows, capitalization of script paths in \texttt{stderr} is now preserved.
170185
% \item Fixed a bug that prevented the \texttt{sub} environment from working with \texttt{depythontex} (\#155).
171-
% \item Fixed a bug in checking mtime of dependencies to see if they have been modified while \texttt{pythontex} is running. The check failed for dependencies that do not exist or were deleted before \texttt{pythontex} can read them (\#136)
186+
% \item Fixed a bug in checking mtime of dependencies to see if they have been modified while \texttt{pythontex} is running. The check failed for dependencies that do not exist or were deleted before \texttt{pythontex} can read them (\#136).
172187
% \end{itemize}
173188
% \end{changelog}
174189
%
@@ -457,6 +472,7 @@
457472
%
458473
% While Python is the focus of \pytex, adding basic support for an additional language is usually as simple as creating a new class instance and a few templates, usually totaling less than 100 lines of code. The following languages already have built-in support: Ruby, Julia, Octave, Bash, Rust, R, Perl, Perl 6, and JavaScript.
459474
% \end{abstract}
475+
%
460476
%
461477
%
462478
% \section*{\centering Warning}
@@ -679,7 +695,7 @@
679695
%
680696
% \DescribeMacro{usefamily=\meta{basename}/\marg{basename1,~basename2,~...}}
681697
%
682-
% By default, only the |py|, |sympy|, and |pylab| families of commands and environments are defined, to prevent possible package conflicts.\footnote{For example, a \texttt{\string\ruby} command for Ruby code, and the \texttt{\string\ruby} command defined by the Ruby package in the \href{http://www.ctan.org/pkg/cjk}{CJK package}.} This option defines preconfigured families for other available languages. It takes either a single language base name, or a list of comma-separated names enclosed in curly braces. Currently, the Ruby families |rb| and |ruby|, the Julia families |jl| and |julia|, and the Octave family |octave| may be created.
698+
% By default, only the |py|, |sympy|, and |pylab| families of commands and environments are defined, to prevent possible package conflicts.\footnote{For example, a \texttt{\string\ruby} command for Ruby code, and the \texttt{\string\ruby} command defined by the Ruby package in the \href{http://www.ctan.org/pkg/cjk}{CJK package}.} This option defines preconfigured families for other available languages. It takes either a single language base name, or a list of comma-separated names enclosed in curly braces. For example, the Ruby families |rb| and |ruby|, the Julia families |jl| and |julia|, and the Octave family |octave| may be enabled. For a full list of supported languages, see \Cref{sec:other-languages}.
683699
%
684700
%
685701
% \DescribeMacro{gobble=none/auto default:none}
@@ -1538,11 +1554,13 @@
15381554
% \section{Support for additional languages}
15391555
% \label{sec:other-languages}
15401556
%
1541-
% Beginning with v0.12, it is much simpler to add support for languages beyond Python. Support for several additional languages will be added in coming months.
1557+
% Details about adding support for additional languages are in \Cref{sec:other-languages:adding}. This section begins with a brief overview of supported languages and available features.
15421558
%
1543-
% In the immediate future, support for additional languages will be part of \pytex. Later, it may make sense to provide an alternative interface for other languages. For example, a package could be created that provides access to \pytex\ internals in a language-agnostic manner, without having the word ``python'' as part of the command names.
1544-
%
1545-
% Languages beyond Python will typically not be enabled by default, to prevent potential macro naming conflicts with other packages. At least two possible base names for commands and environments will be provided for each language. Typically these will be the name of the language and the language's file extension. For example, Ruby has the |ruby| and |rb| base names. You can choose which base name to use for creating a family of commands and environments based on personal preference and potential naming conflicts.
1559+
% Languages beyond Python are typically not be enabled by default to prevent potential macro naming conflicts with other packages. Languages are enabled via the |usefamily| package option (\Cref{sec:usage}). For example,
1560+
%\begin{verbatim}
1561+
%\usepackage[usefamily=ruby]{pythontex}
1562+
%\end{verbatim}
1563+
% Usually at least two possible base names for commands and environments will be provided for each language. Typically these will be the name of the language and the language's file extension. For example, Ruby has the |ruby| and |rb| base names. You can choose which base name to use for creating a family of commands and environments based on personal preference and potential naming conflicts.
15461564
%
15471565
%
15481566
% \subsection{Ruby}
@@ -1639,6 +1657,7 @@
16391657
%
16401658
%
16411659
% \subsection{Adding support for a new language}
1660+
% \label{sec:other-languages:adding}
16421661
%
16431662
% Adding support for an additional language involves creating two templates, creating a new instance of a class, and using a \pytex\ macro. In some cases, additional changes may be necessary for full support. The information below does not deal with creating |console| families; additional support for user-defined |console| families will be added in the future.
16441663
%
@@ -1866,7 +1885,7 @@
18661885
% We store the name of the package in a macro for later use in warnings and error messages.
18671886
% \begin{macrocode}
18681887
\newcommand{\pytx@packagename}{PythonTeX}
1869-
\newcommand{\pytx@packageversion}{0.17dev}
1888+
\newcommand{\pytx@packageversion}{0.17}
18701889
% \end{macrocode}
18711890
%
18721891
% \subsection{Required packages}

pythontex/pythontex.pdf

6.66 KB
Binary file not shown.

pythontex/pythontex.sty

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
%%
2121
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
2222
\ProvidesPackage{pythontex}
23-
[2019/09/20 v0.17dev execute and typeset Python code and other languages]
23+
[2019/09/22 v0.17 execute and typeset Python code and other languages]
2424

2525
\newcommand{\pytx@packagename}{PythonTeX}
26-
\newcommand{\pytx@packageversion}{0.17dev}
26+
\newcommand{\pytx@packageversion}{0.17}
2727
\RequirePackage{fvextra}
2828
\RequirePackage{etoolbox}
2929
\RequirePackage{xstring}

pythontex/pythontex2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Licensed under the BSD 3-Clause License:
1515
16-
Copyright (c) 2012-2017, Geoffrey M. Poore
16+
Copyright (c) 2012-2019, Geoffrey M. Poore
1717
1818
All rights reserved.
1919
@@ -78,7 +78,7 @@
7878

7979
# Script parameters
8080
# Version
81-
__version__ = '0.17dev'
81+
__version__ = '0.17'
8282

8383

8484

pythontex/pythontex3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
Licensed under the BSD 3-Clause License:
1515
16-
Copyright (c) 2012-2017, Geoffrey M. Poore
16+
Copyright (c) 2012-2019, Geoffrey M. Poore
1717
1818
All rights reserved.
1919
@@ -78,7 +78,7 @@
7878

7979
# Script parameters
8080
# Version
81-
__version__ = '0.17dev'
81+
__version__ = '0.17'
8282

8383

8484

0 commit comments

Comments
 (0)