<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN"
"dtd/kdex.dtd" [

  <!ENTITY kappname "&cantor;">
  <!ENTITY package "kdeedu">
  <!ENTITY % addindex "IGNORE">
  <!ENTITY % English "INCLUDE">
]>
<book lang="&language;">

<bookinfo>
<title>The &cantor; Handbook</title>

<authorgroup>
<author>
<personname>
<firstname>Alexander</firstname>
<surname>Rieder</surname>
</personname>
<email>alexanderrieder@gmail.com</email>
</author>
<!-- TRANS:ROLES_OF_TRANSLATORS -->
</authorgroup>

<copyright>
<year>2009</year>
<holder>Alexander Rieder</holder>
</copyright>
<legalnotice>&FDLNotice;</legalnotice>

<date>2011-11-08</date>
<releaseinfo>0.3</releaseinfo>

<abstract>
<para>
&cantor; is an application, aimed at providing a
nice worksheet view to other Free Software Math packages.
</para>
</abstract>

<keywordset>
<keyword>KDE</keyword>
<keyword>kdeedu</keyword>
<keyword>mathematics</keyword>
<keyword>math</keyword>
<keyword>Cantor</keyword>
<keyword>Sage</keyword>
<keyword>R</keyword>
<keyword>Maxima</keyword>
</keywordset>

</bookinfo>

<chapter id="introduction">
<title>Introduction</title>

<para>
&cantor; is an application to allow you to you use your favorite
mathematical applications from within an elegant &kde;-integrated
Worksheet Interface. It provides dialogs to assist with common tasks
and allows you to share your worksheets with others.
</para>
</chapter>

<chapter id="using-kapp">
<title>Using &cantor;</title>

<para>
Screenshot:
<screenshot>
<screeninfo>Here is a screenshot of &cantor;</screeninfo>
	<mediaobject>
	  <imageobject>
	    <imagedata fileref="screenshot.png" format="PNG"/>
	  </imageobject>
	  <textobject>
	    <phrase>Screenshot</phrase>
	  </textobject>
	</mediaobject>
</screenshot>
</para>


<sect1 id="kapp-features">
<title>&cantor; features</title>
<itemizedlist>
  <listitem><para>Intuitive worksheet view for evaluating expressions.</para></listitem>
  <listitem><para>Results of graph plotting shown inside the worksheet.</para></listitem>
  <listitem><para>Easy plugin-based structure to allow different backends to be added.</para></listitem>
  <listitem><para>GetHotNewStuff integration to allow example worksheets to be downloaded (or uploaded.)</para></listitem>
  <listitem><para>Mathematical formula typesetting using LaTeX.</para></listitem>
  <listitem><para>Backend-aware syntax highlighting.</para></listitem>
  <listitem><para>Plugin-based assistant dialogs to help with common tasks, such as integrating a function, or entering a matrix.</para></listitem>
</itemizedlist>
</sect1>

<sect1 id="backends">
<title>The &cantor; backends</title>
<para>
  &cantor; offers you several choices for the backends you wish to use with it.
  The choice to make depends on what you want to achieve.
</para>
<para>
  Currently the following backends are available:
  <variablelist>
    <varlistentry>
      <term>Sage:</term>
      <listitem>
	<para>
	  Sage is a free open-source mathematics software system licensed under the GPL.
	  It combines the power of many existing open-source packages, within a common Python-based interface.
	  See <ulink url="http://sagemath.org">http://sagemath.org</ulink> for more information.
	</para>
	</listitem>
    </varlistentry>
    <varlistentry>
      <term>Maxima:</term>
      <listitem>
	<para>
	  Maxima is a system for the manipulation of symbolic and numeric expressions,
	  including differentiation, integration, Taylor series, Laplace transforms,
	  ordinary differential equations, systems of linear equations, polynomials, sets,
	  lists, vectors, matrices, and tensors. Maxima yields high-precision numeric results
	  by using exact fractions, arbitrary precision integers, and variable precision
	  floating point numbers. Maxima can plot functions and data in two and three dimensions.
	  See <ulink url="http://maxima.sourceforge.net">http://maxima.sourceforge.net</ulink> for more information.
	</para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>R:</term>
      <listitem>
	<para>
	  R is a language and environment for statistical computing and graphics, similar to the S language and environment.
	  It provides a wide variety of statistical (linear and nonlinear modelling,
	  classical statistical tests, time-series analysis, classification, clustering, ...)
	  and graphical techniques, and is highly extensible. The S language is often the
	  vehicle of choice for research in statistical methodology,
	  and R provides an open-source route to this.
	  See <ulink url="http://www.r-project.org">http://www.r-project.org</ulink> for more information.
	</para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>KAlgebra:</term>
      <listitem>
	<para>
	  KAlgebra is a MathML-based graph calculator, that ships with KDE Education project.
	  See <ulink url="http://edu.kde.org/kalgebra/">http://edu.kde.org/kalgebra/</ulink> for more information.
	  </para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>Qalculate!:</term>
      <listitem>
  <para>
    Qalculate! is not your regular software replication of the cheapest
    available calculator. Qalculate! aims to make full use of the superior
    interface, power and flexibility of modern computers. The center of
    attention in Qalculate! is the expression entry. Instead of entering each
    number in a mathematical expression separately, you can directly write the
    whole expression and later modify it. The interpretation of expressions is
    flexible and fault tolerant, and if you nevertheless do something wrong,
    Qalculate! will tell you so. Not fully solvable expressions are however not
    errors. Qalculate! will simplify as far as it can and answer with an
    expression. In addition to numbers and arithmetic operators, an expression
    may contain any combination of variables, units, and functions.
    See <ulink url="http://qalculate.sourceforge.net/">http://qalculate.sourceforge.net/</ulink> for more information.
  </para>
  </listitem>
    </varlistentry>
    <varlistentry>
      <term>Scilab:</term>
      <listitem>
  <para>
    Scilab is an free software, cross-platform numerical computational package
    and a high-level, numerically oriented programming language.
  </para>
  <para>Scilab is distributed under CeCILL license (GPL compatible).
    See <ulink url="http://www.scilab.org/">http://www.scilab.org/</ulink> for more information.
  </para>
  <warning>
    <para>
      You need Scilab version 5.4 or higher to be installed in your system to make this backend usable.
    </para>
    <para>
      Scilab version of the master branch of the Scilab's repository is compatible.
    </para>
  </warning>
  </listitem>
    </varlistentry>
  </variablelist>
</para>
</sect1>

<sect1 id="workspace">
<title>The &cantor; Workspace</title>
<para>
<screenshot>
  <screeninfo>Screenshot of the &cantor; Workspace</screeninfo>
  <mediaobject>
    <imageobject>
      <imagedata fileref="screenshot.png" format="PNG"/>
    </imageobject>
    <textobject>
      <phrase>Screenshot of the &cantor; Workspace</phrase>
    </textobject>
  </mediaobject>
</screenshot>
</para>
<para>
  The Worksheet interface of &cantor; consists of three parts:
  <orderedlist>
    <listitem><para>The tab bar, where you can switch through the open worksheets;</para></listitem>
    <listitem><para>A help panel, where help for a specific command is displayed if you enter "? command";</para></listitem>
    <listitem><para>The worksheet itself.</para></listitem>
  </orderedlist>
</para>
<sect2 id="worksheet">
<title>The Worksheet</title>
<para>
  The worksheet is the basic area for working with &cantor;.  Using it, you can enter
  expressions, allow the backend to perform calculations, and look at the results.
  The commands the worksheets accept depend on the chosen backend, so you should
  learn the appropriate backend syntax (the Show Help button takes you there directly).
  If you know the command, but you need additional information, you can type "? command",
  and contextual help will appear on the right of the worksheet.
  If you want to see some example worksheets, you can go to <guimenuitem>Download Example Worksheets</guimenuitem>
  in the <guimenu>File</guimenu> menu, and download worksheets other users have published.
</para>
<sect3 id="worksheet-settings">
  <title>Settings</title>
  <para>
    The <guimenu>Settings</guimenu> menu allows you to change some settings of the appearance of your
    current worksheet.
  </para>
  <variablelist>
    <varlistentry>
      <term>Typesetting using LaTeX</term>
      <listitem>
	<para>
	  This setting changes the way results are presented to you. If enabled, it passes the result through
	  the LaTeX system, to produce visually appealing formulas. For example, <quote>3*x^2*sqrt(2)*x+2/3</quote> becomes
	  <inlinemediaobject>
	      <imageobject>
		<imagedata fileref="latex_formula.png" format="PNG"/>
	      </imageobject>
	      <textobject><phrase>3*x^2*sqrt(2)*x+2/3</phrase></textobject>
	  </inlinemediaobject>
	</para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>Syntax Highlighting</term>
      <listitem>
	<para>
	  Syntax Highlighting increases the readability of code, by highlighting
	  keywords, or matching brackets in different colors.
	</para>
      </listitem>
    </varlistentry>
    <varlistentry>
      <term>Completion</term>
      <listitem>
	<para>
	  When this is enabled, &cantor; will show you possible completions
	  for the command you are currently typing when you press the Tab-key. If there is only one choice
	  remaining, it will insert the rest of the command for you.
	</para>
      </listitem>
    </varlistentry>
  <varlistentry>
    <term>Line Numbers</term>
    <listitem>
      <para>
	This setting controls whether the different expressions should have a number in front.  This allows you
	to recall older results - in Maxima, for instance, this is done with the <quote>%O1</quote> command.
      </para>
    </listitem>
  </varlistentry>
  </variablelist>
</sect3>
</sect2>
</sect1>
<!--
<sect1 id="assistant-dlgs">
<title>The assistant dialogs</title>
TODO add screenshots and descriptions of each assistant
</sect1>
-->
</chapter>
<!--this chapter is boring and completely useless, only default menu items well known to any kde user-->
<chapter id="commands">
<title>Command Reference</title>

<sect1 id="kapp-mainwindow">
<title>The main &cantor; window</title>

<sect2 id="file-menu">
<title>The File Menu</title>
<para>
<variablelist>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
</shortcut>
<guimenu>File</guimenu>
<guimenuitem>New</guimenuitem>
</menuchoice></term>
<listitem><para><action>Creates a new worksheet with the default backend.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>File</guimenu>
<guisubmenu>New</guisubmenu>
<guimenuitem><replaceable>Backend</replaceable></guimenuitem>
</menuchoice></term>
<listitem><para><action>Creates a new worksheet with the chosen backend.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>O</keycap></keycombo>
</shortcut>
<guimenu>File</guimenu>
<guimenuitem>Open</guimenuitem>
</menuchoice></term>
<listitem><para><action>Opens the chosen worksheet that was saved earlier.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>File</guimenu>
<guimenuitem>Download Example Worksheets</guimenuitem>
</menuchoice></term>
<listitem><para><action>Opens the dialog to download examples uploaded by other &cantor; users with
 <ulink url="http://userbase.kde.org/Special:MyLanguage/Glossary#Get_Hot_New_Stuff">GetHotNewStuff</ulink>.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>File</guimenu>
<guimenuitem>Open Example</guimenuitem>
</menuchoice></term>
<listitem><para><action>Opens the dialog to choose an example to load.</action> The examples should be downloaded with <menuchoice><guimenu>File</guimenu>
<guimenuitem>Download Example Worksheets</guimenuitem></menuchoice> beforehand.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>S</keycap></keycombo>
</shortcut>
<guimenu>File</guimenu>
<guimenuitem>Save</guimenuitem>
</menuchoice></term>
<listitem><para><action>Saves the current worksheet.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>File</guimenu>
<guimenuitem>Save As...</guimenuitem>
</menuchoice></term>
<listitem><para><action>Allows saving the current worksheet with a new name.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>File</guimenu>
<guimenuitem>Export to LaTeX</guimenuitem>
</menuchoice></term>
<listitem><para><action>Allows saving the current worksheet as a LaTeX document.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>File</guimenu>
<guimenuitem>Publish Worksheet</guimenuitem>
</menuchoice></term>
<listitem><para><action>Opens the dialog to publish your current worksheet and make it available to other &cantor; users through
 <ulink url="http://userbase.kde.org/Special:MyLanguage/Glossary#Get_Hot_New_Stuff">GetHotNewStuff</ulink>.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>P</keycap></keycombo>
</shortcut>
<guimenu>File</guimenu>
<guimenuitem>Print</guimenuitem>
</menuchoice></term>
<listitem><para><action>Opens the printing dialog for the current worksheet.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>File</guimenu>
<guimenuitem>Run Script</guimenuitem>
</menuchoice></term>
<listitem><para><action>Allows to load and run the batch scripts for the current backend.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>W</keycap></keycombo>
</shortcut>
<guimenu>File</guimenu>
<guimenuitem>Close</guimenuitem>
</menuchoice></term>
<listitem><para><action>Closes the current worksheet.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>Q</keycap></keycombo>
</shortcut>
<guimenu>File</guimenu>
<guimenuitem>Quit</guimenuitem>
</menuchoice></term>
<listitem><para><action>Quits</action> &cantor;</para></listitem>
</varlistentry>
</variablelist>
</para>

</sect2>

<sect2 id="view-menu">
<title>The View Menu</title>
<para>
<variablelist>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>+</keycap></keycombo>
</shortcut>
<guimenu>View</guimenu>
<guimenuitem>Zoom In</guimenuitem>
</menuchoice></term>
<listitem><para><action>Zoom in</action> the current worksheet by 10%.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>-</keycap></keycombo>
</shortcut>
<guimenu>View</guimenu>
<guimenuitem>Zoom Out</guimenuitem>
</menuchoice></term>
<listitem><para><action>Zoom out</action> the current worksheet by 10%.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>View</guimenu>
<guimenuitem>Show Script Editor</guimenuitem>
</menuchoice></term>
<listitem><para><action>Opens the batch script editor window for the current backend.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>View</guimenu>
<guisubmenu>Panels</guisubmenu>
<guimenuitem>Help</guimenuitem>
</menuchoice></term>
<listitem><para><action>Toggles</action> the visibility of the <guilabel>Help</guilabel> sidebar.</para></listitem>
</varlistentry>
</variablelist>
</para>
</sect2>

<sect2 id="worsheet-menu">
<title>The Worksheet Menu</title>
<para>
<variablelist>
<varlistentry>
<term><menuchoice>
<guimenu>Worksheet</guimenu>
<guimenuitem>Evaluate Worksheet</guimenuitem>
</menuchoice></term>
<listitem><para><action>Triggers</action> the evaluation of the whole worksheet.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Shift;<keycap>Return</keycap></keycombo>
</shortcut>
<guimenu>Worksheet</guimenu>
<guimenuitem>Evaluate Entry</guimenuitem>
</menuchoice></term>
<listitem><para><action>Triggers</action> the current entry evaluation.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Ctrl;<keycap>Return</keycap></keycombo>
</shortcut>
<guimenu>Worksheet</guimenu>
<guimenuitem>Insert Command Entry</guimenuitem>
</menuchoice></term>
<listitem><para><action>Inserts a new command entry below the current cursor position.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>Worksheet</guimenu>
<guimenuitem>Insert Text Entry</guimenuitem>
</menuchoice></term>
<listitem><para><action>Inserts a new text entry below the current cursor position.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>Worksheet</guimenu>
<guimenuitem>Insert Image</guimenuitem>
</menuchoice></term>
<listitem><para><action>Inserts the image template below the current cursor position.</action> You will need to click with &RMB; at the template to configure the image details.</para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<guimenu>Worksheet</guimenu>
<guimenuitem>Insert Page Break</guimenuitem>
</menuchoice></term>
<listitem><para><action>Inserts the page break below the current cursor position.</action></para></listitem>
</varlistentry>
<varlistentry>
<term><menuchoice>
<shortcut>
<keycombo action="simul">&Shift;<keycap>Del</keycap></keycombo>
</shortcut>
<guimenu>Worksheet</guimenu>
<guimenuitem>Remove current Entry</guimenuitem>
</menuchoice></term>
<listitem><para><action>Removes</action> current entry from the worksheet.</para></listitem>
</varlistentry>
</variablelist>
</para>
</sect2>

<sect2 id="settings-menu">
<title>The Settings Menu</title>
<para>
This menu contains standard &kde; <guimenu>Settings</guimenu> items, as well as the items described in <link linkend="worksheet-settings">Settings section</link>.
</para>
</sect2>

<sect2 id="help-menu">
<title>The Help Menu</title>

&help.menu.documentation;

</sect2>

</sect1>
</chapter>

<chapter id="developers">
<title>Developer's Guide to &cantor;</title>

<para>
&cantor; is easily extendable by plugins. You can write
<variablelist>
  <varlistentry>
    <term>Backends:</term>
    <listitem>
      <para>
	A new backend enables you to use the &cantor; interface with a different program.
      </para>
    </listitem>
  </varlistentry>
  <varlistentry>
    <term>Assistants:</term>
    <listitem>
      <para>
	Assistants provide dialogs to allow common tasks to be automated (such entering a matrix or running a script.)
      </para>
    </listitem>
  </varlistentry>
</variablelist>
</para>
<para>
At present, there are no special developer tutorials or API documentation, so if you want to write a plugin you will have to read through the sources.
All interface definitions are in the lib directory.  For some example implementations, look at the plugins shipped with &cantor;.
</para>

</chapter>

<chapter id="faq">
<title>Questions and Answers</title>

&reporting.bugs;
&updating.documentation;

<qandaset id="faqlist">
<qandaentry>
  <question><para>The Menu Item <guimenuitem>Typeset using LaTeX</guimenuitem> is not available</para></question>
  <answer><para>Not every Backend supports every option.</para></answer>
<!-- which backends support "Typeset using LaTeX"-->
</qandaentry>
<qandaentry>
  <question><para>I have installed Sage/Maxima, but the appropriate backend does not appear.</para></question>
  <answer>
    <para>
      One possible explanation is that &cantor; did not correctly detect the location. Go to the Settings dialog and change
      the Path to the appropriate application.
    </para>
  </answer>
</qandaentry>
<qandaentry>
  <question><para>What a peculiar name - what does it have to do with mathematics?</para></question>
  <answer><para>Cantor is named after the German mathematician Georg Cantor, the creator of set theory.</para></answer>
</qandaentry>
</qandaset>
</chapter>

<chapter id="credits">

<title>Credits and License</title>

<para>
&cantor;
</para>
<para>
Program copyright 2009-2011 Alexander Rieder <email>alexanderrieder@gmail.com</email>
</para>

<para>
Documentation Copyright &copy; 2009-2011 Alexander Rieder <email>alexanderrieder@gmail.com</email>
</para>

<!-- TRANS:CREDIT_FOR_TRANSLATORS -->

&underFDL;               <!-- FDL: do not remove -->
&underGPL;        	 <!-- GPL License -->
</chapter>

<appendix id="installation">
<title>Installation</title>

<sect1 id="getting-kapp">
<title>How to obtain &cantor;</title>

&install.intro.documentation;

</sect1>

<sect1 id="requirements">
<title>Requirements</title>

<para>
In order to successfully use &cantor;, you need &kde; 4.
If you want support for type-setting to be enabled, you need to install LaTeX and LibSpectre.
To use the different Backends, the appropriate math package is required.
</para>

<!--
<para>
All required libraries as well as &cantor; itself can be found
on <ulink url="ftp://ftp.kapp.org">The &cantor; home page</ulink>.
</para>
-->


<!-- For a list of updates, you may refer to the application web site
or the ChangeLog file, or ... -->
<!--
<para>
You can find a list of changes at <ulink
url="http://apps.kde.org/kapp">http://apps.kde.org/kapp</ulink>.
</para>
-->
</sect1>

<sect1 id="compilation">
<title>Compilation and Installation</title>

&install.compile.documentation;

</sect1>

<sect1 id="configuration">
<title>Configuration</title>

<para>
  Depending on your system, you may need to adjust the paths to the
  different applications used by &cantor;.
</para>

</sect1>

</appendix>

&documentation.index;
</book>

<!--
Local Variables:
mode: xml
sgml-minimize-attributes:nil
sgml-general-insert-case:lower
sgml-indent-step:0
sgml-indent-data:nil
End:

vim:tabstop=2:shiftwidth=2:expandtab
kate: space-indent on; indent-width 2; tab-width 2; indent-mode none;
-->
