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先到這里,下午看看數學公式