Latex Snipplets

Including a Picture

\documentclass [a4paper,12pt] {article}
\usepackage {graphicx,color}
\begin {document}
\begin {figure}
      \centering
      \includegraphics [scale=.75] {<yourfile_name.ps>}
      \caption {\color{red} {Give a caption for your image here}}
\end {figure}
\end {document}

Back to Top

Inserting a Table

You can insert a table in LaTeX in three ways. They are tabular,tabular* & array. The tabular command creates a table whose width is set automatically based on the content. The tabular* command gives you the option of setting the overall width of the table. And the array command is used in math mode.

		
\begin{tabular}{|l|l|l|} \hline
       Cell 11 & Cell 12 & Cell 13 \\ \hline
       Cell 21 & Cell 22 & Cell 23 \\ \hline
\end{tabular}


\begin{tabular*}{width}[pos]{cols} \hline    'width denotes the table width.
       Cell 11 & Cell 12 & Cell 13 \\ \hline
       Cell 21 & Cell 22 & Cell 23 \\ \hline
\end{tabular}

Back to Top

Inserting a Table with fixed width columns

\begin{tabular}[t]{cp{2in}c} \hline
     Cell 11 & Cell 12 & Cell 13 \\ \hline
     Cell 21 & Cell 22 & Cell 23 \\ \hline
\end{tabular}

Back to Top

Frame a Mini Page

				
\fbox{%
    \begin{minipage}{3in}
        blah, blah, blah
    \end{minipage}
    }

Back to Top

Miscellaneous Tips

Squeezing Space in LaTeX

Here are some tips on how to squeeze a little more onto LaTeX pages. The a4 package will give you narrower margins. The geometry (geometry help in dvi format) package can be used for setting the page layout and page margins as follows:

				
\usepackage[body={6.5in,8.75in},top=1.2in,bottom=1.2in,left=0.4in,
		                          right=0.4in,nohead]{geometry}

Partial Horizontal Lines

You can draw partial horizontal lines from left side of column n to right side of column m using the command :

\cline{n-m}
				

Back to Top


Yahoo Search
Results will open in a new window



Hosted by www.Geocities.ws

1