Tag Archives: LateX

Latex – Splitting the page into two colomns

To make the whole document to have multiple columns –  \documentclass[11pt,twocolumn]{article}

To start a new page with two column – \twocolumn

To define the distance between the two columns – \setlength{\columnsep}{distance}

If you need a line to separate the columns – \setlength{\columnseprule}{thickness}

 

 

For more info – http://texblog.wordpress.com/2007/08/11/creating-two-columns-in-article-report-or-book/

 

http://texblog.wordpress.com/2007/08/01/placing-figurestables-side-by-side-minipage/

Advertisements

Leave a comment

Filed under LaTeX

Using the rupee symbol is LaTeX

First download tfrupee.zip from here

unzip tfrupee.zip  
cd tfrupee/  
sudo cp -rv fonts/type1/tfrupee/ /usr/share/texmf/fonts/type1/  
sudo cp -rv fonts/afm/tfrupee/ /usr/share/texmf/fonts/afm/  
sudo cp -rv fonts/tfm/tfrupee/ /usr/share/texmf/fonts/tfm/  
sudo cp -rv fonts/map/dvips/tfrupee/ /usr/share/texmf/fonts/map/dvips/  
sudo cp -rv fonts/source/tfrupee/ /usr/share/texmf/fonts/source/  
sudo cp -rv tex/latex/tfrupee/ /usr/share/texmf/tex/latex/  
sudo texhash  
sudo updmap-sys --enable Map=tfrupee.map

Test it with this simple tex file.

\documentclass[12pt]{article}  
\usepackage{tfrupee}  
\begin{document}  
\rupee~7,000  
\end{document}

Courtesy: http://tex.stackexchange.com/questions/874/indian-rupee-symbol

Leave a comment

Filed under LaTeX

Adding C++ code snippets in LaTeX using “listings”

We will always have to use code snippets in LaTeX.  The method I use to implement this is using the package listings.

I add an example here.

\usepackage{listings}

and later

\lstset{language=C++,basicstyle=\footnotesize}
\begin{lstlisting}{caption=Test}
{
  // Set up FW Lite for automatic loading of CMS libraries
  // and data formats.   As you may have other user-defined setup
  // in your rootlogon.C, the CMS setup is executed only if the CMS
  // environment is set up.
  //
  TString cmsswbase = getenv("CMSSW_BASE");
  if (cmsswbase.Length() > 0) {
    //
    // The CMSSW environment is defined (this is true even for FW Lite)
    // so set up the rest.
    //
    cout << "Loading FW Lite setup." << endl;
    gSystem->Load("libFWCoreFWLite.so");
    AutoLibraryLoader::enable();
    gSystem->Load("libDataFormatsFWLite.so");
    gSystem->Load("libDataFormatsPatCandidates.so");
   }
}
\end{lstlisting}

Leave a comment

Filed under LaTeX