The subfigure 's tutorial
If you want to get rid of 'counter' in front of your sub-captions, use to redefine the command: \thesubfigure by:
\renewcommand*{\thesubfigure}{}
(originally one in subfigure.sty is
\renewcommand*{\thesubfigure}{(\alph{subfigure})}
)
Thursday, October 23, 2008
Latex: subfigure: how to get rid of 'counter' of subcaption
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 post text and graph on absolute position on one page
I copied the introduction from its home page http://nxg.me.uk/dist/textpos/ :
Textpos
Lay out text and graphics at arbitrary positions on the LaTeX page.
The textpos home page is at http://purl.org/nxg/dist/textpos
Version 1.7d, 2007 March 30.
This package facilitates placing boxes at absolute positions on the LaTeX page. There are several reasons why this might be useful, but the main one (or at least my motivating one) is to help produce a large-format conference poster. Other applications include placing material within, say, figures.
This package provides a single environment, which contains the text (or graphics, or table, or whatever) which is to be placed on the page, and which specifies where it is to be placed. The environment is accompanied by various configuration commands. See the manual (pdf).
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}
Friday, April 20, 2007
Latex: how to comment out lines in emacs
If you are editing a latex file by using emacs, then how to comment out lines and uncomment out lines? As you know, commenting out is just add '%' before the lines and uncommenting is remove '%' before the lines.
People said:
It is often necessary to comment out temporarily a region of TeX or LaTeX code. This can be done with the commands C-c ; and C-c %. C-c ; will comment out all lines in the current region, while C-c % will comment out the current paragraph. To uncomment, simply type C-u - C-c ; to uncomment all lines in the region, or C-u - C-c % uncomment all comment lines around point.
But I find an easier way: just use C-c ; to switch. For example, you have 3 lines without '%', then use C-c ; to add '%', then to uncomment, just use C-c ; again! Remember, before using the keys, to mark your region which you wanna (un)comment.
