Feeds:
Posts
Comments

Posts Tagged ‘Software’


On a previous post I described how to change the LaTeX options of the Cadabra notebook.

I collaborate with a colleague, who uses the standard cadabra installation. Therefore, If I write a Cadabra notebook, he needs to pullback the personalised notebook to the standard one. The pullback script can be downloaded here!!!

Author: Oscar Castillo-Felisola

Created: 2014-02-18 Tue 20:20

Emacs 24.3.1 (Org mode 8.2.5h)

Validate

Advertisements

Read Full Post »


Just by playing around with CADABRA, I found out the existence of a super-useful LaTeX package, called breqn, which allows to break long equations at the edge of the page… like the wraping feature of most text editors.

However, when one manipulates really long expressions, I’d like to break these long equations through the page. I’m still looking for this feature… in that case I can improve even more the behaviour of cadabra‘s notebook, when compiling it to LaTeX.

Any suggestions???

Cheers!

Read Full Post »


Goal: a cadabra notebook more LaTeX friendly.

  1. I run a Debian system. Don’t know why, but the original source code in the git repo didn’t work!!!What did I do? I downloaded the code from the Debian repository.
    $ sudo apt-get build-dep cadabra # Install all dependences
    $ mkdir -p ~/Software # Create a folder to download the source
    $ cd ~/Software # Move to the folder
    $ apt-get source cadabra # Download the source code (from Debian)
  2. On the cadabra folder created through the last command line, I looked for the window.cc file and open it
    $ emacs cadabra-1.29/gui/window.cc &
  3. On the window.cc file I changed:
    • The LaTeX package color by the improved xcolor, by changing the string
      << "\\usepackage[usenames]{color}\n"

      by

      << "\\usepackage{xcolor}\n"
    • I added the LaTeX package listings, which improves the verbatim properties (among other things). Right after the mentioned xcolor line, I added the following
      << "\\usepackage{listings}\n"
      << "\\lstset{\n"
      << "  basicstyle=\\small\\color{blue}\\ttfamily,\n"
      << "  breaklines=true,\n"
      << "  columns=fullflexible,\n"
      << "  commentstyle=\\color{gray!60},\n"
      << "  morecomment=[l]{\\%\\%},\n}"

      This allows the Cadabra code to break at the end of the line instead of going out of the page, when compiled to LaTeX (similar to what breqn does on equations).

    • Now, I changed on the DataCell::c_input: case,1 the strings {\\color[named]{Blue}\\begin{verbatim}\n by \\begin{lstlisting}\n, and \n\\end{verbatim}}\n by \n\\end{lstlisting}\n.Far below, the lines with the code if(ln=="{\\color[named]{Blue}\\begin{verbatim}") { should be changed to if(ln=="\\begin{lstlisting}") {, as well as else if(ln=="\\end{verbatim}}") { should be changed to else if(ln=="\\end{lstlisting}") {.
    • Save all the changes
  4. Finally, time to compile
    $ ./configure
    $ make
    $ sudo make install
  5. If your compilation/installation went through, and you try to open an old cadabra notebook (a notebook created with the original cadabra code), the program will complain that the file is not compatible… but I created a small script to transform the old files into new files! Download it here!!USAGE:
    $ ./transf_cadabra oldfile.cnb newfile.cnb

Footnotes:

1This is located a few lines below the lines where the LaTeX preamble is defined

Author: Oscar Castillo-Felisola

Created: 2014-02-18 Tue 10:09

Emacs 24.3.1 (Org mode 8.2.5h)

Validate

Read Full Post »


According to this post, the instructions to install the latest Skype on Debian are

$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo dpkg -i skype-debian_4.1.0.20-1_i386.deb
$ sudo apt-get install -f
$ sudo dpkg -i skype-debian_4.1.0.20-1_i386.deb

I followed these instructions and it worked alright on my second try!… Don’t know why the first time my Skype account was not recognised.

Ok, if it work… just remember that credit is not mine!

Cheers


Author: Oscar Castillo-Felisola

Created: 2013-10-14 Mon 11:25

Emacs 23.4.1 (Org mode 8.2.1)

Validate

Read Full Post »


Hello again! If you are looking for a Differential Geometry tool, a Sage package which is under development is SageManifold. Let’s see how to install it.

  1. Download the package using the link (currently v.0.2). I’d assume it is saved on your Downloads folder.
  2. Assuming you have SAGE installed, and you have created an alias to call it (see my previous post), run the following command
    $ sage -f ~/Downloads/manifolds-0.2.spkg
  3. To generate the documentation (in case you don’t want to or cannot download it), use either of the commands
    $ sage -docbuild sagemanifolds pdf
    $ sage -docbuild sagemanifolds html
  4. In order for using the package, start your WorkSheet with the command line
    from manifolds.all import *
Have a nice calculation!

Read Full Post »


I’m installing SAGE1 v.5.12 on my laptop which runs Debian. Here I describe the procedure.

  1. Since there is no Debian binary package, you should download the source code. Here the link.
  2. When it finishes, open a terminal C-M-t (sorry for the emacs notation, it means Ctrl+Alt+t)
    • Go to the Downloads folder (or the right place where the tar file was saved)
    $ cd ~/Downloads
    • Untar the file
    $ tar xvf sage-5.12.tar
    • Move to the sage-5.12 folder just created
    cd sage-5.12/
  3. Install the dependencies of the first line. Optionally install LaTeX and ImageMagick using the second line. (NOTE: superuser power is needed to run the below code)
    $ sudo apt-get install -y gcc perl m4 dpkg-dev 
    $ sudo apt-get install -y texlive imagemagick
  4. In machines with more than one core, the instruction to perform parallel compilation is (yo should change the “4” by the amount of cores in your machine)
    $ export MAKE="make -j4"
  5. Now is time to compile the code.For a local compilation, run
    make

    For a
    You can relax, go and have a coffee, because the compilation may longs one hour (or more depending of the machine specifications).

  6. For running the software after the installation is complete, run (on the SAGE directory) the command
    $ ./sage
    • I don’t like to move to the SAGE directory every time and then run the ./sage command, therefore, I tend to create an alias on my ~/.bash_aliases file,
      $ echo "alias sage="sh ~/Downloads/sage-5.12/sage" >> ~/.bash_aliases

      This command adds the line alias sage="sh ~/Downloads/sage-5.12/sage at the end of the file ~/.bash_aliases, you can do it by hand with your favourite editor (gedit, emacs, nano, vim, …)

    • If you refresh your terminal (or open a new one) you just have to run the command sage to start SAGE. Additionally, the notebook environment can be started directly from the terminal by using the flag -n,
      $ sage -n

Hope you find this post useful! Remember to leave your comments or suggestions.

Enjoy!

Footnotes:

1SAGE is an open source mathematical software which allows numerical and symbolic manipulations

Read Full Post »


  • Create a folder called Mathematica on the /opt/ directory
    $ sudo mkdir -p /opt/Mathematica
  • Move the installed file to the created folder
    $ sudo mv MathemacicaInstaller.sh /opt/Mathematica
  • Run the Installer
    $ sudo sh MathemacicaInstaller.sh
  • After the installation you just have to register your Mathematica software.

Author: Oscar Castillo-Felisola

Created: 2013-09-16 Mon 13:32

Emacs 23.4.1 (Org mode 8.0.7)

Validate XHTML 1.0

Read Full Post »

Older Posts »