Monthly Archives: September 2009

Boost Install

windows系统中, 编译boost_1_40_0, jam为 boost-jam-3.1.17. C++编译器为 visual studio 2005 1. download the source of Boost and Boost Jam from http://www.boost.org/. 2. release the Boost source files to folder, e.g. d:\shi\boost. release Boost Jam to the subfolder of the Boost sourced:\shi\boost\jam. 3. … Continue reading

Posted in Programming | Leave a comment

LaTeX: code insert

在LaTeX文档中, 插入代码, 使用 listings 宏包 用法: \usepackage{listings} \lstset{breaklines}  %LaTeX自动将长的代码行换行排版 1. 直接把代码写入TEX文本中 \begin{lstlisting}[language=***] source \end{lstlsting} 2. 调用并嵌入源文件 \lstinputlisting{filename.*} a)  file default extension: tex. 如果仅用 ilename 不加后缀名 .*, CTex会自动寻找 filename.tex文件 b) filename.*,  .* 可以为任意纯文本文件 c)  使用 \usepackage{CJK}后, \begin{lstlisting}和 end{lstlsting}间可以使用中文, 但 \lstinputlisting{filename.*}, finaname.* … Continue reading

Posted in Latex | 1 Comment

Latex: Formula in Table

latex文件中, 在表格中插入公式 文件地址: a) formulaInTable.tex b) formulaInTable.pdf   \documentclass[12pt]{article}\usepackage{amsmath}\begin{document}\title{formula in table}\author{Shi~Cheng\\shi.cheng@live.com}\date{September~10,~2009}\maketitle \begin{abstract}set formula in table\end{abstract} \section{section}\begin{tabular}{|c|c|} \hlineFormula & Explanation \\ \hline      $h_\sigma(a,B)=            \left\{            \begin{array}{rl}                1 & \mbox{if }d(a,B) \leq \sigma  \\                0 & \mbox{if }d(a,B)> \sigma            \end{array}\right.            \label{pan}$          Explain something … Continue reading

Posted in Latex | 1 Comment