Showing posts with label package. Show all posts
Showing posts with label package. Show all posts

Tuesday, August 19, 2008

Latex: change row color of table

An example here:

\usepackage[table]{xcolor}
(if you use pdflatex and/or beamer, perhaps you need to transit 'table' by
\documentclass[xcolor=table..]{beamer} or you will have an error like:
! LaTeX Error: Option clash for package xcolor.
)

\begin{table}
\centering
\rowcolors{2}{gray!10}{}\tiny
\begin{tabular}{c||cc|cc}\hline\hline
....
\end{tabular}
\caption{...}
\end{table}

Thursday, August 14, 2008

Latex: Error: ! LaTeX Error: Too many unprocessed floats.

When using too much floating figures or tables, latex fails to locate those elements, you may counter the error:

! LaTeX Error: Too many unprocessed floats.

. One of solutions is to use the package 'float' and add [H] in your figure environment. Example:

\usepackage{float} %before text body

\begin{figure}[H]
\centering
\includegraphics[width=0.8\textwidth]{fig_tauid/plot_compare_tauprop_allvar_TTauAndTauIDTree_20080814_Tau_dalpha.eps}
\caption{Comparison between different samples used in tau ID study.}
\end{figure}

Monday, August 13, 2007

Latex: a good link to description of commonly used Latex packages

Some commonly used LaTeX packages are described at this link (in Chinese), including the package how to create shadow effect of fonts.

Wednesday, August 8, 2007

Latex: how to install package

Use the command mktexlsr to update the index of Latex.

Saturday, June 23, 2007

Latex: how to use conditional compilation

If you want to use condition to control your texts, better to use \ifthenelse.
Usage in pre-docu:
\usepackage{ifthen}
\newboolean{yourBoolVar}
\setboolean{yourBoolVar}{boolval} % boolvar=true or false

Usage in main body:
\ifthenelse {\boolean{yourBoolVar}}
{if true, go this code} {if false, go this}

Locations of visitors to this page