Skip to content

Commit

Permalink
improved Rust support (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
gpoore committed Nov 1, 2016
1 parent 65be8ca commit 0edce24
Show file tree
Hide file tree
Showing 8 changed files with 242 additions and 82 deletions.
2 changes: 1 addition & 1 deletion pythontex/depythontex2.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

# Script parameters
# Version
__version__ = '0.15'
__version__ = '0.16dev'


# Functions and parameters for customizing the script output
Expand Down
2 changes: 1 addition & 1 deletion pythontex/depythontex3.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

# Script parameters
# Version
__version__ = '0.15'
__version__ = '0.16dev'


# Functions and parameters for customizing the script output
Expand Down
18 changes: 15 additions & 3 deletions pythontex/pythontex.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -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]
[2016/11/01 v0.16dev execute and typeset Python code and other languages]
%</package>
%
%<*driver>
Expand Down Expand Up @@ -153,6 +153,14 @@
% Right brace \} Tilde \~}
%
%

% \begin{changelog}{v0.16}{2016/11/??}
% \begin{itemize}
% \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}
Expand Down Expand Up @@ -1566,7 +1574,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}
Expand Down Expand Up @@ -1795,7 +1807,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.16dev}
% \end{macrocode}
%
% \subsection{Required packages}
Expand Down
7 changes: 4 additions & 3 deletions pythontex/pythontex.sty
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
%% Copyright (C) 2012-2014 by Geoffrey M. Poore <gpoore@gmail.com>
%% Copyright (C) 2012-2016 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
Expand All @@ -20,10 +20,11 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{pythontex}
[2016/07/21 v0.15 execute and typeset Python code and other languages]
[2016/11/01 v0.16dev execute and typeset Python code and other languages]


\newcommand{\pytx@packagename}{PythonTeX}
\newcommand{\pytx@packageversion}{0.15}
\newcommand{\pytx@packageversion}{0.16dev}
\RequirePackage{fvextra}
\RequirePackage{etoolbox}
\RequirePackage{xstring}
Expand Down
2 changes: 1 addition & 1 deletion pythontex/pythontex2.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

# Script parameters
# Version
__version__ = '0.15'
__version__ = '0.16dev'



Expand Down
2 changes: 1 addition & 1 deletion pythontex/pythontex3.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

# Script parameters
# Version
__version__ = '0.15'
__version__ = '0.16dev'



Expand Down
Loading

0 comments on commit 0edce24

Please sign in to comment.