Feeds:
Posts

## aptitude: Packages code keys

Hello everyone,

Before I install packages, I’d like to check their status using aptitude,

$aptitude search gimp p extremetuxracer-gimp-dev - plugins for GIMP for easy development of e i gimp - The GNU Image Manipulation Program p gimp-cbmplugs - plugins for The GIMP to import/export Comm i A gimp-data - Data files for GIMP i gimp-data-extras - An extra set of brushes, palettes, and gra p gimp-dbg - Debugging symbols for GIMP p gimp-dcraw - GIMP plug-in for loading RAW digital photo p gimp-dds - DDS (DirectDraw Surface) plugin for GIMP p gimp-dimage-color - GIMP plugin to convert Minolta DiMAGE pict p gimp-flegita - Scanner plugin for the GNU image manipulat p gimp-gap - animation package for the GIMP p gimp-gluas - Lua environment plug-in for GIMP i A gimp-gmic - GREYC's Magic for Image Computing - GIMP P p gimp-gutenprint - print plugin for the GIMP v gimp-help - p gimp-help-common - Data files for the GIMP documentation p gimp-help-de - Documentation for the GIMP (German) p gimp-help-en - Documentation for the GIMP (English) p gimp-help-es - Documentation for the GIMP (Spanish) p gimp-help-fr - Documentation for the GIMP (French) p gimp-help-it - Documentation for the GIMP (Italian) p gimp-help-ko - Documentation for the GIMP (Korean) p gimp-help-nl - Documentation for the GIMP (Dutch) p gimp-help-nn - Documentation for the GIMP (Norwegian) p gimp-help-pl - Documentation for the GIMP (Polish) p gimp-help-ru - Documentation for the GIMP (Russian) p gimp-help-sv - Documentation for the GIMP (Swedish) v gimp-helpbrowser - p gimp-lensfun - Gimp plugin to correct lens distortion usi i gimp-plugin-registry - repository of optional extensions for GIMP v gimp-python - p gimp-resynthesizer - Transitional package for gimp-plugin-regis v gimp-save-for-web - p gimp-texturize - generates large textures from a small samp p gimp-ufraw - gimp importer for raw camera images p gtkam-gimp - gtkam gimp plugin to open digital camera p i A libgimp2.0 - Libraries for the GNU Image Manipulation P p libgimp2.0-dev - Headers and other files for compiling plug p libgimp2.0-doc - Developers' Documentation for the GIMP lib p libgimpactutils2.81 - professional 3D Game Multiphysics Library p planetpenguin-racer-gimp-dev - Dummy transition package for extremetuxrac I won’t lie to you… from the very beginning I knew that the i at the first column meant installed… but What about the other keys? I found the answer by looking at the documentation, using $ man aptitude

Here’s is the thing:

Each search result is listed on a separate line. The first character of each line indicates the current state of the package: the most common states are p, meaning that no trace of the package exists on the system, c, meaning that the package was deleted but its configuration files remain on the system, i, meaning that the package is installed, and v, meaning that the package is virtual. The second character indicates the stored action (if any; otherwise a blank space is displayed) to be performed on the package, with the most common actions being i, meaning that the package will be installed, d, meaning that the package will be deleted, and p, meaning that the package and its configuration files will be removed. If the third character is A, the package was automatically installed.

Great!!! Isn’t it?

Cheers!

## Installation and Upgrade of LMDE (Linux Mint DEbian)

Hello there!

Yesterday I installed Linux Mint DEbian (or LMDE) on one of my machines. If you check the Blog Website, the last released version was the 201303. From last March until now, a lot of packages have been updated, therefore it is customary to update (and upgrade) the system right after the installation.

Nonetheless, if you do that… things will go completely wrong.

Fortunately, I found this post on the official Linux Mint forum. Thus I post the steps I follow 1

# apt-get update
# apt-cache policy debian-system-adjustments

if the Installed and Candidate packages are not the same, then install the new one… and then proceed to the upgrade of the system,

# apt-get install debian-system-adjustments
# apt-get dist-upgrade
Cheers.

#### Footnotes:

1You will need root power, or using the sudo command at the beginning of each line

## Installing Inkscape in Debian-based Linux

Hi again!

In the last post I told you about my experience with Inkscape, and now I’ll show you how to install this software using the command line interface (CLI) in dabian-like linux.

Inkscape is include into the repository list, thus, the only thing we need to do is to open a terminal Alt+F2 and type terminal or Ctrl+Alt+t in Ubuntu or Mint.

In the terminal type

 $sudo apt-get install inkscape pstoedit Note that you will need administrator powers. I’ve include the package pstoedit, which will allow you to insert LaTeX formulas… in case you need them, but also allows you to manipulate encapsulated figures, like eps ones. See you soon! DOX Read Full Post » ## Document edition with LaTeX I define myself as a $\LaTeX$ lover. I write all my documents using $\LaTeX$. In this post I’d like to review some features about $\LaTeX$ writing and compilation. Since I’m a Linux user, and don’t have any idea on how does windows work, I’ll restrict myself to Linux OS… particularly Debian based ones, such as, Ubuntu, Mint, and so on. ## Installing the Compiler The easiest way of installing the $\LaTeX$ compiler in Debian based Linux, is through the Terminal, (you should have sudoes power) $ sudo apt-get install texlive

or if you prefer to install all the possible packages,

## First LaTeX Document

From now on, I’d restrict to Emacs editor (which is my favourite), the terminal for compiling the document, and evince as viewer.

NOTE: In case you choose to try emacs yourself, I recommend to check some old post of mine, about an emacs error, about environments, or emacs and LaTeX.

### Three first lines

All $\LaTeX$ document has the three very first lines which define it.

\documentclass{report} \begin{document} \end{document}

The first one define the type of document one’d like to write, some classes are

• report: a book-like document, probably less complex
• book: specially for writing books
• article: for scientific articles
• letter: for writing letters
• beamer: for presentations (see for example this post)
• currvita: for writing curricula vitae
• and many more…

All that is written between the begin and end document is called the body of the document, in there all chapters, sections and so on is included.

A special part of the document is the area between the documentclass and the begin document. This is called preamble, and there all the special request about our document are specified.

### Giving some Format

In order to start giving structure to our document, we need to know the kind of structures defined in $\LaTeX$,

• part: for book and report classes
• chapter: for book and report classes
• section: for book, report and article classes
• subsection: as above
• subsubsection: as above
• paragraph: as above
• subparagraph: as above

by now, we restrict ourself to these three classes, because the other are quite different.

Each structure is understand as a command, thus it must be presided by the backslash and include into the body of the document,

\documentclass{report}

\begin{document}

\chapter{Introduction}

\end{document}

As you might notice, the name of the chapter is enclosed by curly brackets.

NOTE 1: From part to subsubsection, structures are numbered by default. If you’d like to avoid the number, use an asterisk as shown below,

\documentclass{report}

\begin{document}

\chapter*{Introduction}

\end{document}

NOTE 2: A huge difference between a chapter (which I’m calling structure) and environment (such as document), is that the former ends when a new structure is given, while the later has a beginning and an end.

#### Some Environments

There are lots of different environments that might be used while writing a document, such as,

• equation: for writing a single numbered equation. Use equation* for unnumbered ones.
• eqnarray: for writing multiple numbered aligned equations. Use \nonumber for avoid a numbered line, \\ split the line, and && for telling where to align(the sign could be surrounding a sign).
• quote: for quotations.
• itemize: for unnumbered list.
• enumerate: for numbered list.
• figure: for adding numbered and possibly captioned figures.
• table: for adding numbered and possibly captioned tables.
• tabular: for constructing tables.
• minipage: allows to construct a mini-paga on the document, like a post it!
• and a long standing list which cannot be possible cover in a post!

### Compiling the Document

Since $\LaTeX$ is a programming language, one necessarily has to compile the document to get a PDF or PS (human) readable file.

The very fist step is to save the plain text file, the extension must be .tex, as it’s customary, I’ll call our foo.tex. Since compilation usually generates a lot of trash files, the best place to saave the plain text is in a folder dedicated for latex files.

In Emacs the keys

Ctrl-x Ctrl-s

abbreviated by  C-x C-s, saves the file… or buffer in Emacs jargon. The first time you save the file, a name must be given, ex.,  ~/Latex/foo.tex.

NOTE: I assume that a folder Latex was created in your home folder (~).

Once saved, go to the terminal and change the promt to the Latex folder,

 $cd ~/Latex and compile the file with pdflatex command $ pdflatex foo.tex

Finally open the document, with evince,

 \$ evince foo.pdf &

😀 Yeah babe!!!! That’s right… your first document written in $\LaTeX$.

### Writing Equations

I’m a physicist, so I’m used to write lots of equations. I’ll explain some examples,

$$\vec{F} = m \vec{a}$$

results in

$\vec{F} = m \vec{a}$

or the famous Einstein’s relation,

$$E = m c^2$$

results in

$E = m c^2.$

More complicated examples,

$$\frac{\partial^2 }{\partial t^2}x(t) + \omega^2 x(t) = 0\;\Rightarrow\; x(t) = A\sin(\omega t)+ B\cos(\omega t)$$

results in

$\frac{\partial^2 }{\partial t^2}x(t) + \omega^2 x(t) = 0\;\Rightarrow\; x(t) = A\sin(\omega t)+ B\cos(\omega t)$

With this example we opened the gate of Greek alphabet in mathematical mode, and Calculus notation… nevertheless, there exist endless possibilities. I encourage you to check symbols-a4.

The best of the compiled text, is that numbers (of section, chapter, equations, tables, or figures) are assigned by the compiler… therefore, you don’t need to remember those damn numbers. So, How do I refer to an equation?

First, give a name to the equation, with the label command

$$E = m c^2 \label{emc2}$$

and then, call it with the ref command,

As we saw before, the mass relation (\ref{emc2}), bla bla bla...

After the compilation the precise number appears.

NOTE: The same principle work for any other structure of the document or numbered environment.

### And the Title Page?

As you have notice, there’s a huge difference between WYSIWYG editors (Office-like) and WYWIWYG ones (which must be compiled). The maketitle command orders to the compiler to create a title page. The data should be included in the preamble, whilst the command form part of the document body,

\documentclass{report}
\title{My first document in \LaTeX{}}
\author{Dox Drum}
\date{\today}

\begin{document}

\maketitle

\chapter*{Introduction}

The harmonic oscillator is driven by the differential equation,
$$\frac{\partial^2 }{\partial t^2}x(t) + \omega^2 x(t) = 0\;\Rightarrow\; x(t) = A\sin(\omega t)+ B\cos(\omega t).$$

\end{document}

### Listing

As we saw above, list are made with the commands itemize or enumerate, whether you want it to be numbered or not.
Ex.:

\begin{itemize}
\item This got no number
\item Neither does it!
\begin{enumerate}
\item This is number one
\item number two
\end{enumerate}
\item Another with no number
\end{itemize}

which is a numbered list inside a unnumbered one.