Cognitionis
Hector Llorens Portfolio

Latex Installation How-to


Unix

Tex

Latex is installed by default under the vast majority of Linux distribution. Anyway you can install the package downloading it on the Latex project page or using apt-get command in Debian distributions

texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended lmodern latex-beamer

To be able to write in catalan or spanish languages using accents and all this stuff you will need to install through synaptic: latex-ucs (deprecated, now included by default). As well as include in your documents:

IMPORTANT: Remember installing hyphenation on your language ((1) texlive-lang-spanish, (2) babel is already in Ubuntu defaults)

Enum examples style: you may need to install lingmacros.sty (see how to intall new style files)

Beamer

sudo apt-get install latex-beamer

Latex editor

There are several Latex editors.

Gnome: Gedit Latex Plugin (lite and fast option, requires rubber, python, python-gtk… view online FAQ or INSTALL file).

Not installation needed, just download and extract in $HOME/.gnome2/gedit/plugins (also available in Ubuntu repositories , apt-get, but doesn’t work well DO IT MANUALLY).

File tools.xml contains toos. Here is mine:

<tool description=”Cognitionis PDF Special” extensions=”.tex” id=”7″ label=”PDF Special”>
<job mustSucceed=”true” postProcessor=”GenericPostProcessor”>
rm -f $directory/*~ $directory/*.backup $directory/*.log $directory/*.blg $directory/*.bbl $directory/*.aux $directory/*.dvi $directory/*.toc $directory/*.out $directory/*.nav $directory/*.snm
</job>
<job mustSucceed=”true” postProcessor=”LaTeXPostProcessor”>
latex -interaction batchmode -src “$filename”
</job>
<job mustSucceed=”false” postProcessor=”GenericPostProcessor”>
bibtex $shortname.aux
</job>
<job mustSucceed=”true” postProcessor=”LaTeXPostProcessor”>
latex -interaction batchmode -src “$filename”
</job>
<job mustSucceed=”true” postProcessor=”LaTeXPostProcessor”>
latex -interaction batchmode -src “$filename”
</job>
<job mustSucceed=”true” postProcessor=”GenericPostProcessor”>
dvipdf $shortname.dvi
</job>
<job mustSucceed=”true” postProcessor=”GenericPostProcessor”>
rm -f $directory/*~ $directory/*.backup $directory/*.log $directory/*.blg $directory/*.bbl $directory/*.aux $directory/*.dvi $directory/*.toc $directory/*.out $directory/*.nav $directory/*.snm
</job>
</tool>

BUG TO SOLVE IN LAST VERSION 0.2rc1:

After a while I realized that the problem could be inside the file __init__.py,
located at the directory /usr/lib/gedit-2/plugins/GeditLaTeXPlugin/src/base.
Using urllib library and url2pathname() function seemed to solve it.

I'm sending a patch:

----->

--- __init_old__.py	2009-01-07 07:10:00.000000000 -0200
+++ __init__.py	2009-04-20 23:02:12.000000000 -0300
@@ -1008,7 +1008,7 @@
 from os import remove
 from os.path import splitext, basename, dirname, exists, getmtime
 from glob import glob
-
+from urllib import url2pathname

 class File(object):
 	"""
@@ -1025,8 +1025,7 @@
 		"""
 		if uri is None:
 			raise ValueError("URI must not be None")
-
-		self._uri = urlparse(uri)
+		self._uri = urlparse(url2pathname(uri))
 		if len(self._uri.scheme) == 0:
 			self._uri = urlparse("%s%s" % (self._DEFAULT_SCHEME, uri))

----->

(DEPRECATED) File settings.xml contains any profile information. Here is mine:

<profile accel="" icon="pixmaps/compile-pdf.png" name="PDF Special" viewer="gnome-open &quot;%e.pdf&quot;">
	<job command=" rm -f *~ *.backup *.log *.blg *.bbl *.aux *.dvi *.toc *.out *.nav *.snm" processor="default" stopper="True"/>
	<job command="latex -interaction batchmode -src &quot;%f&quot;" processor="latex" stopper="True"/>
	<job command="bibtex &quot;%e.aux&quot;" processor="default" stopper="False"/>
	<job command="latex -interaction batchmode -src &quot;%f&quot;" processor="latex" stopper="True"/>
	<job command="latex -interaction batchmode -src &quot;%f&quot;" processor="default" stopper="True"/>
	<job command="dvipdf &quot;%e.dvi&quot;" processor="default" stopper="True"/>
	<job command=" rm -f *~ *.backup *.log *.blg *.bbl *.aux *.dvi *.toc *.out *.nav *.snm" processor="default" stopper="True"/>
</profile>

Multi-platform: TexMaker (good option)

One of the best for KDE is Kile (also available using apt-get).
TIP1: If you want to write accents or lenguage specific chars in Kile you have to install: sudo apt-get install kile-i18n-es and sudo apt-get install kile-i18n-ca. If don’t work go System->Administration->Language support and enable complex char support. reboot. If not try: vim /etc/default/locale and remove “valencia” and do sudo dpkg-reconfigure locales.
TIP2:If you want to use spell correctors you can install ispell using apt-get (ispell ispanish, ispell icatalan…)

Windows

Tex

Latex is not installed by default. The most common Tex implementation for Windows is Miktex.

Latex editor

The most common Latex editor for Windows is TeXnic-Center.