Posts Tagged ‘LaTex’

Natbib: change spacing in references

It happens that you would like to decrease the spacing in your references, e.g. for a thesis. Here, I found a simple way how to do it. Add the following to your preamble (the body of LaTEx program before \begin{document}):


It worked for me, so I hope works for you as well. If you do NOT use Natbib, you have to solve the problem differently.

Read Full Post »

Text color in Beamer presentations

Beamer is a LaTeX class for creating slides for presentations. It supports both pdfLaTeX and LaTeX + dvips. The name is taken from the German word Beamer, a pseudo-anglicism for video projector.

One can make beautiful and structured presentation using all power of LaTex. You can install it in Linux distributions from your package manager.

There are a few text color available by default like green, blue, and red.

To have a variety of text colors in your beamer presentation, simply include


in the heading of your Tex file and define your own colors.
I suggest the following:

\definecolor{olive}{rgb}{0.3, 0.4, .1}

You can find many more on the web. A sample output is like this:

The above colors was created using this simple frame:

\textcolor{violet}{violet} \newline

\textcolor{Magenta}{magenta} \newline

good luck !

Read Full Post »


In LaTex, after you have downloaded the necessary files (styles, …), you have to make these visible to TeX. This is accomplished by the following two steps.

Create a private tex hierarchy.
Under your home directory, create a subdirectory “texmf”, underneath that directory create another one called “tex”. and under this one create a “latex” directory. Thus, you should have a tree of the form


Place document class files (extension .cls), packages and any other custom style files for use by LaTeX (extensions .sty or .tex) into this directory.

If custom bibtex style files (extension .bst) have been provided, place these into a similar tree of the form


for *.bib files, create  a directory


and put .bib files there.

all *.fd files into the directory $TEXMF/tex/latex/

Run the “texhash” program. Simply type “texhash” at the prompt. This will create a database of files inside your texmf directory. The database file is called, appropriately enough, “ls-R”, and is located in the top level texmf directory, i.e., the file is $HOME/texmf/ls-R . The ls-R file is an ordinary text file and can be inspected with an editor or a pager like more or less. If the texhash run was successful, this file should contain a listing of all files under your private texmf directory.

Whenever you add new files to your texmf tree, be sure to run texhash. For efficiency reasons, TeX does not search for files, but only consults the ls-R database; if a (non-standard) file is not listed in this database, TeX will not find it.

Read Full Post »