Thursday, August 5, 2010

Latex captions: advanced

A)
You can put different captions in the List of Figures by including an optional argument of the \caption command:
\begin{figure}
...
... |<----- optional argument of \caption ----->|
\caption[This is what shows up in the List of Figures.]{Here is the text
that appears under the Figure itself. This text is often very long and
complicated, and is only useful when you've got the Figure sitting right
there in front of you. It won't mean much to anyone just reading the
List of Figures.}
\label{example-fig}
\end{figure}

B)
So to get fragile stuff like equation references in the caption, try this:
\begin{figure}
...
\caption{The graph of the function given in (\protect \ref{some-eqn}).}
\end{figure}

Notice that to get parentheses around the number, like "(7)", the
\protect statement has to go inside the
().

Source: http://www.iam.ubc.ca/old_pages/newbury/tex/captions.html#different

Linux: change encoding simply

QUICK: 
 
$ recode UTF-8..latin1 foo
NOTE: The file foo will be overwritten by the command
 
Option 2:
 
iconv --from-code=ISO-8859-1 --to-code=UTF-8 ./oldfile.htm > ./newfile.html

MULTI-FILE:

find . -name "*.txt" -exec iconv -f ISO-8859-1 -t UTF-8 {} -o {}.utf8 \;
 

Linux Locale, Language, Encoding

Check to see what locales are currently installed on your system
$ locale -a
More interesting info, although containing some useless proprietary specifics: http://docs.hp.com/en/5185-4400/