2014年5月19日 星期一

latex 跨行表格

跨行表格使用\multicolumn{2}{c|}{Multi-Column}這個語法

\multicolumn是跨行功能,
第一個參數2,表示跨兩行,
第二個參數c|,表示文字置中,並在欄位右邊畫一條直線框,
最後一個參數即是要填入的文字

參考網址:http://jhengjyun.blogspot.tw/2011/01/latexmulticolumnmultirow.html

latex 參考文獻&附錄

這裡使用latex內建的thebibliography
進入 thebibliography之後會獨立出章節
語法如下 
\begin{thebibliography}{99}  % 參考文獻印出之編號最寬為兩個字母寬
\bibitem[編號1]{代號1} 參考資料1
\bibitem[編號2]{代號2} 參考資料2
 ...
\edn{thebibliography}
 
 
呼叫參考文獻時直接使用\cite{代號} 

更改標題名稱為參考文獻
\renewcommand\refname{參考資料}  % article 類別文稿
\renewcommand\bibname{參考文獻}  % report/book 類別文稿
 
若要在目錄增加參考文獻時加入下列語法 
\addcontentsline{toc}{chapter}{參考文獻} 
 
 
附錄部分
\appendix
\chapter*{附錄}

可使用section

Latex 圖片並排

\begin{figure}[ht]
\centering
\subfigure[名稱] {
\label{標籤}
\includegraphics
[width=.8\textwidth]{圖檔位置}
}
\hspace{1cm}
\subfigure[名稱] {
\label{標籤}
\includegraphics
[width=.8\textwidth]{圖檔位置}
}
\caption{整個標籤}
\label{整個圖形標籤}
\end{figure}

更改數學式編號及使用矩陣

數學公式編號由1.1改成"式1.1
\makeatletter
\renewcommand{\tagform@}[1]{\maketag@@@{(式\hspace{0.2em}\ignorespaces#1\unskip\@@italiccorr)}}
\makeatother

若要把1.1改成1-1
新增
\renewcommand{\theequation}{\arabic{chapter}-\arabic{equation}}


於equation模式裡要使用矩陣可以用下列方式
如:
\begin{equation}
\begin{bmatrix} X'\\
Y'
\end{bmatrix} =
\begin{bmatrix} cos\theta & -sin\theta\\
sin\theta & cos\theta
\end{bmatrix}
\begin{bmatrix} X\\
Y
\end{bmatrix}
\end{equation}

matrix 無分界號 bmatrix 方括號 [ ]
pmatrix 小括號 ( ) Bmatrix 大括號 { }
vmatrix 單垂直線 | | Vmatrix 雙垂直線 || |