Thursday, December 23, 2010

change the equation numbering in latex

Change from (1) to (S1), use the command below

\renewcommand\theequation{ S\arabic{equation}}


\arabic{page} 4
\roman{page} iv
\Roman{page} IV
\alph{page} d
\Alph{page} D

http://www.iam.ubc.ca/old_pages/newbury/tex/numbering.html

\renewcommand{\thefigure}{\thechapter.\arabic{figure}}
^notice the period here!
This gives Figure numbers
1.1, 1.2 ... 1.4,
2.5, 2.6 ... 2.11,
3.12,...

#######################
if someone would like to change the figure numbering, it should be similar.

Tuesday, December 21, 2010

cannot output EPS format in photoshop

solution:

change the mode from 16 bit/color to 8 bit/color.

The mode option is under the menu "image".


http://newsgroups.derkeiler.com/Archive/Alt/alt.graphics.photoshop/2006-09/msg00099.html

Monday, December 20, 2010

solve equation in matlab.

syms xr;
aa=0.84; % for the given spin value

ss=aa-(2/3)^0.5*xr*(4-(18*xr^2-2)^0.5);

yy=solve(ss);

mif=double(yy(2)); %%% convert the symbolic object into the real number.

Friday, December 03, 2010

use url in latex

http://www.kronto.org/thesis/tips/url-formatting.html




@misc{
c.elmohamed,
%author = "Saleh Elmohamed",
%title = "Examples in {H}igh {P}erformance {F}ortran",
%howpublished = "Website",
%year = {1996},
note = {\url{http://www.npac.syr.edu/projects/
cpsedu/summer98summary/ examples/hpf/hpf.html}}
}


Example usage

In the preamble:


\usepackage{url}

%% Define a new 'leo' style for the package that will use a smaller font.
\makeatletter
\def\url@leostyle{%
\@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}}
\makeatother
%% Now actually use the newly defined style.
\urlstyle{leo}

In a BibTEX entry:


@misc{
c.elmohamed,
author = "Saleh Elmohamed",
title = "Examples in {H}igh {P}erformance {F}ortran",
howpublished = "Website",
year = {1996},
note = {\url{http://www.npac.syr.edu/projects/
cpsedu/summer98summary/ examples/hpf/hpf.html}}
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

please note there is no any comments inside the entry, e.g., the following example will not work


For science magazine, there are two cases:

(1) if there are more than 1 entry besides url, the entry name should use "note".

@misc{c.elmohamed,
author = "Saleh Elmohamed",
note = {\url{http://www.npac.syr.edu/projects/
cpsedu/summer98summary/ examples/hpf/hpf.html}}
}


(2) if there is only url entry, the entry name howpublished will work as well.

@misc{exam1,

howpublished = {\url{http://www.npac.syr.edu/projects/
cpsedu/summer98summary/ examples/hpf/hpf.html}}
}