环境:ctex-2.4.5-8.full.exe + SciTE-1.74 + Windows XP cn
/usepackage{ifthen}
/newboolean{TEST_VER}
/setboolean{TEST_VER}{true}
/documentclass{article}
/usepackage{underlin}
/usepackage{ctex}
/usepackage[dvips]{color}
/definecolor{bkcolor}{gray}{.825}
/usepackage{listings}
/lstset{language=C,tabsize=4, keepspaces=true,
backgroundcolor=/color{bkcolor}, %
frame=none, % frame=single,表示要边框; trbl
keywordstyle=/color{blue}/bfseries,
breakindent=22pt,
numbers=left,stepnumber=1,numberstyle=/tiny,
basicstyle=/footnotesize,
showspaces=false,
flexiblecolumns=true,
breaklines=true, breakautoindent=true,breakindent=4em,
escapeinside={/*@}{@*/}
}
/usepackage{hyperref}
/hypersetup{colorlinks, %linkcolor=blue, citecolor=blue, urlcolor=blue,%
bookmarksopen=true,%
pdfhighlight=/P, %/I(inverse) /N(no effect) /O(outline) /P(inset)
pdfauthor={<platto.coder@gmail.com>},%
pdfcreator=TeX/CTeX,%
pdftitle={Reading Note:},%
pdfsubject={research},%
pdfkeywords={},
pdfstartview=FitB,
pdfpagemode=UseOutlines,%UseOutlines, %None, FullScreen, UseThumbs
}
/ifthenelse{/boolean{TEST_VER}} {
/title{My Reading Note --Just for test!!! a full fuck-up}
}%
{
/title{关于某某问题的研究综述}
}%
/author{ramacess}
/begin{document}
/pagestyle{headings}
/maketitle
% insert the table of contents
/tableofcontents
/newpage
/section{摘要}
/section*{Start-正文前的内容}
Well, and here begins my lovely article.
该节内容不被目录编号。//
使用label--ref引用时,只能用ASCII码字符作标识。//
/subsection{这是另一个子节}/label{subsec:another}
/subsection{交叉引用}/label{subsec:cross_reference}
A reference to this subsection
looks like:
``see section~/ref{subsec:cross_reference} on
page~/pageref{subsec:cross_reference}.''//
关于另一个引用,见 section~/ref{subsec:another} on page~/pageref{subsec:another}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 引言
/section{引言}
/subsection{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 思路
/section{思路描述}
This approach has proven quite successful with
/subsection{基本原理}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 研究现状
/section{研究现状}
/subsection{方法一}
/subsection{方法二}
/subsubsection{步骤一}
/paragraph{要点}
/subsubsection{步骤二}
/paragraph{要点}
McGregor~/cite{McGregor03} has proposed that /ldots /par
/subsubsection{技术路线}/emph{CoRe}
/section{实验}
ASCII字符下划线的例子:$$/underline{1+/underline{1+/underline{x}^3}}$$
汉字下划线的例子:
/begin{tabular}{@{}l@{}}
进化现象//
/hline
/end{tabular}
/begin{lstlisting}
int main(){
int a=1;
return 1;
}
/end{lstlisting}
/subsection{脚注}
Footnotes/footnote{This is
a footnote.} are often used
by people using /LaTeX.
/section{基本文件后缀说明}
.tex /LaTeX{} 或 /TeX{} 源文件。可以用 /LaTeX{}处理。
.sty /LaTeX{}宏包文件。可使用命令$/backslash$usepackage 将其加载到你的 /LaTeX{}文件中。
.dtx 文档化 /LaTeX{}文件。这也是 /LaTeX{} 宏包发布的主要格式。通过处理一个.dtx 文件就可以得到该/LaTeX 宏包中所包括的宏代码文档。
.ins 为相应的.dtx 文件的安装文件。如果你在网络上下载了一 /LaTeX{} 宏包,你通常会发现会有一个.dtx 和一个.ins 文件。使用/LaTeX 对.ins文件进行处理,可以从.dtx 文件中提取出宏包。
当你运行 /LaTeX{} 处理你的源文件时,会得到下列文件:
.dvi 与设备无关文件。这是 /LaTeX{} 编译运行的主要结果。你可以使用 DVI 预览器浏览其内容,或者使用像dvips 这样的应用程序输出到打印机。
.log 记录了上次编译运行时的详细信息。
toc 存储了所有章节标题。该文件将在下次编译运行时被读入并生成目
录。
.lof 类似.toc 文件,可生成图形目录。
.lot 类似.toc 文件,可生成表格目录。
.aux 另一个用来向下次编译运行传递信息的辅助文件。除了其它信息外,.aux 文件通常包含交叉引用信息。
.idx 如果你的文件中包含有索引,LATEX 使用此文件存储所有的索引词条。此文件需要使用makeindex 处理。详见第4.3 节。
/section{一些细节设置}
下面设置背景色
/lstset{backgroundcolor=/color{bkcolor}}
/begin{lstlisting}[frame=single,framerule=1pt]
for i:=maxint to 0 do
begin
j:=square(root(i));
end;
/end{lstlisting}
/subsection{代码语法加亮}
/lstset{language=C,backgroundcolor=/color{white},numbers=left,numberstyle=/small,numbersep=10pt}
/begin{lstlisting}
/begin{quote}
int main(void)
{
int a=1;
if(a)
{
printf("a=%d/n",a);
}
}
/end{quote}
/end{lstlisting}
/subsection{特殊用意字体}
我们决定用/textsf{sans-serif}字体来表示命令,例如命令:/textsf{$/backslash$textsf/{sans-serif/}}
/subsection{关于各种列表的写法}
itemize 环境用于简单的列表,enumerate 环境用于带序号的列表,description
环境用于带描述的列表。
/begin{flushleft}
/begin{enumerate}
/item You can mix the list environments to your taste:
/begin{itemize}
/item But it might start to look silly.
/item[-] With a dash.
/end{itemize}
/item Therefore remember:
/begin{description}
/item[Stupid] things will not become smart because they are in a list.
/item[Smart] things, though, can be presented beautifully in a list.
/end{description}
/end{enumerate}
/end{flushleft}
/subsection{对齐方向}
flushleft/ 和/ flushright 环境分别产生靠左排列和靠右排列的段落。center 环境产生居中的文本。如果你不输入命令/verb|//|指定断行点,/ /LaTeX{}将自行决定。
/begin{flushleft}
This text is// left-aligned.
/LaTeX{} is not trying to make
each line the same length.
/end{flushleft}
/begin{flushright}
This text is right-//aligned.
/LaTeX{} is not trying to make
each line the same length.
/end{flushright}
/begin{center}
At the centre//of the earth
/end{center}
/subsection{quote环境}
相当于整体缩进效果://
A typographical rule of thumb for the line length is:
/begin{quote}
On average, no line should
be longer than 66 characters.---------bute here, I give a longe one;)
censed site and also provided you have a software mechanism that locks out any concurrent users in excess of the number of licensed copies of the applicable Software. You must obt
/end{quote}
This is why /LaTeX{} pages have such large borders by default and also why multicolumn print is used in newspapers.
/section{/LaTeX{}“非军事区”:逐字打印verbatim}
+ 仅是分隔符的一个例子。除了* 或空格,可以使用任意一个字符。
这个小册子中的许多例子是用这个命令排印的。加星号的版本,就是将空白以可见形式印刷出来。
该命令不能在其他命令的参数中使用。
The /verb|/ldots| command /ldots
/begin{verbatim}
10 PRINT "HELLO WORLD ";
20 GOTO 10
/end{verbatim}
/begin{verbatim*}
the starred version of
the verbatim
environment emphasizes
the spaces in the text
/end{verbatim*}
/subsection{表格}
/noindent hexadecimal//
hexadecimal//
hexadecimal//
/linespread{1.6}
hexadecimal//
hexadecimal//
/linespread{0.5}
hexadecimal//
hexadecimal//
hexadecimal//
甲
/begin{verbatim}
/begin{tabular}{|r|l|}
/hline
7C0 & hexadecimal //
3700 & octal // /cline{1-1}
11111000000 & binary //
/hline /hline
1984 & decimal //
/hline
/end{tabular}
/end{verbatim}
/begin{center}
/begin{tabular}{|r|l|}
/hline
7C0 & hexadecimal //
3700 & octal // /cline{1-1}
11111000000 & binary //
/hline /hline
1984 & decimal //
/hline
/end{tabular}
/end{center}
乙
/begin{center}
/begin{tabular}{|p{4.0cm}|}
/hline
Welcome to Boxy's paragraph.
We sincerely hope you'll
all enjoy the show.//
/hline
/end{tabular}
/end{center}
/subsubsection{设置列的分隔符}
丙
/begin{center}
/begin{tabular}{@{} l @{}}
/hline
no leading space//
/hline
/end{tabular}
/end{center}
丁
/begin{center}
/begin{tabular}{l}
/hline
leading space left and right//
/hline
/end{tabular}
/end{center}
/subsection{高级应用:格式化数值表}
用表列分隔符(/&) 取代十进制数的小数点!使用命令/verb|/multicolumn| 可在数值“表列”上放置一个表列标签。
戊
/begin{center}
/begin{tabular}{c r @{.} l}
Pi expression &
/multicolumn{2}{c}{Value} //
/hline
$/pi$ & 3&1416 //
$/pi^{/pi}$ & 36&46 //
$(/pi^{/pi})^{/pi}$ & 80662&7 //
/end{tabular}
/end{center}
/section{浮动体:图片和表格}
下面的例子画一个方形,并将它插入文档。如果想在完成的文档中为
你打算粘上的图片保留空间,你可以利用这个例子。
/begin{verbatim}
Figure~/ref{white} is an example of Pop-Art.
/begin{figure}[!hbp]
/makebox[/textwidth]{/framebox[5cm]{/rule{0pt}{5cm}}}
/caption{Five by Five in Centimetres.} /label{white}
/end{figure}
/end{verbatim}
Figure~/ref{white} is an example of Pop-Art.
/begin{figure}[hbp]
/makebox[/textwidth]{/framebox[5cm]{/rule{0pt}{5cm}}}
/caption{Five by Five in Centimetres.} /label{white}
/end{figure}
/subsection{盒子}
/makebox[/textwidth]{
c e n t r a l}/par
/makebox[/textwidth][s]{
s p r e a d}/par
/framebox[1.1/width]{Guess I'm framed now!} /par
/framebox[0.3/width][r]{Bummer, I am too wide} //
/framebox[1cm][l]{never mind, so am I} // Can you read this?
/section{保护脆弱命令}
/begin{verbatim}
/subsection{I am considerate
/protect/footnote{and protect my footnotes}}
/end{verbatim}
/subsection{I am considerate
/protect/footnote{and protect my footnotes}}
if no protect: compiler will complain here....
/subsection{字体}/label{ziti}
/begin{center}
/begin{tabular}{@{} r @{/quad} l @{}}
/multicolumn{2}{c}{表/ref{ziti}: 字体}//
/hline
/verb|/textnormal{...}| & /textnormal{document font, BIG CAP}//
/verb|/textrm{...}| & /textrm{roman}//
/verb|/textit{...}| & /textit{italic}//
/verb|/textsf{...}| & /textsf{sans serif}//
/verb|/texttt{...}| & /texttt{typewriter}//
/verb|/textmd{...}| & /textmd{medium}//
/verb|/textup{...}| & /textup{upright}//
/verb|/textsl{...}| & /textsl{slanted}//
/verb|/textbf{...}| & /textbf{bold face}//
/verb|/textsc{...}| & /textsc{small caps}//
/verb|/emph{...}| & /emph{emphasized}//
/end{tabular}
/end{center}
/subsection{字尺寸}/label{chicun}
/begin{center}
/begin{tabular}{@{} l @{/quad} l @{}}
/multicolumn{2}{c}{表/ref{chicun}:尺寸}//
/hline
/verb|/tiny| & {/tiny tiny font}//
/verb|/scriptsize| & {/scriptsize very small font}//
/verb|/footnotesize| & {/footnotesize quite small font}//
/verb|/small| & {/small small font}//
/verb|/normalsize| & {/normalsize normal font}//
/verb|/large| & {/large large font}//
/verb|/Large| & {/Large larger font}//
/verb|/LARGE| & {/LARGE very large font}//
/verb|/huge| & {/huge huge}//
/verb|/Huge| & {/Huge largest}//
/end{tabular}
/end{center}
/subsection{特殊字符}
开个头
/subsection{左右引号}
/subsubsection{单引号}
/subsubsection{双引号}
``Please press the `x' key.''
/paragraph{段落一}
其它上键符号一般添加backslash打头符号即可,注意$/backslash$的写法:/$$/backslash$backslash/$
/paragraph{段落二}
段落二的内容
上面列出的分节命令也以“带星”的形式出现。“带星”的命令通过
在命令名称后加* 来实现。它们生成的节标题既不出现于目录,也不带序号。
目录出现的标题,一般与输入的文本完全一致。有时这是不可能的,
因为标题太长排不进目录。在这种情况下,目录的条目可由真实标题前的
可选参量确定。//
$/backslash$section/[Title for the table of contents/]/{A long
and especially boring title, shown in the text/}
/section[Title for the table of contents]{A long
and especially boring title, shown in the text}
/subsubsection{破折号}
当作一种短划,根据长度分为三种:连字符号、跨越符号、破折号,以及减号(数学符号)
daughter-in-law, X-rated//
pages 13--67//
yes---or no? //
$0$, $1$ and $-1$
//
注意:数学符号中的数字和文字符号中的数字是有区别的。
波浪线:tilde
http://www.rich.edu//~{}bush //
http://www.rich.edu//~{}bush //
http://www.clever.edu/$/sim$demo
摄氏温度符号:
It’s $-30/,^{/circ}/mathrm{C}$.
I will soon start to super-conduct.
省略号/(/ldots/):专门有一个命令:$/backslash$ldots//
Not like this ... but like this://
New York, Tokyo, Budapest, /ldots
禁止相邻字绷带 legatures:
不是%Not
shelfful//
而是%but
shelf/mbox{}ful
单词间的空白:/LaTeX{}假定句子以句号、惊叹号、问号结尾,除非它们之前是大写字母。可以通过添加$/backslash$/@打头指示后面的句号、惊叹号或问号表示句子结尾。//
连接波浪线$/backslash$/~{}表示一个不可伸长的空白,并且禁止断行。
/subsection{断字}
下面的命令表示花括号里面的字符必须排在同一行之中。//
My phone number will change soon.
It will be /fbox{0116 291 2319}. The parameter
/mbox{/emph{filename}} should
contain the name of the file.
/section{数学公式}
% Example 2
/ldots when Einstein introduced his formula/
/begin{equation}
e = m /cdot c^2 /; ,
/end{equation}
which is at the same time the most widely known
and the least well understood physical formula.
% Example 2
/ldots from which follows Kirchoff's current law:
/begin{equation}
/sum_{k=1}^{n} I_k = 0 /; .
/end{equation}
Kirchhoff's voltage law can be derived /ldots
% Example 3
/ldots which has several advantages.
/begin{equation}
I_D = I_F - I_R
/end{equation}
is the core of a very different transistor model. /ldots
/subsubsection{结果}
/subsection[Experiment Analysis]{实验分析}/label{link1}
/subsubsection{}
/section[Conclusion]{结论}/ref{link1}
Partl~/cite{pa} has
proposed that /ldots{} and here it ends.
/section[Acknowledgement]{致谢}/ldots
%%%%%%%%%%%%%%% 参考文献 %%%%%%%%%%%%%%%%%%%%%%%%
/begin{thebibliography}{99}
/bibitem{McGregor03} John D. McGregor, Judith A. Stafford and Il-Hyung Cho: Measuring Component Reliability, In Proceedings of the 6th ICSE Workshop on Component-based Software Engineering, 2003
/end{thebibliography}
/end{document}