2008-05-31

理发

到了大美国,我可是长了本事了。学会了给老公理发,哈哈!虽然每次理的都不是特别完美,但是老公一直都还比较满意的。而且,昨天,老公还给我也剪短了头发,瞅瞅,多么相敬如宾啊。古有张敞画眉,今日老公为我理发!

2008-04-26

imagemagick: examples (ZZ)

# imagemagick 实用例子

identify -verbose sample.png % display info abound an image
identify -format "%wx%h" sample.png
identify –list color % list all legal color names
identify(convert) -list delegate % list all delegates

convert -size 50x50 xc:black -fill white -draw 'circle 25,25 20,10' shade_circle_mask.gif % create an image
convert -debug input.png output.jpg % display excution details
convert +debug input.png output.jpg % disable all debugging output
convert -verbose input.png output.jpg % be verbose

convert -rotate 90 input.jpg output.jpg % image rotation
convert -charcoal 2 input.jpg output.jpg % charcoal
convert -colorize 255 input.jpg output.jpg % colorize
convert -implode 4 input.jpg output.jpg % implode
convert -solarize 42 input.jpg output.jpg % solarize
convert -spread 5 input.jpg output.jpg % spread
convert -sample 25%x25% -spread 4 \ -charcoal 4 input.jpg output.jpg % chain several commands
convert -resize 42x148 input.jpg output.jpg % resizing
convert -resize 12.5% input.jpg output.jpg
convert -resize 640x480> input.jpg output.jpg % image not less than 640x480
convert -resample 300x300 input.tif output.tif
convert -sample 400% -filter lanczos input.jpf output.jpg
% creates an output file 4times greater than input and uses the Lanczos filter to guess the new pixel values.

convert -thumbnail input.jpg output.jpg % thumnail ignore image profile
convert -crop 1104x372+58+100 input.jpg output.jpg
convert -trim input.jpg output.jpg % trimming, can remove border
convert -fuzz 20% -trim input.jpg output.jpg %
convert -shave 20x20 input.jpg output.jpg % same effect as trim, but with exact size in mind
convert img1trim.jpg img2trim.jpg -fx 'u | v' result.jpg % pixelwise logical operation

convert -quality 10% input.jpg output.jpg % compression

convert -delay 100 frames-*.jpg output.mpg % make an animation from several jpg images
convert -morph 1,2 one.png two.png output-%d.png % morph

mogrify -thumbnail 10% *.jpg % !!!! carefull, mogrify overrides original images


convert -font helvetica -fill white -pointsize 36 -draw 'text 10,50 "Floriade 2002, Canberra, Australia"' floriade.jpg comment.jpg % add a annotation

2008-04-24

Stardict installation

# Dictionary
http://stardict.sourceforge.net/Dictionaries_zh_CN.php

# install
for file in *.tar.bz2; do
   tar xjf $file
done
su
mkdir /usr/share/stardict/dic
# shopt -s extglob
mv !(*.tar.bz2) /usr/share/stardict/dic/.

# ReciteWord
http://reciteword.sourceforge.net/

2008-04-21

LaTeX: 参考文献引用 [2-5], or [2] - [5]方法 (ZZ)

发信人: scl (Hello, friends), 信区: TeX
标 题: 参考文献引用 [2-5], or [2] - [5]方法
发信站: 水木社区 (Sun Sep 17 06:40:15 2006), 站内

别笑偶,偶也是刚刚知道怎么用,估计还有些同学不知道,写出来希望对大家有点用。这个方法对我有用,不知道是否是通用的,我不懂这些语法,如果不对请大家指点一下,谢谢。

如果只需要象[2-5], 很简单,用\usepakage{cite}就可以了,不行的话,请去download最新的cite.sty文件。
如果要象[2] - [5],除了用\usepakage{cite}外,再加下面一段:
\def\@citex[#1]#2{%
\let\@citea\@empty
\@cite{\@for\@citeb:=#2\do
{\@citea\def\@citea{], [}%
\edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
\if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
\@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
\G@refundefinedtrue
\@latex@warning
{Citation `\@citeb' on page \thepage \space undefined}}%
{\hbox{\csname b@\@citeb\endcsname}}}}{#1}}
\def\citepunct{], [}
\def\citedash{]--[}

我是放在.cls文件里用的,不知道放在别的地方行不行。还有,上面的#1, #2啥的不知道会有什么问题(别笑偶,真的不知道,没有去学LaTex语法)


--
Life is happy~~



※ 来源:·水木社区 http://newsmth.net·[FROM: 128.194.79.*]

LaTeX简单问答 (ZZ)

发信人: pixYY (小精灵), 信区: TeX
标 题: LaTeX简单问答
发信站: 水木社区 (Fri Aug 18 20:26:15 2006), 站内

有些问题还不错
http://web.mit.edu/rsi/www/2001/help/faq/latex/

========================

Latex FAQ

1. How do I do a citation in LaTeX?
2. How do I put in a trademark/registered/copyrighted sign in LaTeX?
3. How do I get an angstrom sign in LaTeX?
4. How do I get a percent sign in LaTeX?
5. How do I get table cells to auto-wrap?
6. How do I label things and reference them?
7. How do I get a degree sign?
8. How do I get "a choose b"?
9. How do I get a square/cube/n-th power root?
10. How do I get nicely numbered equations?
11. How do I reference numbered equations?
12. How do I reference numbered figures?
13. How do I stop latex from putting an extra space after Ms. ?
14. How do I include a package?
15. How do I create a subsection?
16. How do I superscript?
17. How do I draw the double-barred Z (representing all integers), R (all reals), or Q (all rationals) in LaTeX?
18. How do I do italics in LaTeX?
19. How do I get the "for all" symbol (upside down A)
20. How do I include an image?
21. How do I rotate or resize an included graphic?
22. What does Unable to read an entire line---bufsize=3000. Please alter the configuration file. mean?

1. How do I do a citation in LaTeX?

\cite{sourcename}

2. How do I put in a trademark/registered/copyrighted sign in LaTeX?

\textregistered for (R)
\copyright for (C)
\texttrademark for (TM)

3. How do I get an angstrom sign in LaTeX?

\AA

4. How do I get a percent sign in LaTeX?

\%

5. How do I get table cells to auto-wrap?

Use p{dimen} as the column specification. That wraps them to that width specified by dimen. Example: \begin{tabular}{|l|l|r|p{2in}|}

6. How do I label things and reference them?

\label{labelname} to label
\ref{labelname} to reference
For tables and figures make sure the \label{} comes inside \caption{}

7. How do I get a degree sign?

^\circ (in math mode).

8. How do I get "a choose b"?

{ a \choose b } in math mode

N.B. If you are using the amsmath package, using \choose will cause a Package amsmath Warning complaining about the \atopwithdelims control sequence. Just ignore this warning.

9. How do I get a square/cube/n-th power root?

\sqrt{k} for a square root of k
\sqrt[n]{k} for an n-th power root of k

10. How do I get nicely numbered equations?

Use the equation style:

\begin{equation}
E=mc^{2}
\end{equation}

Note: Numbered equations are almost always preferable to unnumbered equations, for which you can use \begin{displaymath} \end{displaymath}.

11. How do I reference numbered equations?

When you write the equation,

\begin{equation}
E=mc^2
\label{eqn:Einstein}
\end{equation}

And then when you wish to reference the equation in the prose,

Applying the mass-energy relations given in (\ref{eqn:Einstein}),
we find that...

Note: the eqn: in the label is not formally necessary, but will make your code more readable.

12. How do I reference numbered figures?

When you insert the figure the equation,

\begin{figure}
\includegraphics{poodles.eps}
\caption{Commuting canine movements}
\label{fig:poodles}
\end{figure}

And then when you wish to reference the figure in the prose,

As seen in Figure \ref{fig:poodles}, the hunting patterns...

13. How do I stop LaTeX from putting an extra space after Ms. ?

use Ms.~Name

14. How do I include a package?

\usepackage{packagename} before \begin{document}
Useful package: amssymb -- mathematical symbols and fonts

15. How do I create a subsection?

\subsection{subsectionname} for subsections
\subsubsection{subsubsectionname} for subsubsections

16. How do I superscript?

$E = mc^{2}$

$1024 = 2^{10}$

17. How do I draw the double-barred Z (representing all integers), R (all reals), or Q (all rationals) in LaTeX?

\mathbb{Z}, \mathbb{R}, \mathbb{Q} (you must be using the amssymb or amsmath package)

18. How do I do italics in LaTeX?

\emph{}

19. How do I get the "for all" symbol (upside down A)

\forall in math mode

20. How do I include an image?

\begin{figure}
\includegraphics{imagename.eps}
\caption{Lovely caption}
\label{fig:somethin-you-will-remember}
\end{figure}

21. How do I rotate or resize an included graphic?

use the angle attribute to \includegraphics. For example, \includegraphics[angle=45]{foo.ps} to rotate counterclockwise by 45 degrees. Other possible attributes are:

\includegraphics[width=5in]{foo.ps}
\includegraphics[width=\textwidth]{foo.ps} % scale to the width of the page
\includegraphics[height=5in]{foo.ps}
\includegraphics[scale=0.5]{foo.ps} % scale to 50%

If you want it to be just as wide as the text, use width=\textwidth.

22. What does Unable to read an entire line---bufsize=3000. Please alter the configuration file. mean?

Most likely, you are trying to include an image
--
自从朗多什衰败以后,古老而神秘的精灵家族便逐渐退隐人间。如果足够
幸运的话,有些童真无邪的人还可能偶尔见到他们。但是精灵们留下了一个奇
特的传统,每过一段时间,会派遣一批精灵幻化为人来到世间,那些感觉敏锐
的人如果留意的话还可以发现他们所共有的一些精灵的特质... ...



※ 修改:·pixYY 于 Aug 18 20:28:11 修改本文·[FROM: 59.66.117.*]
※ 来源:·水木社区 newsmth.net·[FROM: 59.66.117.*]