Skip to content

Commit efdc2dc

Browse files
committed
v0.14; inline code commands are now robust, default working directory is now the main document directory instead of the output directory
1 parent 9cf2297 commit efdc2dc

File tree

12 files changed

+270
-167
lines changed

12 files changed

+270
-167
lines changed

NEWS.rst

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

99

10+
v0.14 (2014/07/17)
11+
------------------
12+
13+
New features
14+
~~~~~~~~~~~~
15+
16+
* All commands for working with code inline are now robust, via
17+
``etoolbox``'s ``\newrobustcmd``. Among other things, this allows
18+
commands like ``\py`` to work in standard captions that have not been
19+
redefined to avoid protection issues.
20+
* Upgraded ``syncpdb`` to v0.2, which provides better list formatting.
21+
22+
Backward-incompatible changes
23+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24+
25+
* The default working directory is now the main document directory instead
26+
of the output directory. Using the output directory was a common source
27+
of confusion for new users and was incompatible with plans for future
28+
development. Old documents in which the working directory was not
29+
specified will continue to use the output directory, but PythonTeX will
30+
print an upgrade message; new documents will use the new setting. The
31+
output directory may be selected as the working directory manually, or
32+
with the shorthand
33+
"``\setpythontexworkingdir{<outputdir>}``".
34+
35+
* Standardized version numbering by removing the "v" prefix from the stored
36+
version numbers in Python variables and LaTeX macros. Standardized the
37+
PythonTeX scripts by renaming ``version`` to ``__version__``.
38+
39+
40+
1041
v0.13 (2014/07/14)
1142
------------------
1243

README.rst

Lines changed: 23 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -41,79 +41,34 @@ Latest release
4141

4242
(Full release history is available `here <https://github.com/gpoore/pythontex/blob/master/NEWS.rst>`_.)
4343

44-
v0.13 (2014/07/14)
44+
v0.14 (2014/07/17)
4545
------------------
4646

4747
New features
4848
~~~~~~~~~~~~
4949

50-
* Added ``--interactive`` command-line option. This runs a single
51-
session in interactive mode, allowing user input. Among other things,
52-
this is useful when working with debuggers.
53-
54-
* Added ``--debug`` command-line option. This runs a single session
55-
with the default debugger in interactive mode. Currently, only
56-
standard (non-console) Python sessions are supported. The default
57-
Python debugger is the new ``syncpdb``, which wraps ``pdb`` and
58-
synchronizes code line numbers with document line numbers. All
59-
``pdb`` commands that take a line number or filename:lineno as an
60-
argument will refer to document files and line numbers when the
61-
argument has a percent symbol (``%``) as a prefix. For example,
62-
``list %50`` lists code that came from around line 50 in the
63-
document. The ``--debug`` option will support other languages and
64-
provide for customization in the future.
65-
66-
* Added command-line option ``--jobs``, which allows the maximum number
67-
of concurrent processes to be specified (#35).
68-
69-
* Added support for GNU Octave, via the ``octave`` family of commands
70-
and environments (#36). Parsing of Octave stderr is not ideal, though
71-
synchronization works in most cases; this will be addressed by a
72-
future rewrite of the stderr parser.
73-
74-
* Installer now automatically works with MiKTeX, not just TeX Live.
75-
76-
* The PythonTeX utilities class has a new ``open()`` method that opens
77-
files and automatically tracks dependencies/created files.
78-
79-
* When ``pythontex2.py`` and ``pythontex3.py`` are run directly, the
80-
Python interpreter is automatically set to a reasonable default
81-
(``py -2`` or ``py -3`` under Windows, using the Python 3.3+ wrapper;
82-
``python2`` or ``python3`` under other systems).
83-
84-
* The installer now creates symlinks for the numbered scripts
85-
``pythontex*.py`` and ``depythontex*.py``.
86-
87-
* Added Python version checking to all numbered scripts.
88-
89-
* Under Python, the type of data passed via ``\setpythontexcontext`` may
90-
now be set using YAML-style tags (``!!str``, ``!!int``, ``!!float``). For
91-
example, ``{myint=!!int 123}``.
92-
93-
* The ``fancyvrb`` options ``firstline`` and ``lastline`` now work with
94-
the ``pygments`` environment and ``\inputpygments`` command. This required
95-
some additional patching of ``fancyvrb``.
96-
97-
* The ``pytx@Verbatim`` and ``pytx@SaveVerbatim`` environments are now
98-
used for typesetting verbatim code. These are copies of the
99-
``fancyvrb`` environments. This prevents conflicts when literal
100-
``Verbatim`` and ``SaveVerbatim`` environments need to be typeset.
101-
102-
* Improved ``latexmk`` compatibility (#40). Added discussion of
103-
``latexmk`` usage to documentation.
104-
105-
* Tildes ``~`` may now be used in ``outputdir`` and ``workingdir`` to
106-
refer to the user’s home directory, even under Windows.
107-
108-
Bugfixes
109-
~~~~~~~~
110-
111-
* Fixed a bug that prevented created files from being cleaned up when
112-
the working directory was not the document root directory and the
113-
full path to the files was not provided.
114-
115-
* Fixed a bug that prevented the ``fvextfile`` option from working when
116-
external files were highlighted.
50+
* All commands for working with code inline are now robust, via
51+
``etoolbox``'s ``\newrobustcmd``. Among other things, this allows
52+
commands like ``\py`` to work in standard captions that have not been
53+
redefined to avoid protection issues.
54+
* Upgraded ``syncpdb`` to v0.2, which provides better list formatting.
55+
56+
Backward-incompatible changes
57+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58+
59+
* The default working directory is now the main document directory instead
60+
of the output directory. Using the output directory was a common source
61+
of confusion for new users and was incompatible with plans for future
62+
development. Old documents in which the working directory was not
63+
specified will continue to use the output directory, but PythonTeX will
64+
print an upgrade message; new documents will use the new setting. The
65+
output directory may be selected as the working directory manually, or
66+
with the shorthand
67+
"``\setpythontexworkingdir{<outputdir>}``".
68+
69+
* Standardized version numbering by removing the "v" prefix from the stored
70+
version numbers in Python variables and LaTeX macros. Standardized the
71+
PythonTeX scripts by renaming ``version`` to ``__version__``.
11772

11873

11974
Objectives for future releases

pythontex/depythontex2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686

8787
# Script parameters
8888
# Version
89-
version = 'v0.13'
89+
__version__ = '0.14'
9090

9191

9292
# Functions and parameters for customizing the script output
@@ -674,7 +674,7 @@ def replace_print_env(name, arglist, linenum,
674674
# Parse argv
675675
parser = argparse.ArgumentParser()
676676
parser.add_argument('--version', action='version',
677-
version='DePythonTeX {0}'.format(version))
677+
version='DePythonTeX {0}'.format(__version__))
678678
parser.add_argument('--encoding', default='utf-8',
679679
help='encoding for all text files (see codecs module for encodings)')
680680
parser.add_argument('--overwrite', default=False, action='store_true',
@@ -726,7 +726,7 @@ def replace_print_env(name, arglist, linenum,
726726

727727
# Let the user know things have started
728728
if args.output is not None:
729-
print('This is DePythonTeX {0}'.format(version))
729+
print('This is DePythonTeX {0}'.format(__version__))
730730
sys.stdout.flush()
731731

732732

@@ -792,7 +792,7 @@ def replace_print_env(name, arglist, linenum,
792792
depytx[n] = ''
793793
n -= 1
794794
# Check .depytx version to make sure it is compatible
795-
if settings['version'] != version:
795+
if settings['version'] != __version__:
796796
print('* DePythonTeX warning:')
797797
print(' Version mismatch with DePythonTeX auxiliary file')
798798
print(' Do a complete compile cycle to update the auxiliary file')

pythontex/depythontex3.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686

8787
# Script parameters
8888
# Version
89-
version = 'v0.13'
89+
__version__ = '0.14'
9090

9191

9292
# Functions and parameters for customizing the script output
@@ -674,7 +674,7 @@ def replace_print_env(name, arglist, linenum,
674674
# Parse argv
675675
parser = argparse.ArgumentParser()
676676
parser.add_argument('--version', action='version',
677-
version='DePythonTeX {0}'.format(version))
677+
version='DePythonTeX {0}'.format(__version__))
678678
parser.add_argument('--encoding', default='utf-8',
679679
help='encoding for all text files (see codecs module for encodings)')
680680
parser.add_argument('--overwrite', default=False, action='store_true',
@@ -726,7 +726,7 @@ def replace_print_env(name, arglist, linenum,
726726

727727
# Let the user know things have started
728728
if args.output is not None:
729-
print('This is DePythonTeX {0}'.format(version))
729+
print('This is DePythonTeX {0}'.format(__version__))
730730
sys.stdout.flush()
731731

732732

@@ -792,7 +792,7 @@ def replace_print_env(name, arglist, linenum,
792792
depytx[n] = ''
793793
n -= 1
794794
# Check .depytx version to make sure it is compatible
795-
if settings['version'] != version:
795+
if settings['version'] != __version__:
796796
print('* DePythonTeX warning:')
797797
print(' Version mismatch with DePythonTeX auxiliary file')
798798
print(' Do a complete compile cycle to update the auxiliary file')

0 commit comments

Comments
 (0)