viernes, 3 de febrero de 2012

Installing TeXLive 2010 in Ubuntu 10.04 , 10.10 and 11.04



The following tutorial will help you install TeXLive 2010 on Ubuntu. Procedure is simple, but for some time I didn’t realize what went wrong even after a successful installation. I checked the installed texlive packages in the Synaptic Package Manager and found that the older version packages still existed which I felt conflicted the current installations. I tried completely removing the old packages and BINGO! a fresh install of TeXLive 2010 worked seamlessly!
Here is what I did. Check for any previous TeXLive packages installed in the Synaptic Package Manager. If you find, then mark them for complete removal and uninstall them by clicking the Apply button.
Synaptic Package Manager
Synaptic Package Manager
The remainder of this article is afresh installation of TeXLive 2010.
  • Download the TeXLive 2010 iso image here.
  • Once downloaded, mount the iso in some folder, say /media/iso
sudo mkdir /media/iso
sudo mount -o loop /home/milind/Downloads/TeXLive2010.iso /media/iso
  • Now start installation.
cd /media/iso
sudo ./install-tl
  • Once the installation is complete set the MANPATH, INFOPATH and most importantly the PATH variables along with the MANPATH mapping.
sudo gedit /etc/bash.bashrc
  • Add the following lines to the end of the file as shown in the following figure.
MANPATH=$MANPATH:/usr/local/texlive/2010/texmf/doc/man
export MANPATH
INFOPATH=$INFOPATH:/usr/local/texlive/2010/texmf/doc/info
export INFOPATH
PATH=$PATH:/usr/local/texlive/2010/bin/i386-linux
export PATH
sudo gedit /etc/bash.bashrc
sudo gedit /etc/bash.bashrc
  • Finally the MANPATH mapping
sudo gedit /etc/manpath.config
  • Find the section having # set up PATH to MANPATH mapping. At the end of this section add the following line.
MANPATH_MAP    /usr/local/texlive/2010/bin/i386-linux    /usr/local/texlive/2010/texmf/doc/man 
Manpath Mapping
sudo gedit /etc/manpath.config
Now that the MANPATH mapping is done we can close the gedit window. As a good practice the mounted ISO is unmounted as follows.
cd ~
sudo umount /media/iso
Now restart your system and this sets up TeXLive 2010 in your Ubuntu system. Lets test if it works.
Here’s a sample.tex file.
%sample.tex
\documentclass[]{report}

\title{Title of my document}
\author{Name of the author}
\date{\today}

\begin{document}

\maketitle
\tableofcontents

\chapter{First chapter}
My document starts here.

\section{First Section}
Some text here, also a few articles \cite{latexbook} \cite{btxdoc} that I want to cite.

\subsection{Subsection1}
More text.

\subsubsection{Subsubsection1}
More and more text.

\bibliographystyle{IEEEtran}
\bibliography{sampleref}
\nocite{*}

\end{document}
A sampleref.bib file having a few references in the bibtex format
%sampleref.bib
@MISC{primes,
   author = "Charles Louis Xavier Joseph de la Vall{\'e}e Poussin",
   note = "A strong form of the prime number theorem, 19th century",
   year = 1879
   }

@BOOK{texbook,
   author = "Donald E. Knuth",
   title= "The {{\TeX}book}",
   publisher = "Addison-Wesley",
   year = 1984
   }

@BOOK{latexbook,
   author = "Leslie Lamport",
   title = "{\LaTeX \rm:} {A} Document Preparation System",
   publisher = "Addison-Wesley",
   year = 1986
   }

@UNPUBLISHED{btxdoc,
   author = "Oren Patashnik",
   title = "{Using BibTeX}",
   note = "Documentation for general BibTeX users",
   month = jan,
   year = 1988
   }

@BOOK{strunk,
   author = "Strunk, Jr., William and E. B. White",
   title = "The Elements of Style",
   publisher = "Macmillan",
   edition = "Third",
   year = 1979
   }

@UNPUBLISHED{btxhak,
   author = "Patashnik Oren",
   title = "Designing BibTeX Styles",
   note = "The part of BibTeX's documentation
                            that's not meant for general users",
   month = jan,
   year = 1988
   }

@book{vanleunen,
   title = "A Handbook for Scholars",
   author = "Mary-Claire van Leunen",
   publisher = "Knopf",
   year = "1979"
   }

@ARTICLE{Zurek:1993,
   AUTHOR  = {Zurek, R. W. and Martin, L. J.},
   TITLE   = {Interannual Variability of planet-encircling dust activity on {M}ars},  
   YEAR    = {1993},
   JOURNAL = {jgr},
   VOLUME  = {98},
   NUMBER  = {E2},
   PAGES   = {3247--3259}
}

@Article{Narendra_1990,
  author =       {K.S.Narendra and K.Parthsarathy},
  title =        {Identification and Control of Dynamical System
                  using Neural Networks},
  journal =      "IEENN",
  year =         {1990},
  volume =    {1},
  number =    {1},
  month =     {},
  pages =     {4-27},
  note =      {},
  annote =    {}
}
I am having these two files in /home/milind/Desktop/Sample \TeX/ folder. Here’s what we do in the terminal.
cd /home/milind/Desktop/Sample\ TeX/
latex sample.tex
latex sample.tex
bibtex sample.aux
bibtex sample.aux
latex sample.tex
latex sample.tex
latex sample.tex
latex sample.tex
dvips sample.dvi -o sample.ps
ps2pdf sample.ps
And here is what we get!!!
That’s all folks :-)

No hay comentarios:

Publicar un comentario