O(1) 的小乐

Job Hunting

公告

记录我的生活和工作。。。
<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

统计

  • 随笔 - 182
  • 文章 - 1
  • 评论 - 41
  • 引用 - 0

留言簿(10)

随笔分类(70)

随笔档案(182)

文章档案(1)

如影随形

搜索

  •  

最新随笔

最新评论

阅读排行榜

评论排行榜

LaTex使用 (2)

  1 各种列表序号 Itemize Enujerate  Description

\begin{description}
\item[Stupid]thingswillnot
becomesmartbecausetheyarenalist.
\item[Smart]things,though,canbe
presentedbeautifullyinalist.
\end{description}


\begin{enumerate}
\item the First One\\
\item the Second One\\
\end{enumerate}

\begin{itemize}
\item you are the best one
\item you are not the worst one
\end{itemize}

总体感觉还是\begin{enumerate} \end 这个用的比较多。。

2 左对齐 中间对齐 右对齐

\begin{flushleft}

\end{flushleft}           

\begin{flushcenter}     \end{flushcenter} 

\begin{flushright}       \end{flushright}

 

3 LaTex引用名人名言诗歌

  \begin{quotation}     \end{quotation} 对段落有缩进

\begin{verse}             \end{verse}         用于诗歌

 

4 LaTex插入C++代码

http://cchengshi.spaces.live.com/blog/cns!E0609DF00017690C!420.entry

这个网站维护的比较详细一些。。

1)以直接插入

\usepackage{listings}    

\lstset{language=C++}%这条命令可以让LaTeX排版时将C++键字突出显示

\lstset{breaklines}%这条命令可以让LaTeX自动将长的代码行换行排版

\lstset{extendedchars=false}%这一条命令可以解决代码跨页时,章节标题,页眉等汉字不显示的问题

\begin{lstlisting}

%paste your C++ code here

\end{lstlisting}

2)文本方式插入

\lstinputlisting{hello.cpp}

调用并嵌入源文件

\lstinputlisting{filename.*}

a)  file default extension: tex. 如果仅用 ilename 不加后缀名 .*, CTex会自动寻找 filename.tex文件

b) filename.*,  .* 可以为任意纯文本文件

 

今天上午Latex先到这里,下午看看数学公式

posted on 2010-08-30 19:27 Sosi 阅读(2037) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理


统计系统