Search This Blog

Thursday, December 30, 2010

rsync excluding .svn dir

rsync -av --exclude=".svn" -e ssh  A  B

Thursday, December 23, 2010

to increase section number by 2


pdfpages to include pdf files into LaTex


\includepdf[pages=-, pagecommand={\thispagestyle{fancy}}]{PeerEvalScanned.pdf}

\includepdf[pages=-, fitpaper=true, pagecommand={\thispagestyle{fancy}},addtolist={1,figure,{some interesting}, TEformNumeric}]{TE/TEformNumeric.pdf}

Wednesday, December 22, 2010

Natbib reference sheet

Natbib reference sheet

\citet{jon90} --> Jones et al. (1990)
\citet[chap. 2]{jon90} --> Jones et al. (1990, chap. 2)
\citep{jon90} --> (Jones et al., 1990)
\citep[chap. 2]{jon90} --> (Jones et al., 1990, chap. 2)
\citep[see][]{jon90} --> (see Jones et al., 1990)
\citep[see][chap. 2]{jon90} --> (see Jones et al., 1990, chap. 2)
\citet*{jon90} --> Jones, Baker, and Williams (1990)
\citep*{jon90} --> (Jones, Baker, and Williams, 1990)

Tuesday, December 21, 2010

How to use nomenclature

  • Put \usepackage[〈options〉]{nomencl} in the preamble of your document.
  • Put \makenomenclature in the preamble of your document.
  • Issue the \nomenclature command (see Section 2.2) for each symbol you want to have included in the nomenclature list. The best place for this command is immediately after you introduce the symbol for the first time.
  • Put \printnomenclature at the place you want to have your nomenclature list.



\nomenclature{$N$}{The number of particles}


To compile do followings in Unix prompt:
makeindex 〈filename〉.nlo   -s   -o   〈filename〉.nls

Friday, December 17, 2010

TAR a large disk image

Particle variables

for i = 1, np

Particle radius
  • AP(i) 

Translational Coordinates and Uelocities, Acceleration
  • CX(i), UX(i), AX(i)
  • CY(i), UY(i), AY(i) 
  • CX(i), UZ(i), AZ(i) 

Rotational Euler-coordinates and Welocities (omega), Bacceleration (Boosting rotation)
  • EX(i), WX(i), BX(i)
  • EY(i), WY(i), BY(i) 
  • EX(i), WZ(i), BZ(i)  

Saturday, December 4, 2010

KCB's LaTeX files

KCB's LaTeX files: "\timestamp"

LaTeX Tools and Templates

LaTeX Tools and Templates

periodic boundary conditions

1, 2, 3, ..., L-1, L

i + 1 => mode ( i , L) + 1
i + 2 => mode ( i+1, L) + 1

i - 1 => mode ( i - 2 + L , L ) + 1
i - 2 => mode ( i - 3 + L , L ) + 1

Friday, December 3, 2010

Octave/MATLAB basics

Octave/MATLAB basics

Getting to Grips with Latex - Tables - Latex Tutorials by Andrew Roberts @ School of Computing, University of Leeds

Getting to Grips with Latex - Tables - Latex Tutorials by Andrew Roberts @ School of Computing, University of Leeds: "\begin{center}
\begin{tabular}{ l | c || r | }
1 & 2 & 3 \\ \hline
4 & 5 & 6 \\ \hline
7 & 8 & 9 \\

LaTeX:Commands - AoPSWiki

LaTeX:Commands - AoPSWiki

LaTex \newcommand


\newcommand{\mycolor}{white}%purple, white
\newcommand{\jmitem}{\justmoment \item}
\newcommand{\pitem}{\justmoment \item}
\newcommand{\lb}{\ \mathrm{lb}}
\newcommand{\ft}{\ \mathrm{ft}}
\newcommand{\inch}{\ \mathrm{in}}
\newcommand{\lbft}{\ \mathrm{lb}\cdot\mathrm{ft}}
\newcommand{\N}{\ \mathrm{N}}
\newcommand{\kN}{\ \mathrm{kN}}
\newcommand{\kip}{\ \mathrm{kip}}
\newcommand{\mm}{\ \mathrm{mm}}
\newcommand{\m}{\ \mathrm{m}}
\newcommand{\Nm}{\ \mathrm{N}\cdot\mathrm{m}}

Friday, November 19, 2010

bug in "find" command in Linux

One should put single quotations for the wild card option.

 > find  $HOME  -name  '*.tcl'

This command is to find any file whose extension is tcl under the home directory including all the sub-directories.

Wednesday, November 17, 2010

shell script

This script read a directory, zip the directory, and create file.
And it send the zip file to specific location in my Mac computer using scp.


echo $1
zip -r $1 $1
scp $

Monday, November 15, 2010

Latex: how to change footnote symbols

Arabic numerals, e.g., 1, 2, 3...

Roman numerals (lowercase), e.g., i, ii, iii...\renewcommand{\thefootnote}{\roman{footnote}}

Roman numerals (uppercase), e.g., I, II, III...

Alphabetic (lowercase), e.g., a, b, c...


Alphabetic (uppercase), e.g., A, B, C...


A sequence of nine symbols (try it and see!)


LaTex: Long arrow



is not sufficiently long, try

\[ \xrightarrow{\hspace*{3cm}} \]

Saturday, November 13, 2010

PDF to Keynote (pdftokeynote)

For people who enjoys LaTex presentation, beamer, this free software "pdftokeynote"provides an excellent link between pdf and keynote.  A pdf presentation is prepared using beamer with full functionality of math typesetting. Once the final pdf file is made, then pdftokeynote can convert the pdf file with a number of slides to a Keynote file. Each Keynote page includes a pdf image of the presentation.  Only slide transition is possible in Keynote.

Thursday, June 10, 2010

Eigenvalues of an Inverse Matrix

If lambda is an eigen value of a matrix A, then
1/lambda is an eigen value of the inverse matrix of A.

Monday, May 3, 2010

AMBER on Macintosh: Installing g95 or gfortran with MacPorts

Here is how to install gfortran on Mac using macport.

sudo port install g95

if not working

sudo port install gcc45 +gfortran

AMBER on Macintosh: Installing g95 or gfortran with MacPorts

Sunday, May 2, 2010

Migration – MacPorts

After I installed Snow Leopard, macport was not working well, especially when I tried to install texmacs and octave. Below is the site that showed me the entire step to fresh MacPort by reinstalling everything again.

Migration – MacPorts: "sudo ./restore_ports.tcl myports.txt"

Wednesday, April 28, 2010

LaTeX/Packages/Listings - Wikibooks, collection of open-content textbooks

A way to easily convert FORTRAN code to LaTex

LaTeX/Packages/Listings - Wikibooks, collection of open-content textbooks

%\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.
%\geometry{letterpaper}                   % ... or a4paper or a5paper or ...
%\geometry{landscape}                % Activate for for rotated page geometry
%\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\lstset{ %
language= Fortran,                % choose the language of the code
basicstyle=\footnotesize,       % the size of the fonts that are used for the code
numbers=left,                   % where to put the line-numbers
numberstyle=\footnotesize,      % the size of the fonts that are used for the line-numbers
numberstyle=\scriptsize,      % the size of the fonts that are used for the line-numbers
stepnumber=2,                   % the step between two line-numbers. If it's 1 each line will be numbered
numbersep=5pt,                  % how far the line-numbers are from the code
%backgroundcolor=\color{white},  % choose the background color. You must add \usepackage{color}
%showspaces=false,               % show spaces adding particular underscores
%showstringspaces=false,         % underline spaces within strings
%showtabs=false,                 % show tabs within strings adding particular underscores
frame=single,                % adds a frame around the code
tabsize=2,                % sets default tabsize to 2 spaces
captionpos=b,                   % sets the caption-position to bottom
breaklines=true,                % sets automatic line breaking
breakatwhitespace=false,        % sets if automatic breaks should only happen at whitespace
title=\lstname,                 % show the filename of files included with \lstinputlisting; also try caption instead of title
escapeinside={\%*}{*)}          % if you want to add a comment within your code
%morekeywords={*,...}            % if you want to add more keywords to the set
%\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

\title{Brief Article}
\author{The Author}
%\date{}                                           % Activate to display a given date or no date




Thursday, March 11, 2010

How to add a new rpm using repoman

I needed to install pdftk rpm in my RHEL 5 host using repoman. Here is one that I figured out.

1. Download a necessary rpm from any source.

2. Copy the rpm file to a sub-directory under /deport/. In my case, it is

3. Type and enter:


and follow instruction.

To manually update repository, type/enter:

repoman -r "Repo for rhel-5-x86_64" -u

Of course, contents in " " is specified for a given repository name. Option "-u" indicates update.

4. Select "next" in most sequential cases in repoman. Click the name of rpm that you want to install. And, finally enjoy using it.

Saturday, February 6, 2010

Restarting LSF deamon after electric outage

When I got a notice of a total electric outage of my building, yesterday I shutdown all the nodes of my cluster, being managed by LSF. Those nodes include 18 worker and 1 master nodes.

By advises from Platform Inc., I did the followings:

1. Login as a root:
  sudo bash

2. Login as a lsfadmin:
  su - lsfadmin

3. type and enter the following:
  lmgrd -c /opt/lsf/conf/license.dat

4. Log out lsfadmin to be root again, and start lsf deamon:
  /etc/init.d/lsf_daemons start

(to stop, one can use the following command. But, I did not.)
  /etc/init.d/lsf_daemons stop

Friday, January 8, 2010

Locations of MacTex files and how to texhash

Class files: /usr/local/texlive/2009/texmf-dist/tex/latex/
BST files: /usr/local/texlive/2009/texmf-dist/bibtex/bst/
STY files: /usr/local/texlive/2009/texmf-dist/tex/latex/

To update ls-R database, type and enter in Mac Terminal

>>sudo /usr/texbin/texhash


Blog Archive