{% extends "layout.html" %}

{% block title %}Cadabra: changes from version 1 to 2{% endblock %}

{% block head %}{%- endblock %}

{% block main %}

<h1>New in version 2.x</h1>
<p>
  Many things changed/improved in version&nbsp;2.x with respect to
  version&nbsp;1.x. The key change is probably that old&nbsp;1.x
  notebooks are <em>not</em> compatible with the&nbsp;2.x
  software. This was done intentionally in order to give maximal
  flexibility to improve the system. It is conceivable that at some
  point an automatic converter will be written, but for the time being
  you will either need to convert the notebook by hand or keep
  version&nbsp;1.x around.
</p>
<p>
  The other user-visible changes include:
</p>
<ul>
  <li>Cadabra manipulations can now programmed using Python. The
  input format is a combination of Cadabra's old LaTeX-based
  format mixed with standard Python, so you still get all the
  benefits of LaTeX-style input.</li>

  <li>You can now do both abstract tensor computations as well as
  component computations. This means that you can manipulate tensorial
  expressions as you did before, and then plug in values for their
  components.</li>

  <li>Various simplification algorithms are now part of the set of
  default rules to apply at every manipulation stage (collecting equal
  terms, for instance). This makes a lot of manipulations look shorter
  and more natural.</li>
  
  <li>The notebook interface now also has facilities for displaying
  plots and other graphical output. You can thus explore the results of
  component computations graphically.</li>

  <li>The user interface now takes into account text scaling settings
  on high-dpi screens, so it the font size in LaTeX output cells
  matches that of the input cells.</li>

  <li>Where version 1.x used to write notebook files in a
  LaTeX-compatible form, the notebook files for 2.x are JSON
  files. This allows for more flexibility, and also enables easier
  conversion to other formats, for instance to show notebooks on the
  web.</li>
</ul>

<p>
  There are also many changes under the hood:
</p>
<ul>
  <li>All algorithms and all properties now live in their own
  \verb|.hh/.cc| files, making it easier to find and debug them.
  </li>
  
  <li>Cadabra now relies solely on libraries which are rather common
  (certainly more common than the old stumbling block \verb|modglue|),
  and is easier to build as it now uses CMake instead of GNU
  autotools.
  </li>

  <li>The user interface code is now cleanly separated into a
  system-independent base and a very thin layer, making
  it <em>much</em> easier to write one for e.g.&nbsp;OS&nbsp;X or for
  a different GUI toolkit like Qt.
</ul>


<h1>Algorithm name changes from version 1 to 2</h1>
<p>
  The main change with respect to algorithm names is that the '@'
  prefix for algorithms is no longer necessary. Algorithms are now
  standard Python functions. They take an expression as their first
  argument, and (optionally) further arguments to determine what to
  do. You can use an underscore to refer to the last entered
  expression, so you can write <code>collect_factors(_)</code> where
  you would previously write <code>@collect_factors(%)</code>.
</p>

<p>
  Where you would previously use an exclamation mark to act at any
  level, you now add the <code>deep=True</code> argument to a
  function. This is the default for many algorithms where that makes
  sense, so you often do not have to add it at all. 
</p>

<p>
  A number of algorithms (and a few properties) have changed name or
  behaviour while going from version 1 to version 2. This was done
  mostly to make naming more consistent and to avoid weird acronyms in
  algorithm names. 
</p>

<h2>Algorithms</h2>
<p>
  In general, all algorithms now have names of the form 'action' or
  'action_object'. 
  <table>
	 <tr>
		<th>old name</th>
		<th>new name</th>
		<th>notes</th>
	 </tr>
	 <tr>
		<td>@prodflatten</td>
		<td>flatten_product</td>
		<td>to avoid abbreviations</td>
	 </tr>
	 <tr>
		<td>@prodsort</td>
		<td>sort_product</td>
		<td>to avoid abbreviations</td>
	 </tr>
	 <tr>
		<td>@rewrite_diracbar</td>
		<td>expand_diracbar</td>
		<td>make meaning more clear</td>
	 </tr>
	 <tr>
		<td>@epsprod2gendelta</td>
		<td>epsilon_to_delta</td>
		<td>avoid obscure names</td>
	 </tr>
	 <tr>
		<td>@pintegrate</td>
		<td>integrate_by_parts</td>
		<td>completely reworked and more powerful</td>
	 </tr>
  </table>
</p>

<h2>Properties</h2>
<p>
</p>


{%- endblock %}
