Presentation is loading. Please wait.

Presentation is loading. Please wait.

編輯軟體Latex之簡介 Min-Shiang Hwang (黃明祥)

Similar presentations


Presentation on theme: "編輯軟體Latex之簡介 Min-Shiang Hwang (黃明祥)"— Presentation transcript:

1 編輯軟體Latex之簡介 Min-Shiang Hwang (黃明祥)
Department of Management Information Systems National Chung-Hsing University

2 安裝Latex 執行CD之Autorun.exe (或從本課程教學個人網站下載)

3 開始編輯 執行WinEdt (或直接點選tex格式的檔案)

4 編輯 LaTeX 文件 First.tex 或 \documentclass[12pt, A4]{article}
\documentclass[12pt, A4]{article} \begin{document} How are you! \end{document} \documentclass[12pt, A4]{article} \begin{document} How are you! \end{document} 語法: \documentclass[參數]{格式} 說明: 標準的格式有 article、report、book、slides、letter 使用的參數有10pt(內定文字的大小)、11pt、12pt、 letterpaper(內定紙張規格 )、A4paper

5 執行編譯 1.執行Latex編譯(產生.dvi檔案) latex first.tex xdvi first.dvi 2.產生ps格式檔
3.GSView編譯結果 2.產生pdf格式檔 檔案名稱

6 檔頭 設定標題(title)、作者(author)及日期(date) \documentclass[12pt,A4]{article}
\title{The General Pay-Word} \author{Lin-Chang Lin \and Min-Shiang Hwang\footnote{Responsible for correspondence.}} \date{Oct. 30, 2006} \begin{document} \maketitle This is my first paper in Latex. \end{document} \date 日期;若忽略則內定為系統目前日期。 \and 當作者多於一位的時候,就要用到此指令來分開。 \footnote 附註。

7 編譯結果

8 字型、段落、註解 %為註解指令 % second.tex \documentclass[12pt,a4paper]{article}
\begin{document} This is roman. {\it This is italic.}\\ {\bf This is boldface.} And the default is roman. \end{document} 所有空白當作一個空格 \\ 本句(列)結束 編譯結果 斜體字型指令\it{text} 粗體字型指令\bf{text} 一個空列是一個段落的結束, 也就是下一個段落的開始 \、\\、$、&、%、#、_ 等字元,稱為保留字元 若要列出保留字元,須加\指令。如, \$、\&、\%、\#、\_

9 數學符號及方程式 \documentclass[12pt,a4]{article} \begin{document}
The parameters $W_m$, $p^2$, and $q^{m+2}$. \end{document} 使用數學符號需放置在二個$之間;例如$x$ ^為指數(上標);例如 x2,則只要寫 $x^2$ _為下標;例如 x2,則只要寫$x_2$ 如果指數或下標超過一個字元,就要用大括號括起來 例如 x-2 要寫$x^{-2}$,而 x20 要寫$x_{20}$ 編譯結果

10 方程式獨立展示在一列 \documentclass[12pt,a4]{article} \begin{document}
The following equations: $$ \lim_{\Delta x\to 0} \frac{f(x_0+\Delta x) - f(x_0)}{\Delta x} \begin{eqnarray} a &=& p - (q+100), \nonumber\\ b &=& p - (i/q). \end{eqnarray} \end{document} 方程式需放置在二個 $$ 之間 \frac{分子}{分母} %分式表示指令 將二條式子以等號對齊 不列出參考數(標號) 編譯結果

11 數學符號及方程式 \begin{eqnarray} \label{eq01} \left\{\begin{array}{rrll}
K_i &=& K_i \times L_j & \mbox{~if~} I > j,\\ K_j &=& K_j + L_i & otherwise. \end{array} \right. \end{eqnarray} The access right is computed by Equation~(\ref{eq01}). \label設定參考標籤名稱為eq01 ~表示強迫空一格 \ref 引用參考標籤 \mbox{非數學符號} 在數學方程式內要顯示非數學符號 編譯結果

12 編輯 LaTeX 文件 \begin{eqnarray*}
\frac{1}{1 + \frac{1}{1 + \frac{1}{1 + \frac{1}{\cdots}}}} \end{eqnarray*} eqnarray* 不列出參考數(標號) 編譯結果 \cdots 中心三點 … \cdot 中心一點 . \ldots 下面三點 … \vdots 垂直三點

13 數學符號功能表單 這裡有各種數學符號可供選擇使用

14 條列 無序列舉(itemize) \begin{itemize} \item Information Security
\item Management \item Information Science \end{itemize} 編譯結果 排序列舉(enumerate) \begin{enumerate} \item Information Security \item Management \item Information Science \end{enumerate}

15 條列 提示(敘述)列舉(description) 編譯結果 \begin{description}
\item[IS:] Information Security \item[M:] Management \item[IN:] Information Science \end{description} 由編輯者自行選擇代號或文字

16 編輯 LaTeX 簡單幾何圖 figure*:設定為圖形, *表以整頁顯示(沒有*則由半邊顯示) 設定座標點為(1.5,1)
\begin{figure*} \begin{center} \setlength{\unitlength}{6.0mm} \begin{picture}(7,5) \put(1.5, 1){\circle{2.4}{A}} \put(5.5, 1){\circle{2.4}{B}} \put(0, 3){\framebox(7, 1){Pre-Subkeys}} \put(0, 5){\framebox(7, 1){Expanded Key}} \put(3.5, 5){\vector(0, -1){1}} \put(1.5, 3){\vector(0, -1){0.9}} \put(5.5, 3){\vector(0, -1){0.9}} \end{picture} \caption{The key scheduling algorithm}\label{f2} \end{center} \end{figure*} 設定座標點為(1.5,1) 畫一直徑為2.4單位長的圓 畫一長為7寬為1單位長的矩形

17 編輯 LaTeX 文件 \begin{table}[hbpt] \caption{The rotations}\label{t01}
\begin{center} \begin{tabular}{|c|c|} \hline\hline Rotation in Round $i$ & Rotation Value \\ \hline\hline $0-Rot^1$ & 1 \\ \hline $1-Rot^1$ & 5 \\ \hline $2-Rot^2$ & 8 \\ \hline\hline\end{tabular} \end{center} \end{table} 畫二個欄位之表格(文字在中央) \hline 畫一條線段 每一列需以&來分隔欄位

18 LaTeX 論文架構 引用參考文獻 \begin{abstract}
\setlength{\baselineskip}{24pt} \hspace*{6mm} This is an abstract. \end{abstract} \section{Introduction} This is an introduction section. \subsection{motivation} This is my motivation. \section{The Proposed Scheme} This is my method \cite{hwang2001}. \begin{thebibliography}{1} \bibitem{hwang2001} M. S.~Hwang, I. C.~Lin. and L. H.~Li, ``A simple micro-payment scheme,'' {\em International Journal of Systems and Software}, vol.~55, no.~3, pp.~ , 2001. \end{thebibliography} 引用參考文獻

19 參考文獻 \newpage 從新的一頁開始排版 This is my paper. \input{p451} \newpage
\bibliography{mk,cry} \bibliographystyle{IEEEstr} 可以將另外一個檔案p451.tex插到此處 參考文獻是從mk.bib及cry.bib引用 參考文獻格式為IEEEstr, 若設定為unstr則為內定格式 mk.bib @ARTICLE{ams1986cr, AUTHOR = "J.~Amsterdam", TITLE = "Data Compression with Huffman Coding", JOURNAL = "Byte", VOLUME = "11", YEAR = "1986", PAGES = "98"}

20 bib檔案 cty.bib @BOOK{men1993b, AUTHOR = "Alfred J. Menezes",
TITLE = "Elliptic Curve Public Key Cryptosystem", PUBLISHER = "Kluwer Academic Publishing", YEAR = "1993"} @INPROCEEDINGS{aur1997cr, AUTHOR = "T. Aura and P. Nikander", TITLE = "Stateless Connections", BOOKTITLE = "International Conference on Network Security", PAGES = "87-97", PUBLISHER = "Springer-Verlag", SERIES = "Lecture Notes in Computer Science", VOLUME = "1334", ADDRESS = "Beijing, China", MONTH = "Nov.", YEAR = "1997"}

21 bib檔案 cty.bib 1.執行Latex編譯(產生.dvi檔案) 2.執行bibtex程式(產生bbl格式檔)
@TECHREPORT{mic1993cr, AUTHOR = "S. Micali", TITLE = "Fair Cryptosystems", INSTITUTION = "MIT/LCS", YEAR = "1993", TYPE = "Technical", NUMBER = "TR-579.b"} 2.執行bibtex程式(產生bbl格式檔) 3.再執行Latex編譯二次 4.產生ps格式檔 5.GSView編譯結果

22 中文論文 \documentclass[12pt,a4paper]{twarticle} \begin{document} 這是一篇中文論文
\end{document} 1.執行中文Latex編譯(產生.cdi檔案) 2.將cdi轉成dvi格式 4.GSView編譯結果 3.產生ps格式檔


Download ppt "編輯軟體Latex之簡介 Min-Shiang Hwang (黃明祥)"

Similar presentations


Ads by Google