Tricks and tips for linux, xubuntu, LaTeX, and other software

Here are some notes recording various tips and tricks that I have picked up in the course of doing my work. There is no system to what is recorded, they are not exhaustive, and are meant more as a list for myself so that I don't have to discover these solutions again in the future. But if they are helpful to anyone else, then you're welcome. :-)

Linux things

Accessing afs file systems.
Use kinit to initialize, then aklog to get the token.
Tokens can be checked with tokens and klist.

The position of the compose key can be set system-wide by editing /etc/default/keyboard to include the line XKBOPTIONS="compose:caps".

Sending email from the command line (or in a script):
echo "This will go into the body of the mail." | mail -s "Subject line" you@youremailid.com.
Or
mail -s "Subject line" you@youremailid.com < ./filename.log
Other options include -c to add a CC address, and -b to add a BCC address.

LaTeX

The syntax for the minipage environment is:
\begin{minipage}[pos][height][contentpos]{width} text \end{minipage}

Useful packages that I should remember exist:
xspaceTweaks the spacing after commands
setspaceChange line spacing in the document
xcolorDefine and use colors in an intuitive way
titlesecFormat sectioning commands and spacing
natbib Combine with makebst for custom bibliographies, usually with the [numbers] option. The command \setlength{\bibsep}{length} will set the spacing between bibliography items.
caption Format float captions.
geometry Format page borders, etc.

Gnuplot

To include external fonts in a gnuplot figure, specify a fontpath as the first line of the gp file:
set fontpath "/usr/share/texmf-texlive/fonts!"
The trailing exclamation point indicates that all subdirectories should be included in the search path. Then, the terminal command can include the loading of the fonts:
set terminal postscript eps color enhanced size 8.5cm,5cm \
fontfile "cmsy10.pfb" font "Times-Roman,18"

To get an hbar character, there are two options. One is to fake it with a construction such as {/=8 @{/Symbol=24 -} _{/=14 h}}. The second way is to load the font msbm10.pfb which is part of the AMSLaTeX package, then call {/MSBM10 \\176} to place the equivalent of an \hbar command in LaTeX.

List of conventions for APS manuscript

The guidelines on hyphenation state "Hyphens are inserted in word pairs that function as adjectives when they occur before a noun, as in 'x-ray diffraction', '4-mm-long gas cell', and 'R-matrix theory'. Hyphens are not required in word pairs when they are not used as adjectives before a noun, as in 'emission by x rays', 'was 4 mm in length', and 'the R matrix theory'.
Note that Physical Review follows U.S. English guidelines in that hyphens are not used afer prefixes or before suffixes, e.g. superresolution, quasiequilibrium, nanoprecipitates, resonancelike, clockwise.