Change Log

All notable changes to this project will be documented on this page. This project adheres to Semantic Versioning. See the latest docs for changes that have not yet been released and are only present in the development version.

1.0.0 - docs - 2015-11-25

This realease brings some great changes. The whole package has been refactored and actual documentation has been added. Because of this, things have been moved an renamed. One of the most notable changes is that all normal text is now escaped by default.

Changed

  • The base_classes submodule has been split into multiple sub-submodules.
  • The old baseclasses have been renamed as well. They now have easier names that better show their purpose.
  • The command and parameters submodules have been merged into one command submodule in the base_classes submodule.
  • The numpy classes have been moved to the math submodule.
  • For all of the previous changes the old submodules and names should still work during the transition period, but they will be removed before the final release.
  • The Plt class has been merged with the Figure class. Its add_plot method also doesn’t take a plt argument anymore. The plt module is now imported when the add_plot method is used. This also allows for adding plots in the SubFigure class.
  • Compiling is more secure now and it doesn’t show output unless an error occurs or explicitly specified.
  • The internal method propegate_packages has been spelled correctly and made “internal” by adding an underscore in front of the name, resulting in _propagate_packages
  • The default allignment of a multicolumn is not c instead of |c|, since vertical lines in tables are ugly most of the time.
  • Make the list method of Parameters a private method.
  • Make the get_table_width function private.
  • Make width and placement keyword only arguments for the add_plot method.
  • The old Table class is renamed to Tabular. A new Table class has been created that represents the table LaTeX environment, which can be used to create a floating table.
  • Fixed a bug in the Document class, that lead to an error if a filepath without basename was provided.
  • Fixed the testall.sh script such that sphinx and nosetests get called with the correct python version.
  • The graphics submodule has been renamed to figure.
  • The pgfplots submodule has been renamed to tikz.
  • Rename the seperate_paragraph keyword argument to the correctly spelled separate_paragraph.
  • The container_name attribute has been changed to latex_name so it can be used more than containers. By default it is still the lowercase version of the classname. To change the default for a class you should set _latex_name
  • Made Document.select_filepath private.
  • Container now has a dumps_content method, which dumps it content instead of a dumps method. This allows to override just that method when subclassing Environment so you can do dump in some special inside the environment, while still keeping the \begin and \end stuff provided by Environment.
  • When subclassing a class and special LaTeX packages are needed, you now have to specify the packages class attribute instead of passing packages along with the __init__ method.
  • Content of subclasses of Container is now automatically escaped. Content of Arguments or Options is not escaped by default.
  • Made separate_paragraph, begin_paragraph and end_paragraph class attributes instead of instance attributes.
  • The default of the filepath argument for the Document.generate_pdf and Document.generate_tex have been changed to None. The response to the default is not changed, so this is a fairly invisible change.
  • Moved separate_paragraph, begin_paragraph and end_paragraph attributes to LatexObject.
  • Use latexmk to compile to pdf when available, otherwise fallback to pdflatex.
  • Change the order of arguments of the Axis constructor.
  • Tables like Tabular now raise an exception when rows with wrong size are added
  • Made lots of keyword arguments keyword only arguments. This was needed to make it easy to keep the API the same in the future.
  • Removed the submodules pylatex.parameters, pylatex.command and pylatex.numpy. The content of the first two was moved to pylatex.base_classes.command and the content of the last one was moved to pylatex.math.

Removed

  • The add add_multicolumn and add_multirow methods on tabular classes are removed in favor of the much more robust and easier to use MultiRow and MultiColumn classes.
  • Removed unused name argument of the Matrix class.
  • Removed base keyword argument of the Package class. Command should be used when changing of the base is needed.
  • Removed the title, author, date and maketitle arguments from the Document constructor. They were from a time when it was not possible to change the preamble, which is now very easy. They are not so commonly used that they should be part of the main Document object.
  • Removed useless list class constructor arguments for list_spec and pos. These were probably copied from the Tabular class.

Added

  • Lots of documentation!!!!!
  • A float environment base class.
  • An unfinished Quantity class that can be used in conjunction with the quantitities package. https://pythonhosted.org/quantities/
  • Allow supplying a mapper function to dumps_list and the add_row method for tabular like objects.
  • An extra_arguments argument to Command. See docs for description.
  • Add CommandBase, which can be easily subclassed for a command that is used more than once.
  • Add NoEscape string class, which can be used to make sure a raw LaTeX string is not escaped.
  • A __repr__ method, so printing LaTeX objects gives more useful information now.

0.8.0 - 2015-05-23

Added

  • List classes (enumerate, itemize, description)
  • Arguments for plt.savefig
  • SubFigure class for use with subcaption package
  • Command line argument for ./testall.sh to supply a custom python command
  • The generate_tex method is now usable in every class, this makes making snippets even easier.
  • MultiColumn and MultiRow classes for generalized table layouts.

Changed

  • BaseLaTeXNamedContainer now uses the name of the class as the default container_name
  • The Table object is going to be deprecated in favor of the better named Tabular object. This will take a couple of releases.
  • Allow the data keyword argument of containers to be a single item instead of a list. If this is the case it will be wrapped in a list on initialization.

Fixed

  • Propagate packages recursively add packages of sub containers
  • Make cleanup of files Windows compatible
  • Filenames can be paths (foo/bar/my_pdf).
  • Replace filename by filepath in the names of the arguments.
  • Matplotlib support now uses the tmpfile module, this fixes permission issues with the badly previously badly located tmp directory.
  • The temp directory is only removed in generate_pdf when cleaning is enabled

0.7.1 - 2015-03-21

Added

  • Contributing guidelines.

Changed

  • The non keyword argument for filename is now called path instead of filename to show it can also be used with paths.
  • Travis now checks for Flake8 errors.

Fixed

  • Fix a bug in Plt and one in fix_filename that caused an error when using them with some filenames (dots in directories and a file without an extension)

0.7.0 - 2015-03-17

Added

  • Matplotlib support
  • Quite a bit of basic docstrings

Changed

  • Filenames should now be specified to the generate_pdf/generate_tex methods of document. If this is not done the default_filename attribute will be used.

Fixed

0.6.1 - 2015-01-11

Added

  • Travis tests

Fixed

  • Bug in VectorName

0.6 - 2015-01-07

Added

  • Figure class
  • Command and Parameter classes
  • with statement support

0.5 - 2014-06-02

Added

  • Python 2.7 support

0.4.2 - 2014-03-18

Added

  • More table types

0.4.1 - 2014-01-29

Added

  • Partial experimental support for multicol/multirow

Fixed

  • Fix package delegation with duplicate packages