summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/pythontex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-07-21 22:00:53 +0000
committerKarl Berry <karl@freefriends.org>2017-07-21 22:00:53 +0000
commit26f8c60d721bcd3fe6a0183b9f5ea076f9018293 (patch)
treefbfd09188328236e0c4b2a6e91210b4a690fde90 /Master/texmf-dist/source/latex/pythontex
parent2a74b4e85b56e76205237f78b9b87db928cb1143 (diff)
pythontex (21jul17)
git-svn-id: svn://tug.org/texlive/trunk@44860 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/pythontex')
-rw-r--r--Master/texmf-dist/source/latex/pythontex/pythontex.dtx46
1 files changed, 41 insertions, 5 deletions
diff --git a/Master/texmf-dist/source/latex/pythontex/pythontex.dtx b/Master/texmf-dist/source/latex/pythontex/pythontex.dtx
index 7ec0af93c78..d91e6e1eac0 100644
--- a/Master/texmf-dist/source/latex/pythontex/pythontex.dtx
+++ b/Master/texmf-dist/source/latex/pythontex/pythontex.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2012-2016 by Geoffrey M. Poore <gpoore@gmail.com>
+% Copyright (C) 2012-2017 by Geoffrey M. Poore <gpoore@gmail.com>
% ---------------------------------------------------------------------------
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -26,7 +26,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{pythontex}
%<*package>
- [2016/07/21 v0.15 execute and typeset Python code and other languages]
+ [2017/07/20 v0.16 execute and typeset Python code and other languages]
%</package>
%
%<*driver>
@@ -134,7 +134,7 @@
%</driver>
% \fi
%
-% \CheckSum{3174}
+% \CheckSum{3218}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -153,6 +153,16 @@
% Right brace \} Tilde \~}
%
%
+
+% \begin{changelog}{v0.16}{2017/07/20}
+% \begin{itemize}
+% \item Added preliminary console support for Julia (\#98).
+% \item Fixed Python console compatibility with Python 3.6 by setting the \texttt{code} module's new \texttt{exitmsg} argument to suppress the exit message (\#100).
+% \item Improved Rust support, including tracking of created files and dependencies (\#91).
+% \end{itemize}
+% \end{changelog}
+%
+%
% \begin{changelog}{v0.15}{2016/07/21}
% \textbf{New features}
% \begin{itemize}
@@ -1537,6 +1547,10 @@
%
% Julia exceptions are synchronized with the document, but the line numbering does not always correspond to the Python equivalent. This is because Julia allows expressions to be continued on subsequent lines in ways that Python does not.
%
+% \subsubsection*{Console}
+%
+% Preliminary Julia console support was added in v0.16, under the base name |juliacon|. Unlike the Python console environments that allow invalid input, currently everything entered in a |juliaconsole| environment must be valid. The Julia console uses \href{https://github.com/mpastell/Weave.jl}{\textsf{Weave.jl}} internally to evaluate code, and it currently does not support invalid input.
+%
%
% \subsection{Octave}
%
@@ -1566,7 +1580,11 @@
%
% Because Rust typically gives a long sequence of errors, \pytex\ processing and synchronization of |stderr| is currently verbose and may need to be improved in the future as well. There is no support for encodings other than UTF-8. Currently, executables always use the |.exe| extension, even under non-Windows systems.
%
-% When using |\rust| and |\rs|, keep in mind that these wrap code in |rstex.formatter()|. Because |rstex| is mutable, accessing its fields within |rstex.formatter()| will require |&rstex.|\meta{field}|.to_string()| or similar.
+% Due to the way |rstex| is used in template-generated code, it needs to remain a mutable local variable. This means that, while there should be no problem using it through either shared or mutable references, taking it by value requires that the ``altered'' copy is reassigned to a new variable that shadows the old one. That is, code that needs to work with |rstex| by value should look like
+% \begin{Verbatim}[commandchars=\\\{\}, gobble=2]
+% let mut rstex = \meta{code};
+% \end{Verbatim}
+% Additionally, when using |\rust| and |\rs|, keep in mind that these wrap code in a block, so you \emph{cannot} use |rstex| by value in these contexts (both shared and mutable references are still fine, though).
%
%
% \subsection{Adding support for a new language}
@@ -1795,7 +1813,7 @@
% We store the name of the package in a macro for later use in warnings and error messages.
% \begin{macrocode}
\newcommand{\pytx@packagename}{PythonTeX}
-\newcommand{\pytx@packageversion}{0.15}
+\newcommand{\pytx@packageversion}{0.16}
% \end{macrocode}
%
% \subsection{Required packages}
@@ -4063,6 +4081,24 @@
\ifstrequal{#1}{ruby}{\makepythontexfamily[pyglexer=ruby]{ruby}}{}%
\ifstrequal{#1}{rb}{\makepythontexfamily[pyglexer=ruby]{rb}}{}%
\ifstrequal{#1}{julia}{\makepythontexfamily[pyglexer=julia]{julia}}{}%
+ \ifstrequal{#1}{juliacon}{\pgfkeys{/PYTX/family, name=juliacon, default, pyglexer=jlcon}%
+ \expandafter\xdef\csname pytx@macroformatter@juliacon\endcsname{\pytx@tmp@pprinter}%
+ \expandafter\gdef\csname pytx@fvsettings@juliacon\endcsname{}%
+ \expandafter\xdef\csname pytx@pyglexer@juliacon\endcsname{\pytx@tmp@pyglexer}%
+ \expandafter\xdef\csname pytx@pygopt@juliacon\endcsname{\pytx@tmp@pygopt}%
+ \expandafter\xdef\csname pytx@console@juliacon\endcsname{\pytx@tmp@console}%
+ \AtEndDocument{\immediate\write\pytx@codefile{pygfamily=juliacon|%
+ \csname pytx@pyglexer@juliacon\endcsname|%
+ \csname pytx@pygopt@juliacon\endcsname}%
+ }%
+ \pytx@MakeCodeFV{juliacon}%
+ \newenvironment{juliaconsole}%
+ {\VerbatimEnvironment
+ \def\pytx@type{juliacon}%
+ \pytx@ConfigPygments
+ \begin{juliaconcode}}%
+ {\end{juliaconcode}%
+ \ifbool{pytx@opt@autoprint}{}{\printpythontex{}}}}{}%
\ifstrequal{#1}{jl}{\makepythontexfamily[pyglexer=julia]{jl}}{}%
\ifstrequal{#1}{matlab}{\makepythontexfamily[pyglexer=matlab]{matlab}}{}%
\ifstrequal{#1}{octave}{\makepythontexfamily[pyglexer=octave]{octave}}{}%