Hidden Treasures

Found in France, Back to Korea. Long Live FOSS!

The quickest installation of the TeXLive 2013 in Ubuntu
starlinq


Installation of the TeXLive 2013 in Ubuntu by vs227sc




Use Sweave with TeXmaker and make SyncTeX work properly with it
starlinq





Although there are many materials online relating to Sweave and its workflow, I could not find any source on how to make SyncTeX work properly with my favorite TeXmaker editor. I hope that you know the Sweave (http://www.stat.uni-muenchen.de/~leisch/Sweave/) is a tool that allows to embed the R code for complete data analyses in LaTeX documents.

If you use TeXmaker as your main editor of Sweave files (*.Rnw), it is time now to fix the annoying problem with SyncTeX and Sweave. Have ever compiled an .Rnw (Sweave) file to a PDF and tried to reverse sync the PDF using SyncTeX with the source in TeXmaker or other Sweave compatible editor? The result was always the same: TeXmaker/editor opens the .tex file instead of .Rnw source. The problem was even worse, if you did not notice that and you could continue editing the .tex file instead of .Rnw! Although TeXmaker supports SyncTeX, the synctex information (in the .synctex.gz file) was originally designed to work only with .tex sources. Postprocessing of the .synctex.gz file is necessary to fix this.
Due to efforts of Duncan Murdoch who developed the patchDVI R package, we can fix it and make it possible to jump from compiled PDF file directly to the .Rnw source of an Sweave document. After many trial and error attempts I have found a configuration that does work with TeXmaker. Below is my configuration that is successful for the following software setup:

  • Ubuntu 12.10 32bit

  • TeXmaker v.4.0.4 (compiled with Qt 4.8.3 and Poppler 0.20.4)

  • pdfLaTeX / pdfTeX, Version 3.1415926-2.5-1.40.14 from TeX Live 2013 distribution (format=pdflatex 2013.7.15)

  • R (R version 3.0.2 (2013-09-25) -- "Frisbee Sailing")

  • patchDVI R package version 1.9 (works with Sweave and document previewers to facilitate editing: it modifies the links that LaTeX puts into the output so that they refer to the original source)

Procedure:


  1. I assume that you have R, LaTeX and TeXmaker installed.

  2. Install the patchDVI package ( the package is available online at http://r-forge.r-project.org/projects/sweavesearch ) Start R, and run the command:

  3. Open TeXmaker and go to Options menu -> Configure Texmaker -> Quick Build. Select Quick Build command 'User' and copy the following:

  4. In all Sweave (.Rnw) documents, the following lines must be included:

  5. Open your .Rnw file in TeXmaker and compile it to PDF using F1 user command

  6. When PDF is successfully compiled, check whether sync works or not by: In TeXmaker, set cursor to the word and open right-click mouse menu, select "Jump to pdf", if everything is Okay, the viewer shows a line with the word. Holding key, double-click any word n PDF viewer, the cursor moves to right place of the .Rnw source file.

Wow! It works!


The quickest installation of the TeX Live (TeXLive) 2013 in Ubuntu (32-bit)
starlinq

If you want to have a modern and advanced typesetting tool, install the most recent and complete LaTeX distribution - TeX Live 2013!

Pre-install: acquiring the ISO using the torrent network

Go to http://www.tug.org/texlive/acquire-iso.html page. The ISO image is available as texlive2013.torrent (currently it is the following link: http://www.tug.org/texlive/files/texlive2013.torrent)
Start it with your torrent client. The ISO image is quite large file (with .iso extension) but the download speed due to many peers in my case was really high (sometimes almost 2 MB/s).
Let's assume that the ISO file will be saved to ~\Downloads directory.

Pre-install: cleanup

If you're installing when you already have an old installation (e.g. TeX Live 2012), be sure to completely remove your old installation. By default, this would be in these two directories:


$ sudo rm -rf /usr/local/texlive/2012
$ sudo rm -rf ~/.texlive2012

Mount an ISO Image


Open terminal window (Ctrl+Alt+T) and create a mount point:

$ sudo mkdir /mnt

If the downloaded ISO image (e.g. .iso) is in the Downloads directory, change the current directory to

$ cd ~/Downloads


If you want to mount the image to make the contents available for installation or browsing, type the following to mount it:

 

$ sudo mount -t iso9660 -o ro,loop,noauto texlive2013-20130530.iso /mnt

Go to /mnt directory
$ cd /mnt

Installation


You do not need to be root to install, use, or manage TeX Live, however I prefer to install as administrator.

Once you have the software, run the install-tl script with adiministrative previlegies to install:


$ sudo ./install-tl


Loading ./tlpkg/texlive.tlpdb

Installing TeX Live 2013 from: .

Platform: i386-linux => 'Intel x86 with GNU/Linux'

Distribution: inst (compressed)

Directory for temporary files: /tmp

======================> TeX Live installation procedure <=====================

======> Letters/digits in <angle brackets> indicate <=======
======> menu items for commands or options <=======

Detected platform: Intel x86 with GNU/Linux
<B> binary platforms: 1 out of 13

<S> set installation scheme (scheme-full)

<C> customizing installation collections


44 collections out of 45, disk space required: 3314 MB

<D> directories:


TEXDIR (the main TeX directory):


/usr/local/texlive/2013


TEXMFLOCAL (directory for site-wide local files):


/usr/local/texlive/texmf-local


TEXMFSYSVAR (directory for variable and automatically generated data):


/usr/local/texlive/2013/texmf-var


TEXMFSYSCONFIG (directory for local config):


/usr/local/texlive/2013/texmf-config


TEXMFVAR (personal directory for variable and automatically generated data):


~/.texlive2013/texmf-var


TEXMFCONFIG (personal directory for local config):

~/.texlive2013/texmf-config


TEXMFHOME (directory for user-specific files):


~/texmf

<O> options:


[ ] use letter size instead of A4 by default
[X] allow execution of restricted list of programs via \write18
[X] create all format files
[X] install macro/font doc tree
[X] install macro/font source tree
[X] after install, use tlnet on CTAN for package updates


<V> set up for portable installation


Actions:


<I> start installation to hard disk
<H> help
<Q> quit


Enter command: I


Time used for installing the packages: 08:37


...
[... when done, see below for post-install ...]
...




See
/usr/local/texlive/2013/index.html
for links to documentation. The TeX Live web site
contains updates and corrections: http://tug.org/texlive.

TeX Live is a joint project of the TeX user groups around the world;
please consider supporting it by joining the group best for you. The
list of user groups is on the web at http://tug.org/usergroups.html.

Add /usr/local/texlive/2013/texmf-dist/doc/man to MANPATH, if not dynamically found.
Add /usr/local/texlive/2013/texmf-dist/doc/info to INFOPATH.

Most importantly, add /usr/local/texlive/2013/bin/i386-linux
to your PATH for current and future sessions.

Welcome to TeX Live!


Logfile: /usr/local/texlive/2013/install-tl.log


Update the installation

Type the command

$ sudo /usr/local/texlive/2013/bin/i386-linux/tlmgr update --self --all


As alternative, if you want to update the files using GUI, use the following command

$ sudo /usr/local/texlive/2013/bin/i386-linux/tlmgr -gui

In the window, in top right corner first press 'Load default' button and after getting an address of the repository, press 'Update all installed' button, close the window or exit.

Setting environment variables

Add new paths to your environment variables. Open the terminal and type


$ gedit ~/.profile


then add finally the lines


PATH=/usr/local/texlive/2013/bin/i386-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2013/texmf-dist/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2013/texmf-dist/doc/info:$INFOPATH; export INFOPATH


Finally do the MANPATH mapping, open the terminal and type


$ sudo gedit /etc/manpath.config


Find the section with # set up PATH to MANPATH mapping. At the end of this section add the following line.

MANPATH_MAP     /usr/local/texlive/2013/bin/i386-linux    /usr/local/texlive/2013/texmf-dist/doc/man

Now we can close the gedit window.

Final steps

Finally, close the terminal window that you have used for the installation and to unmount the ISO image type the command:

$ cd

$ sudo umount /mnt

After restart or logout/login again your installation is complete.


Delicious Save this on Delicious

Paragraph ended before \language@active@arg" was complete.
starlinq
It seem babel ackage does not like some sentences as
{\small "This is test."}
Take a look at the right combination of " and }
As soon as I changed it to
{\small "This is test."\phantom{a}}
the error has gone!

Tags: , ,

unzip fails to deal correctly with filename encodings (unpacking archive with Korean file names)
starlinq

[Ubuntu 12.10 (UI with US English-UTF-8 codepage)]

It seems if you KNOW from which SW platform zip file comes from and codepage, you can successfully unzip the archive without loosing non-ASCII filenames not encoded in UTF-8.

I just did one experiment to unpack zip file that has been created in Korean Windows 7 and contains the Korean characters in both zip archive name and compressed files.

First let's get a locale-specific info:

$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Let's check the version of unzip utility:

$ unzip --help
UnZip 6.00 of 20 April 2009, by Debian. Original by Info-ZIP.
...
Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
Default action is to extract files in list, except those in xlist, to exdir;
file[.zip] may be a wildcard. -Z => ZipInfo mode ("unzip -Z" for usage).
...
-O CHARSET specify a character encoding for DOS, Windows and OS/2 archives
-I CHARSET specify a character encoding for UNIX and other archives

Look at options with the following modifier:
-O CHARSET specify a character encoding for DOS, Windows and OS/2 archives

It is not -"zero", it is -O (capital O letter)!

In my case Korean Windows has EUC-KR codepage. The compressed zip-file has "2013년 설날" file name.

It means my command line will look like:

$ unzip -O EUC-KR "2013년 설날"

After checking unpacked files, it works! All files have right Korean encoding without strange characters.


Install R in Ubuntu 12.04 Precise Pangolin
starlinq

R is a free software environment for statistical computing and graphics. It compiles and runs on a wide variety of UNIX platforms, Windows and MacOS.

One of my main motivations to install R is Sweave. The Sweave is a literate programming language which integrates LaTeX and R code. The main idea of the Sweave is to combine data analysis code and standard formatted text into a single document.

Installation

The Ubuntu CRAN (The Comprehensive R Archive Network) packages have been signed with a new pgp key. The Ubuntu archives on CRAN are signed with the key of "Michael Rutter<email>" with key ID E084DAB9. To add the key to your system with one command, open terminal (Ctrl+Alt+T) and use:

$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

Open your sources.list file in gedit

$ sudo gedit /etc/apt/sources.list

and add the following line (using http://cran.rstudio.com/ mirror) at the end of the file:

deb http://cran.rstudio.com/bin/linux/ubuntu/ precise/

(You can go to http://cran.r-project.org/mirrors.html for the list of CRAN mirrors and replace the current URL mirror with your favorite one)

To install the complete R system, use

$ sudo apt-get update

$ sudo apt-get install r-base

if you need to compile R packages from source, also install the r-base-dev package:

$ sudo apt-get install r-base-dev

That's all.



Installing Korean language support for TeXLive 2012 in Ubuntu
starlinq

Open terminal window (Ctrl+Alt+T) and run the command:

$ sudo /usr/local/texlive/2012/bin/i386-linux/tlmgr --repository=http://ftp.ktug.or.kr/KTUG/texlive/2012 install collection-kotex

If you did new installation as in The quickest installation of the TeXLive 2012 in Ubuntu (32-bit), in  your ~/.profile you have:

PATH=/usr/local/texlive/2012/bin/i386-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2012/texmf/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2012/texmf/doc/info:$INFOPATH; export INFOPATH

Update the paths to your environment variables by adding the kotex line:

PATH=/usr/local/texlive/2012/bin/i386-linux:/usr/local/texlive/2012/texmf-dist/tex/latex/kotex:$PATH;export PATH
MANPATH=/usr/local/texlive/2012/texmf/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2012/texmf/doc/info:$INFOPATH; export INFOPATH


You can find the full install log here.


The quickest installation of the TeXLive 2012 in Ubuntu (32-bit)
starlinq
Pre-install: cleanup

If you're re-installing after a previous attempt, be sure to completely remove your old installation. By default, this would be in these two directories:

$ sudo rm -rf /usr/local/texlive/2012
$ sudo rm -rf ~/.texlive2012


Acquiring the ISO using the torrent network

Go to http://www.tug.org/texlive/acquire-iso.html page. The ISO image is available as texlive2012.torrent (currently it is located at the following link: http://www.tug.org/texlive/files/texlive2012.torrent)

Start it with your torrent client. The ISO image is quite large file (with .iso extension) but the download speed due to many peers in my case was really high (sometimes almost 2 MB/s).

Let's assume that the ISO file will be saved to ~/Downloads directory.

Mount an ISO Image

Open terminal window (Ctrl+Alt+T) and create a mount point:

$ sudo mkdir /mnt

If the downloaded ISO image (e.g. texlive2012-20120701.iso) is in the Downloads directory, change the current directory to

$ cd ~/Downloads

If you want to mount the image to make the contents available for installation or browsing, type the following to mount it:

$ sudo mount -t iso9660 -o ro,loop,noauto texlive2012-20120701.iso /mnt


Installation

You do not need to be root to install, use, or manage TeX Live, however I prefer to install as administrator.

Go to /mnt directory

$ cd /mnt
 
Run the install-tl script to install:


$ sudo ./install-tl
[... messages omitted ...]
Enter command: i
[... when done, see below for post-install ...]



The default installation directory is /usr/local/texlive/2012 You can find the full installation log here.

Update the installation

Type the command

$ sudo /usr/local/texlive/2012/bin/i386-linux/tlmgr update --self --all

As alternative, if you want to update the files using GUI, use the following command

$ sudo /usr/local/texlive/2012/bin/i386-linux/tlmgr -gui

In the window, in top right corner first press 'Load default' button and after getting an address of the repository, press 'Update all installed' button. When the update is complete, close the window or exit.

In my case after main installation I had 443 updates. You can find the full update log here.

Setting environment variables

Add new paths to your environment variables. In ~/.profile add finally the lines:


PATH=/usr/local/texlive/2012/bin/i386-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2012/texmf/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2012/texmf/doc/info:$INFOPATH; export INFOPATH



Finally do the MANPATH mapping, open the terminal and type

$ sudo gedit /etc/manpath.config

Find the section with # set up PATH to MANPATH mapping. At the end of this section add the following line.

MANPATH_MAP     /usr/local/texlive/2012/bin/i386-linux    /usr/local/texlive/2012/texmf/doc/man

Now we can close the gedit window.

Final steps
 
Finally, close the terminal window that you have used for the installation and start it again to unmount the ISO image, type the command:

$ sudo umount /mnt

 After restart or logout/login again your installation is complete.


Installing TrueType fonts in pdfLaTeX TeXLive 2011 and Ubuntu 12.04
starlinq

Introduction

In spite of having the newest LaTeX engines like XeLaTeX and LuaLaTeX, pdfLaTeX is still very helpful and the most reliable engine. Although XeLaTeX and LuaLaTeX are almost ideal for using TrueType fonts, they are still under development and the experience with some their incompatibilities may turn users back to 'old and proven' pdfLaTeX.

Even if you use Linux and free/open source software, you might still want some of the Microsoft/Other TrueType fonts. When it comes to typography, Microsoft TrueType fonts are definately visually appealing. To install the fonts, all you need to do in Ubuntu is to install the msttcorefonts package.

The Microsoft TrueType fonts package includes:

  • Andale Mono
  • Arial Black
  • Arial (Bold, Italic, Bold Italic)
  • Comic Sans MS (Bold)
  • Courier New (Bold, Italic, Bold Italic)
  • Georgia (Bold, Italic, Bold Italic)
  • Impact
  • Times New Roman (Bold, Italic, Bold Italic)
  • Trebuchet (Bold, Italic, Bold Italic)
  • Verdana (Bold, Italic, Bold Italic)
  • Webdings

Installing MS TrueType font in Ubuntu

You can install the MS core fonts by installing the msttcorefonts package. To do this, enable the “Universe” component of the repositories. After you do that, use the following command from the command line:

$ sudo apt-get install msttcorefonts

While this gives you the core fonts, it also gives you the ability to install any other font by simply copying the .TTF to the ~/.fonts/ directory.

All fonts were installed into directory:

/usr/share/fonts/truetype/msttcorefonts

When installing new fonts, you’ll need to re-login to be able to see and use them. Optionally, this step can be bypassed by regenerating the fonts cache with:

$ sudo fc-cache -fv
Installing MS TrueType font in pdfLaTeX
It is supposed you have already installed the TeXLive distribution.
Select a font to install with pdfLaTeX. I selected, for example, the Georgia font. Surprisingly, the files relating to the font were actually 8 files on my computer in /usr/share/fonts/truetype/msttcorefonts directory:

Georgia_Bold_Italic.ttf
Georgia_Bold.ttf
Georgia_Italic.ttf
Georgia.ttf 

georgiab.ttf
georgiai.ttf
georgia.ttf
georgiaz.ttf

Note. When I checked more carefully I found that the files with lower-case names are just symbolic links to Georgia*.ttf files!
Create new folder where we will do all operations
$ mkdir ~\latex-ttf-fonts
I decided to delete the symbolic links and rename the Georgia*.ttf to georgia*.ttf (the filename ending letter 'i' corresponds to 'Italic', 'b' => 'Bold' and 'z' => 'Bold_Italic'),
first I deleted the symbolic links
$ sudo rm georgia*.ttf
and copied the Georgia*.ttf to ~\latex-ttf-fonts
$ cp /usr/share/fonts/truetype/msttcorefonts/Georgia*.ttf ~/latex-ttf-fonts
then renamed it and copied back to their original location
$ sudo cp ~/latex-ttf-fonts/georgia*.ttf /usr/share/fonts/truetype/msttcorefonts
so finally I had just 4 files
georgiab.ttf
georgiai.ttf
georgia.ttf
georgiaz.ttf
You first have to check that you have the correct encoding file T1-WGL4.enc. It is shipped with the package texlive-font-utils and can be found in /usr/local/texlive/2011/texmf/fonts/enc/ttf2pk/base/T1-WGL4.enc.

$ locate T1-WGL4.enc

/usr/local/texlive/2011/texmf/fonts/enc/ttf2pk/base/T1-WGL4.enc
/usr/share/texmf-texlive/fonts/enc/ttf2pk/base/T1-WGL4.enc

My TeXLive 2011 distribution was installed in

/usr/local/texlive/2011/

Let's copy the encoding file to latex-ttf-fonts

$ cp /usr/local/texlive/2011/texmf/fonts/enc/ttf2pk/base/T1-WGL4.enc ~/latex-ttf-fonts

$ cd ~/latex-ttf-fonts

Creating the Adobe font metrics files

ttf2afm is a utility to generate AFM files for TrueType fonts. 

$ ttf2afm -e T1-WGL4.enc -o ecgeorgia.afm georgia.ttf
$ ttf2afm -e T1-WGL4.enc -o ecgeorgiai.afm georgiai.ttf
$ ttf2afm -e T1-WGL4.enc -o ecgeorgiab.afm georgiab.ttf
$ ttf2afm -e T1-WGL4.enc -o ecgeorgiaz.afm georgiaz.ttf

Notes.

(a) If you get many warning messages about glyphs, do not pay attention to those
(b) If you get <ttf2afm: command not found> response, just use the full path to ttf2afm, in my case it is

/usr/local/texlive/2011/bin/i386-linux/ttf2afm 

Creating TeX font metrics

afm2tfm converts Adobe font metrics to TeX font metrics

$ afm2tfm ecgeorgia.afm -T T1-WGL4.enc ecgeorgia.tfm
$ afm2tfm ecgeorgiai.afm -T T1-WGL4.enc ecgeorgiai.tfm
$ afm2tfm ecgeorgiab.afm -T T1-WGL4.enc ecgeorgiab.tfm
$ afm2tfm ecgeorgiaz.afm -T T1-WGL4.enc ecgeorgiaz.tfm

Then you can copy all those font metrics in your TeXLive directory:

$ sudo mkdir -p /usr/local/texlive/2011/texmf-dist/fonts/tfm/ms
$ sudo cp ecgeorgiab.tfm ecgeorgiai.tfm ecgeorgia.tfm ecgeorgiaz.tfm /usr/local/texlive/2011/texmf-dist/fonts/tfm/ms

Create directory /usr/local/texlive/2011/texmf-dist/fonts/truetype/ms and copy the ttf files to it

$ sudo mkdir -p /usr/local/texlive/2011/texmf-dist/fonts/truetype/ms
$ sudo cp georgia*.ttf /usr/local/texlive/2011/texmf-dist/fonts/truetype/ms

Now you can refresh the TeXLive cache: 

$ sudo mktexlsr

Updating the font map file

pdftex/pdflatex are configured with a map file that is generally in /var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map

$ locate pdftex.map
/usr/local/texlive/2011/texmf/fonts/map/pdftex/updmap/pdftex.map
/usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap/pdftex.map
/usr/share/texmf-texlive/fonts/map/pdftex/updmap/pdftex.map
/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map

Create ttf.map file

$ gedit ttf.map

Add to the file the following:

ecgeorgia Georgia " T1Encoding ReEncodeFont " <georgia.ttf T1-WGL4.enc
ecgeorgiai Georgia-Italic " T1Encoding ReEncodeFont " <georgiai.ttf T1-WGL4.enc
ecgeorgiab Georgia-Bold " T1Encoding ReEncodeFont " <georgiab.ttf T1-WGL4.enc
ecgeorgiaz Georgia-BoldItalic " T1Encoding ReEncodeFont " <georgiaz.ttf T1-WGL4.enc

NB: /var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map may be generated with updmap.

The full updmap.cfg is generated by concatenating updmap-hdr.cfg with all the Map and MixedMap lines from an installation, possibly appending a local configuration file. 

Note. It is not recommended to directly edit 'updmap.cfg' file, it seems in majority of cases it is safe, so you can add Map ttf.map to the end of that file or follow the recommended procedure below.

To make local customizations to the map files, use the following method:

Add your local map entries to the file

TEXMFLOCAL/web2c/updmap-local.cfg

so in my case I created updmap-local.cfg file in /usr/local/texlive/2011/texmf-config/web2c/

$ sudo gedit /usr/local/texlive/2011/texmf-config/web2c/updmap-local.cfg

and added to it

Map ttf.map

and saved it.

And then call 

$ cp ~/latex-ttf-fonts/ttf.map /usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap

$ cd /usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap

Let's check if the file exists there

/usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap$ ls

pdftex_dl14.map pdftex.map pdftex_ndl14.map ttf.map

Update

$ sudo /usr/local/texlive/2011/bin/i386-linux/updmap-sys --enable Map=ttf.map
updmap: This is updmap, version $Id: updmap 14402 2009-07-23 17:09:15Z karl $
updmap: using transcript file `/var/lib/texmf/web2c/updmap.log'
updmap: initial config file is `/var/lib/texmf/web2c/updmap.cfg'

Creating the LaTeX style file

In your local working directory or in say /usr/share/texmf/tex/latex/truetype/ add a file called georgia.sty (you may have to run again mktexlsr) . This file contains:

\DeclareFontFamily{T1}{georgia}{}%
\DeclareFontShape{T1}{georgia}{b}{n}{<->ecgeorgiab}{}%
\DeclareFontShape{T1}{georgia}{b}{it}{<-> ecgeorgiaz}{}%
%% bold extended (bx) are simply bold
\DeclareFontShape{T1}{georgia}{bx}{n}{<->ssub * georgia/b/n}{}%
\DeclareFontShape{T1}{georgia}{bx}{it}{<->ssub * georgia/b/it}{}%
\DeclareFontShape{T1}{georgia}{m}{n}{<-> ecgeorgia}{}%
\DeclareFontShape{T1}{georgia}{m}{it}{<-> ecgeorgiai}{}%
\usepackage[T1]{fontenc}%
\renewcommand{\rmdefault}{georgia}%
\renewcommand{\sfdefault}{georgia}%

Compiling a document with new installed font

Let's go back to our directory

$ cd ~/latex-ttf-fonts

Create 'test.tex' file and add the following code

\documentclass{article}
\usepackage{georgia}
\usepackage[utf8]{inputenc}
\begin{document}
The quick brown fox jumps over the lazy dog
\end{document}

Now you can compile it with pdfLaTeX.

Check if the pdf file has Georgia font

 $ pdffonts test.pdf

If everything is Okay, you will see something like that

name type emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
WIKWUV+Georgia TrueType yes yes no 4 0

==================================================================

In this post I used some online sources, so corresponding credits go to their authors.

Links:

http://benperove.com/howto/install-microsoft-truetype-fonts-in-fedora-and-ubuntu/
http://embraceubuntu.com/2005/09/09/installing-microsoft-fonts/
http://www.monperrus.net/martin/using-truetype-fonts-with-texlive-pdftex-pdflatex 


How to upgrade R in Ubuntu 12.04
starlinq
Open your sources.list file in gedit

sudo gedit /etc/apt/sources.list

and add the following line:
deb http://cran.cnr.berkeley.edu/bin/linux/ubuntu/ precise/

Note that you don't have to use that mirror. You may use any mirror from the list here : http://cran.r-project.org/mirrors.html

Add the secure APT key to your system with one command
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9

Update your sources and upgrade your installation
sudo apt-get update && sudo apt-get upgrade


You are viewing starlinq